[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20230403144839.1dc56d3c@kernel.org>
Date: Mon, 3 Apr 2023 14:48:39 -0700
From: Jakub Kicinski <kuba@...nel.org>
To: <edward.cree@....com>
Cc: <linux-net-drivers@....com>, <davem@...emloft.net>,
<pabeni@...hat.com>, <edumazet@...gle.com>,
Edward Cree <ecree.xilinx@...il.com>, <netdev@...r.kernel.org>,
<habetsm.xilinx@...il.com>, <sudheer.mogilappagari@...el.com>
Subject: Re: [RFC PATCH net-next 2/6] net: ethtool: record custom RSS
contexts in the IDR
On Mon, 3 Apr 2023 17:32:59 +0100 edward.cree@....com wrote:
> @@ -880,6 +896,7 @@ struct ethtool_ops {
> u8 *hfunc);
> int (*set_rxfh)(struct net_device *, const u32 *indir,
> const u8 *key, const u8 hfunc);
> + 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,
Would a static value not do for most drivers?
We already have a handful of data fields in the "ops" structure.
> @@ -1331,6 +1335,31 @@ static noinline_for_stack int ethtool_set_rxfh(struct net_device *dev,
> }
> }
>
> + if (create) {
> + if (delete) {
> + ret = -EINVAL;
> + goto out;
> + }
> + ctx = kzalloc(ethtool_rxfh_context_size(dev_indir_size,
> + dev_key_size,
> + dev_priv_size),
> + GFP_USER);
GFP_USER? Do you mean it for accounting? GFP_KERNEL_ACCOUNT?
Powered by blists - more mailing lists