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:
 <PAXPR04MB8510B5F144CE751D74DEE0F788062@PAXPR04MB8510.eurprd04.prod.outlook.com>
Date: Thu, 19 Dec 2024 01:32:56 +0000
From: Wei Fang <wei.fang@....com>
To: Alexander Lobakin <aleksander.lobakin@...el.com>
CC: Claudiu Manoil <claudiu.manoil@....com>, Vladimir Oltean
	<vladimir.oltean@....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>,
	Frank Li <frank.li@....com>, "horms@...nel.org" <horms@...nel.org>,
	"idosch@...sch.org" <idosch@...sch.org>, "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>
Subject: RE: [PATCH v8 net-next 3/4] net: enetc: add LSO support for i.MX95
 ENETC PF

> -----Original Message-----
> From: Alexander Lobakin <aleksander.lobakin@...el.com>
> Sent: 2024年12月18日 22:30
> To: Wei Fang <wei.fang@....com>
> Cc: Claudiu Manoil <claudiu.manoil@....com>; Vladimir Oltean
> <vladimir.oltean@....com>; Clark Wang <xiaoning.wang@....com>;
> andrew+netdev@...n.ch; davem@...emloft.net; edumazet@...gle.com;
> kuba@...nel.org; pabeni@...hat.com; Frank Li <frank.li@....com>;
> horms@...nel.org; idosch@...sch.org; netdev@...r.kernel.org;
> linux-kernel@...r.kernel.org; imx@...ts.linux.dev
> Subject: Re: [PATCH v8 net-next 3/4] net: enetc: add LSO support for i.MX95
> ENETC PF
> 
> From: Wei Fang <wei.fang@....com>
> Date: Wed, 18 Dec 2024 03:06:06 +0000
> 
> >>> +static inline int enetc_lso_count_descs(const struct sk_buff *skb) {
> >>> +	/* 4 BDs: 1 BD for LSO header + 1 BD for extended BD + 1 BD
> >>> +	 * for linear area data but not include LSO header, namely
> >>> +	 * skb_headlen(skb) - lso_hdr_len. And 1 BD for gap.
> 
> [...]
> 
> >>> +					 ((first) & SILSOSFMR0_TCP_1ST_SEG))
> >>> +
> >>> +#define ENETC4_SILSOSFMR1		0x1304
> >>> +#define  SILSOSFMR1_TCP_LAST_SEG	GENMASK(11, 0)
> >>> +#define   TCP_FLAGS_FIN			BIT(0)
> >>> +#define   TCP_FLAGS_SYN			BIT(1)
> >>> +#define   TCP_FLAGS_RST			BIT(2)
> >>> +#define   TCP_FLAGS_PSH			BIT(3)
> >>> +#define   TCP_FLAGS_ACK			BIT(4)
> >>> +#define   TCP_FLAGS_URG			BIT(5)
> >>> +#define   TCP_FLAGS_ECE			BIT(6)
> >>> +#define   TCP_FLAGS_CWR			BIT(7)
> >>> +#define   TCP_FLAGS_NS			BIT(8)
> >>
> >> Why are you open-coding these if they're present in uapi/linux/tcp.h?
> >
> > Okay, I will add 'ENETC' prefix.
> 
> You don't need to add a prefix, you need to just use the generic definitions
> from the abovementioned file.

These are definitions of register bits, they are different from the generic
definitions. The current macros are actually different from those in tcp.h.
The generic format is 'TCP_FLAG_XXX', while here it is 'TCP_FLAGS_XXX'. 
Anyway, I think it is better to add the 'ENETC' prefix to avoid people
mistakenly thinking that these are generic definitions.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ