[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20231004160007.095b55fc@kernel.org>
Date: Wed, 4 Oct 2023 16:00:07 -0700
From: Jakub Kicinski <kuba@...nel.org>
To: <edward.cree@....com>
Cc: <linux-net-drivers@....com>, <davem@...emloft.net>,
<edumazet@...gle.com>, <pabeni@...hat.com>, Edward Cree
<ecree.xilinx@...il.com>, <netdev@...r.kernel.org>,
<habetsm.xilinx@...il.com>, <sudheer.mogilappagari@...el.com>,
<jdamato@...tly.com>, <andrew@...n.ch>, <mw@...ihalf.com>,
<linux@...linux.org.uk>, <sgoutham@...vell.com>, <gakula@...vell.com>,
<sbhatta@...vell.com>, <hkelam@...vell.com>, <saeedm@...dia.com>,
<leon@...nel.org>
Subject: Re: [PATCH v4 net-next 2/7] net: ethtool: attach an XArray of
custom RSS contexts to a netdevice
On Wed, 27 Sep 2023 19:13:33 +0100 edward.cree@....com wrote:
> + struct ethtool_rxfh_context *ctx;
> + unsigned long context;
> +
> + if (dev->ethtool_ops->set_rxfh_context)
Can there be contexts if there's no callback to create them?
Perhaps you need this for later patches but would be good to
mention "why" in the commit message.
> + xa_for_each(&dev->ethtool->rss_ctx, context, ctx) {
> + u32 *indir = ethtool_rxfh_context_indir(ctx);
> + u8 *key = ethtool_rxfh_context_key(ctx);
> + u32 concast = context;
> +
> + xa_erase(&dev->ethtool->rss_ctx, context);
> + dev->ethtool_ops->set_rxfh_context(dev, indir, key,
> + ctx->hfunc, &concast,
> + true);
> + kfree(ctx);
> + }
Powered by blists - more mailing lists