@@ -750,11 +750,13 @@ struct ethtool_mm_stats {
* the contents of the RX flow hash indirection table, hash key, and/or
* hash function associated to the given context. Arguments which are set
* to %NULL or zero will remain unchanged.
+ * The &struct ethtool_rxfh_context for this context is passed in @ctx;
+ * note that it will still contain the *old* settings. The driver does
+ * not need to update these; the core will do so if this op succeeds.
* Returns a negative error code or zero. An error code must be returned
* if at least one unsupported change was requested.
* @set_rxfh_context_old: Legacy version of @set_rxfh_context, where driver
* chooses the new context ID in the %ETH_RXFH_CONTEXT_ALLOC case.
- * Arguments and return otherwise the same.
* @get_channels: Get number of channels.
* @set_channels: Set number of channels. Returns a negative error code or
* zero.
@@ -902,9 +904,11 @@ struct ethtool_ops {
u16 (*get_rxfh_priv_size)(struct net_device *);
int (*get_rxfh_context)(struct net_device *, u32 *indir, u8 *key,
u8 *hfunc, u32 rss_context);
- int (*set_rxfh_context)(struct net_device *, const u32 *indir,
- const u8 *key, const u8 hfunc,
- u32 rss_context, bool delete);
+ int (*set_rxfh_context)(struct net_device *,
+ struct ethtool_rxfh_context *ctx,
+ const u32 *indir, const u8 *key,
+ const u8 hfunc, u32 rss_context,
+ bool create, bool delete);
int (*set_rxfh_context_old)(struct net_device *, const u32 *indir,
const u8 *key, const u8 hfunc,
u32 *rss_context, bool delete);
@@ -10794,8 +10794,9 @@ static void netdev_rss_contexts_free(struct net_device *dev)
idr_remove(&dev->rss_ctx, context);
if (dev->ethtool_ops->set_rxfh_context)
- dev->ethtool_ops->set_rxfh_context(dev, indir, key,
- ctx->hfunc, context,
+ dev->ethtool_ops->set_rxfh_context(dev, ctx, indir,
+ key, ctx->hfunc,
+ context, false,
true);
else
dev->ethtool_ops->set_rxfh_context_old(dev, indir, key,
@@ -1382,8 +1382,10 @@ static noinline_for_stack int ethtool_set_rxfh(struct net_device *dev,
if (rxfh.rss_context) {
if (ops->set_rxfh_context)
- ret = ops->set_rxfh_context(dev, indir, hkey, rxfh.hfunc,
- rxfh.rss_context, delete);
+ ret = ops->set_rxfh_context(dev, ctx, indir, hkey,
+ rxfh.hfunc,
+ rxfh.rss_context, create,
+ delete);
else
ret = ops->set_rxfh_context_old(dev, indir, hkey,
rxfh.hfunc,