From: Dragos Tatulea <dtatulea@nvidia.com>
To: "Chia-Yu Chang (Nokia)" <chia-yu.chang@nokia-bell-labs.com>,
Paolo Abeni <pabeni@redhat.com>,
"linyunsheng@huawei.com" <linyunsheng@huawei.com>,
"andrew+netdev@lunn.ch" <andrew+netdev@lunn.ch>,
"parav@nvidia.com" <parav@nvidia.com>,
"jasowang@redhat.com" <jasowang@redhat.com>,
"mst@redhat.com" <mst@redhat.com>,
"shenjian15@huawei.com" <shenjian15@huawei.com>,
"salil.mehta@huawei.com" <salil.mehta@huawei.com>,
"shaojijie@huawei.com" <shaojijie@huawei.com>,
"saeedm@nvidia.com" <saeedm@nvidia.com>,
"tariqt@nvidia.com" <tariqt@nvidia.com>,
"mbloch@nvidia.com" <mbloch@nvidia.com>,
"leonro@nvidia.com" <leonro@nvidia.com>,
"linux-rdma@vger.kernel.org" <linux-rdma@vger.kernel.org>,
"netdev@vger.kernel.org" <netdev@vger.kernel.org>,
"davem@davemloft.net" <davem@davemloft.net>,
"edumazet@google.com" <edumazet@google.com>,
"kuba@kernel.org" <kuba@kernel.org>,
"horms@kernel.org" <horms@kernel.org>,
"ij@kernel.org" <ij@kernel.org>,
"ncardwell@google.com" <ncardwell@google.com>,
"Koen De Schepper (Nokia)" <koen.de_schepper@nokia-bell-labs.com>,
"g.white@cablelabs.com" <g.white@cablelabs.com>,
"ingemar.s.johansson@ericsson.com"
<ingemar.s.johansson@ericsson.com>,
"mirja.kuehlewind@ericsson.com" <mirja.kuehlewind@ericsson.com>,
"cheshire@apple.com" <cheshire@apple.com>,
"rs.ietf@gmx.at" <rs.ietf@gmx.at>,
"Jason_Livingood@comcast.com" <Jason_Livingood@comcast.com>,
"vidhi_goel@apple.com" <vidhi_goel@apple.com>
Subject: Re: [PATCH v4 net 2/3] net: mlx5e: fix CWR handling in drivers to preserve ACE signal
Date: Mon, 18 May 2026 11:27:07 +0200 [thread overview]
Message-ID: <9c324e5b-24a0-40ef-bd00-fb305825d06e@nvidia.com> (raw)
In-Reply-To: <PAXPR07MB79846075432AA7F7CAD67006A3032@PAXPR07MB7984.eurprd07.prod.outlook.com>
On 18.05.26 11:20, Chia-Yu Chang (Nokia) wrote:
>> -----Original Message-----
>> From: Dragos Tatulea <dtatulea@nvidia.com>
>> Sent: Thursday, April 23, 2026 10:13 PM
>> To: Paolo Abeni <pabeni@redhat.com>; Chia-Yu Chang (Nokia) <chia-yu.chang@nokia-bell-labs.com>; linyunsheng@huawei.com; andrew+netdev@lunn.ch; parav@nvidia.com; jasowang@redhat.com; mst@redhat.com; shenjian15@huawei.com; salil.mehta@huawei.com; shaojijie@huawei.com; saeedm@nvidia.com; tariqt@nvidia.com; mbloch@nvidia.com; leonro@nvidia.com; linux-rdma@vger.kernel.org; netdev@vger.kernel.org; davem@davemloft.net; edumazet@google.com; kuba@kernel.org; horms@kernel.org; ij@kernel.org; ncardwell@google.com; Koen De Schepper (Nokia) <koen.de_schepper@nokia-bell-labs.com>; g.white@cablelabs.com; ingemar.s.johansson@ericsson.com; mirja.kuehlewind@ericsson.com; cheshire@apple.com; rs.ietf@gmx.at; Jason_Livingood@comcast.com; vidhi_goel@apple.com
>> Subject: Re: [PATCH v4 net 2/3] net: mlx5e: fix CWR handling in drivers to preserve ACE signal
>>
>>
>> CAUTION: This is an external email. Please be very careful when clicking links or opening attachments. See the URL nok.it/ext for additional information.
>>
>>
>>
>> On 23.04.26 19:40, Paolo Abeni wrote:
>>> On 4/23/26 4:19 PM, Dragos Tatulea wrote:
>>>> On 23.04.26 09:30, Paolo Abeni wrote:
>>>> [...]
>>>>>> ---
>>>>>> drivers/net/ethernet/mellanox/mlx5/core/en_rx.c | 4 ++--
>>>>>> 1 file changed, 2 insertions(+), 2 deletions(-)
>>>>>>
>>>>>> diff --git a/drivers/net/ethernet/mellanox/mlx5/core/en_rx.c
>>>>>> b/drivers/net/ethernet/mellanox/mlx5/core/en_rx.c
>>>>>> index 5b60aa47c75b..9b1c80079532 100644
>>>>>> --- a/drivers/net/ethernet/mellanox/mlx5/core/en_rx.c
>>>>>> +++ b/drivers/net/ethernet/mellanox/mlx5/core/en_rx.c
>>>>>> @@ -1180,7 +1180,7 @@ static void mlx5e_shampo_update_ipv4_tcp_hdr(struct mlx5e_rq *rq, struct iphdr *
>>>>>> skb->csum_offset = offsetof(struct tcphdr, check);
>>>>>>
>>>>>> if (tcp->cwr)
>>>>>> - skb_shinfo(skb)->gso_type |= SKB_GSO_TCP_ECN;
>>>>>> + skb_shinfo(skb)->gso_type |= SKB_GSO_TCP_ACCECN;
>>>>>
>>>>> Here there is an open question for nVidia:
>>>>>
>>>> Sorry for missing this question in v3.
>>>>
>>>>> Is the above enough or will later segmentation lead to the wrong
>>>>> results? I think/guess the firmware is (still) aggregating the wire
>>>>> frames using the ECN schema, i.e. the first wire packet has CWR ==
>>>>> 1, the later CWR==0.
>>>>>
>>>> For mlx5 HW-GRO a packet with the CWR flag will flush the previous
>>>> GRO session and will not start a GRO session for this packet
>>>> (napi_gro_receive() will be called on this single segment skb).
>>>>
>>>> So this change won't impact the current GRO behavior from the mlx5 driver/hw side.
>>>
>>> OK, thanks!
>>>
>>> For my education: doesn't the above also means that mlx5 will never
>>> build GSO packets with CWR set (and so the above statement should
>>> never be reached)?
>>>
>> It does look like it... Thanks for pointing it out! Will be addressed in a patch.
>>
>> Thanks,
>> Dragos
>
> Hi Paolo and Dragos,
>
> First, sorry for my late reply and thanks for clarification.
>
> The table below is to ensure my understanding of mlx5 is correct.
>
> +===================+==========+===============+=================+
> | Packet id | CWR flag | Flushing? | gso_type |
> +===================+==========+===============+=================+
> | 0 | 0 | 0 | 0 |
> | ... | 0 | 0 | 0 |
> | n - 1 | 0 | 1 | 0 |
> +-------------------+----------+---------------+-----------------+
> | n | 1 | 1 | SKB_GSO_TCP_ECN |
> | n + 1 | 0 | 1 | 0 |
> +-------------------+----------+---------------+-----------------+
> | n + 2 | 1 | 1 | SKB_GSO_TCP_ECN |
> | n + 3 | 1 | 1 | SKB_GSO_TCP_ECN |
> +===================+==========+===============+=================+
>
> Currently, mlx5 will flush GRO session and emit a single packet when the CWR flag is set on the RX.
>
> So, this patch (changing gso_type from SKB_GSO_TCP_ECN to SKB_GSO_TCP_ACCECN) seems more for future-proof than a bug fix.
>
> I will update the commit message to spcify that (or please suggest other changes needed).
>
Hi Chia-Yu,
Based on Paolo's comment, we have a pending patch that completely
removes the setting of the gso_type in the HW-GRO path.
Thanks,
Dragos
next prev parent reply other threads:[~2026-05-18 9:27 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-04-17 15:26 [PATCH v4 net 0/3] ECN offload handling for AccECN series chia-yu.chang
2026-04-17 15:26 ` [PATCH v4 net 1/3] net: update comments for SKB_GSO_TCP_ECN and SKB_GSO_TCP_ACCECN chia-yu.chang
2026-04-17 15:26 ` [PATCH v4 net 2/3] net: mlx5e: fix CWR handling in drivers to preserve ACE signal chia-yu.chang
2026-04-23 7:30 ` Paolo Abeni
2026-04-23 14:19 ` Dragos Tatulea
2026-04-23 17:40 ` Paolo Abeni
2026-04-23 20:13 ` Dragos Tatulea
2026-05-18 9:20 ` Chia-Yu Chang (Nokia)
2026-05-18 9:27 ` Dragos Tatulea [this message]
2026-05-18 9:36 ` Chia-Yu Chang (Nokia)
2026-04-17 15:26 ` [PATCH v4 net 3/3] net: hns3: " chia-yu.chang
2026-04-25 9:35 ` Jijie Shao
2026-04-25 14:30 ` Chia-Yu Chang (Nokia)
2026-05-08 11:22 ` Jijie Shao
2026-05-18 9:20 ` Chia-Yu Chang (Nokia)
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=9c324e5b-24a0-40ef-bd00-fb305825d06e@nvidia.com \
--to=dtatulea@nvidia.com \
--cc=Jason_Livingood@comcast.com \
--cc=andrew+netdev@lunn.ch \
--cc=cheshire@apple.com \
--cc=chia-yu.chang@nokia-bell-labs.com \
--cc=davem@davemloft.net \
--cc=edumazet@google.com \
--cc=g.white@cablelabs.com \
--cc=horms@kernel.org \
--cc=ij@kernel.org \
--cc=ingemar.s.johansson@ericsson.com \
--cc=jasowang@redhat.com \
--cc=koen.de_schepper@nokia-bell-labs.com \
--cc=kuba@kernel.org \
--cc=leonro@nvidia.com \
--cc=linux-rdma@vger.kernel.org \
--cc=linyunsheng@huawei.com \
--cc=mbloch@nvidia.com \
--cc=mirja.kuehlewind@ericsson.com \
--cc=mst@redhat.com \
--cc=ncardwell@google.com \
--cc=netdev@vger.kernel.org \
--cc=pabeni@redhat.com \
--cc=parav@nvidia.com \
--cc=rs.ietf@gmx.at \
--cc=saeedm@nvidia.com \
--cc=salil.mehta@huawei.com \
--cc=shaojijie@huawei.com \
--cc=shenjian15@huawei.com \
--cc=tariqt@nvidia.com \
--cc=vidhi_goel@apple.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