On 11/07/2025 4:53, Jakub Kicinski wrote:
quoted hunk ↗ jump to hunk
Support configuring symmetric hashing via Netlink.
We have the flow field config prepared as part of SET handling,
so scan it for conflicts instead of querying the driver again.
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
---
static int
ethnl_rss_set(struct ethnl_req_info *req_info, struct genl_info *info)
{
+ bool indir_reset = false, indir_mod = false, xfrm_sym = false;
struct rss_req_info *request = RSS_REQINFO(req_info);
- bool indir_reset = false, indir_mod = false;
struct ethtool_rxfh_context *ctx = NULL;
struct net_device *dev = req_info->dev;
struct ethtool_rxfh_param rxfh = {};@@ -667,7 +704,17 @@ ethnl_rss_set(struct ethnl_req_info *req_info, struct genl_info *info)
if (ret)
goto exit_clean_data;
- rxfh.input_xfrm = RXH_XFRM_NO_CHANGE;
+ rxfh.input_xfrm = data.input_xfrm;
+ ethnl_update_u8(&rxfh.input_xfrm, tb[ETHTOOL_A_RSS_INPUT_XFRM], &mod);
+ /* xfrm_input is NO_CHANGE AKA 0xff if per-context not supported */
Can you please explain this comment? Shouldn't we fail in this case?
Nit: xfrm_input -> input_xfrm.
quoted hunk ↗ jump to hunk
+ if (!request->rss_context || ops->rxfh_per_ctx_key)
+ xfrm_sym = !!rxfh.input_xfrm;
+ if (rxfh.input_xfrm == data.input_xfrm)
+ rxfh.input_xfrm = RXH_XFRM_NO_CHANGE;
+
+ ret = rss_check_rxfh_fields_sym(dev, info, &data, xfrm_sym);
+ if (ret)
+ goto exit_clean_data;
mutex_lock(&dev->ethtool->rss_lock);
if (request->rss_context) {