lists.openwall.net | lists / announce owl-users owl-dev john-users john-dev passwdqc-users yescrypt popa3d-users / oss-security kernel-hardening musl sabotage tlsify passwords / crypt-dev xvendor / Bugtraq Full-Disclosure linux-kernel linux-netdev linux-ext4 linux-hardening linux-cve-announce PHC | |
Open Source and information security mailing list archives
| ||
|
Message-ID: <781cf46c-bbcc-5223-76b8-176c7bf5836d@intel.com> Date: Fri, 29 Sep 2023 11:17:53 -0700 From: Jacob Keller <jacob.e.keller@...el.com> To: <edward.cree@....com>, <linux-net-drivers@....com>, <davem@...emloft.net>, <kuba@...nel.org>, <edumazet@...gle.com>, <pabeni@...hat.com> CC: 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 9/27/2023 11:13 AM, edward.cree@....com wrote: > From: Edward Cree <ecree.xilinx@...il.com> > > Each context stores the RXFH settings (indir, key, and hfunc) as well > as optionally some driver private data. > Delete any still-existing contexts at netdev unregister time. > > Signed-off-by: Edward Cree <ecree.xilinx@...il.com> > --- > include/linux/ethtool.h | 43 ++++++++++++++++++++++++++++++++++++++++- > net/core/dev.c | 25 ++++++++++++++++++++++++ > 2 files changed, 67 insertions(+), 1 deletion(-) > > diff --git a/include/linux/ethtool.h b/include/linux/ethtool.h > index 8aeefc0b4e10..bb11cb2f477d 100644 > --- a/include/linux/ethtool.h > +++ b/include/linux/ethtool.h > @@ -157,6 +157,43 @@ static inline u32 ethtool_rxfh_indir_default(u32 index, u32 n_rx_rings) > return index % n_rx_rings; > } > > +/** > + * struct ethtool_rxfh_context - a custom RSS context configuration > + * @indir_size: Number of u32 entries in indirection table > + * @key_size: Size of hash key, in bytes > + * @hfunc: RSS hash function identifier. One of the %ETH_RSS_HASH_* > + * @priv_size: Size of driver private data, in bytes > + * @indir_no_change: indir was not specified at create time > + * @key_no_change: hkey was not specified at create time > + */ > +struct ethtool_rxfh_context { > + u32 indir_size; > + u32 key_size; > + u8 hfunc; > + u16 priv_size; > + u8 indir_no_change:1; > + u8 key_no_change:1; > + /* private: driver private data, indirection table, and hash key are > + * stored sequentially in @data area. Use below helpers to access. > + */ > + u8 data[] __aligned(sizeof(void *)); > +}; Is it not feasible to use container_of to get to private data for the drivers? I guess this change in particular doesn't actually include any users yet...
Powered by blists - more mailing lists