Linux kernel and device drivers for NXP i.MX platforms
 help / color / mirror / Atom feed
From: Alexander Lobakin <aleksander.lobakin@intel.com>
To: Wei Fang <wei.fang@nxp.com>
Cc: Claudiu Manoil <claudiu.manoil@nxp.com>,
	Vladimir Oltean <vladimir.oltean@nxp.com>,
	Clark Wang <xiaoning.wang@nxp.com>,
	"andrew+netdev@lunn.ch" <andrew+netdev@lunn.ch>,
	"davem@davemloft.net" <davem@davemloft.net>,
	"edumazet@google.com" <edumazet@google.com>,
	"kuba@kernel.org" <kuba@kernel.org>,
	"pabeni@redhat.com" <pabeni@redhat.com>,
	Frank Li <frank.li@nxp.com>,
	"horms@kernel.org" <horms@kernel.org>,
	"idosch@idosch.org" <idosch@idosch.org>,
	"netdev@vger.kernel.org" <netdev@vger.kernel.org>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
	"imx@lists.linux.dev" <imx@lists.linux.dev>
Subject: Re: [PATCH v8 net-next 3/4] net: enetc: add LSO support for i.MX95 ENETC PF
Date: Thu, 19 Dec 2024 16:16:43 +0100	[thread overview]
Message-ID: <8d0e4cc6-6fda-4a14-ae1a-0923a93fbeeb@intel.com> (raw)
In-Reply-To: <PAXPR04MB8510B5F144CE751D74DEE0F788062@PAXPR04MB8510.eurprd04.prod.outlook.com>

From: Wei Fang <wei.fang@nxp.com>
Date: Thu, 19 Dec 2024 01:32:56 +0000

>> -----Original Message-----
>> From: Alexander Lobakin <aleksander.lobakin@intel.com>
>> Sent: 2024年12月18日 22:30
>> To: Wei Fang <wei.fang@nxp.com>
>> Cc: Claudiu Manoil <claudiu.manoil@nxp.com>; Vladimir Oltean
>> <vladimir.oltean@nxp.com>; Clark Wang <xiaoning.wang@nxp.com>;
>> andrew+netdev@lunn.ch; davem@davemloft.net; edumazet@google.com;
>> kuba@kernel.org; pabeni@redhat.com; Frank Li <frank.li@nxp.com>;
>> horms@kernel.org; idosch@idosch.org; netdev@vger.kernel.org;
>> linux-kernel@vger.kernel.org; imx@lists.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@nxp.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.

Oh I'm sorry, I thought those are copies of the generic defs :s

Yes, just add ENETC_ then.

Thanks,
Olek

  reply	other threads:[~2024-12-19 15:17 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-12-13  2:17 [PATCH v8 net-next 0/4] Add more feautues for ENETC v4 - round 1 Wei Fang
2024-12-13  2:17 ` [PATCH v8 net-next 1/4] net: enetc: add Tx checksum offload for i.MX95 ENETC Wei Fang
2024-12-17 15:13   ` Alexander Lobakin
2024-12-18  1:53     ` Wei Fang
2024-12-13  2:17 ` [PATCH v8 net-next 2/4] net: enetc: update max chained Tx BD number " Wei Fang
2024-12-13  2:17 ` [PATCH v8 net-next 3/4] net: enetc: add LSO support for i.MX95 ENETC PF Wei Fang
2024-12-17  9:20   ` Paolo Abeni
2024-12-17 12:52     ` Wei Fang
2024-12-17 15:32   ` Alexander Lobakin
2024-12-18  3:06     ` Wei Fang
2024-12-18  5:45       ` Wei Fang
2024-12-18 14:30       ` Alexander Lobakin
2024-12-19  1:32         ` Wei Fang
2024-12-19 15:16           ` Alexander Lobakin [this message]
2024-12-13  2:17 ` [PATCH v8 net-next 4/4] net: enetc: add UDP segmentation offload support Wei Fang

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=8d0e4cc6-6fda-4a14-ae1a-0923a93fbeeb@intel.com \
    --to=aleksander.lobakin@intel.com \
    --cc=andrew+netdev@lunn.ch \
    --cc=claudiu.manoil@nxp.com \
    --cc=davem@davemloft.net \
    --cc=edumazet@google.com \
    --cc=frank.li@nxp.com \
    --cc=horms@kernel.org \
    --cc=idosch@idosch.org \
    --cc=imx@lists.linux.dev \
    --cc=kuba@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=netdev@vger.kernel.org \
    --cc=pabeni@redhat.com \
    --cc=vladimir.oltean@nxp.com \
    --cc=wei.fang@nxp.com \
    --cc=xiaoning.wang@nxp.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox