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
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID:
 <PAXPR04MB8510C930C602101C4649791A88DF2@PAXPR04MB8510.eurprd04.prod.outlook.com>
Date: Mon, 17 Mar 2025 11:39:49 +0000
From: Wei Fang <wei.fang@....com>
To: Vladimir Oltean <vladimir.oltean@....com>
CC: Claudiu Manoil <claudiu.manoil@....com>, Clark Wang
	<xiaoning.wang@....com>, "andrew+netdev@...n.ch" <andrew+netdev@...n.ch>,
	"davem@...emloft.net" <davem@...emloft.net>, "edumazet@...gle.com"
	<edumazet@...gle.com>, "kuba@...nel.org" <kuba@...nel.org>,
	"pabeni@...hat.com" <pabeni@...hat.com>, "christophe.leroy@...roup.eu"
	<christophe.leroy@...roup.eu>, "netdev@...r.kernel.org"
	<netdev@...r.kernel.org>, "linux-kernel@...r.kernel.org"
	<linux-kernel@...r.kernel.org>, "imx@...ts.linux.dev" <imx@...ts.linux.dev>,
	"linuxppc-dev@...ts.ozlabs.org" <linuxppc-dev@...ts.ozlabs.org>,
	"linux-arm-kernel@...ts.infradead.org" <linux-arm-kernel@...ts.infradead.org>
Subject: RE: [PATCH v4 net-next 01/14] net: enetc: add initial netc-lib driver
 to support NTMP

> On Mon, Mar 17, 2025 at 11:55:26AM +0200, Wei Fang wrote:
> > Actually I did this is the original version, I mean in downstream kernel 6.6
> > tree. I add a "ntmp_mfe" in ntmp.h like below
> >
> > struct ntmp_mfe {
> > 	u8 mac[ETH_ALEN];
> > 	u16 si_bitmap;
> > };
> >
> > And the conversion was done by the NTMP driver. But then I found that this
> was
> > very troublesome. We get data from kernel "struct A,B,C", then the enetc
> driver
> > converts them to "struct D", and finally the ntmp driver converts it to "struct
> E".
> > So I thought why don't we convert "struct A,B,C" to "struct E" from the
> beginning?
> > After all, these data structures are only used by enetc and netc switch drivers,
> so
> > in kernel 6.12, I changed it to the current way.
> 
> I understand. With pack_fields(), "struct E" (the packed representation
> of "struct D") doesn't explicitly exist, just an abstract type
> representing the u8 *buffer, and the struct packed_field_u8 array[]
> which is hidden inside the NTMP layer.

Yes, "struct E" will not exist, but we need to pack every member in
"struct D" to convert them to the hardware structure, so there are
still two conversions ("struct A,B,C" -> "struct "D" --> hardware
structure).


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ