Linux virtualization list
 help / color / mirror / Atom feed
From: Jijie Shao <shaojijie@huawei.com>
To: Jakub Kicinski <kuba@kernel.org>,
	"Chia-Yu Chang (Nokia)" <chia-yu.chang@nokia-bell-labs.com>
Cc: <shaojijie@huawei.com>,
	"shenjian15@huawei.com" <shenjian15@huawei.com>,
	"linux-rdma@vger.kernel.org" <linux-rdma@vger.kernel.org>,
	"eperezma@redhat.com" <eperezma@redhat.com>,
	"jasowang@redhat.com" <jasowang@redhat.com>,
	"virtualization@lists.linux.dev" <virtualization@lists.linux.dev>,
	"mst@redhat.com" <mst@redhat.com>,
	"xuanzhuo@linux.alibaba.com" <xuanzhuo@linux.alibaba.com>,
	"pabeni@redhat.com" <pabeni@redhat.com>,
	"edumazet@google.com" <edumazet@google.com>,
	"linux-doc@vger.kernel.org" <linux-doc@vger.kernel.org>,
	"corbet@lwn.net" <corbet@lwn.net>,
	"horms@kernel.org" <horms@kernel.org>,
	"dsahern@kernel.org" <dsahern@kernel.org>,
	"kuniyu@google.com" <kuniyu@google.com>,
	"bpf@vger.kernel.org" <bpf@vger.kernel.org>,
	"netdev@vger.kernel.org" <netdev@vger.kernel.org>,
	"dave.taht@gmail.com" <dave.taht@gmail.com>,
	"jhs@mojatatu.com" <jhs@mojatatu.com>,
	"stephen@networkplumber.org" <stephen@networkplumber.org>,
	"xiyou.wangcong@gmail.com" <xiyou.wangcong@gmail.com>,
	"jiri@resnulli.us" <jiri@resnulli.us>,
	"davem@davemloft.net" <davem@davemloft.net>,
	"andrew+netdev@lunn.ch" <andrew+netdev@lunn.ch>,
	"donald.hunter@gmail.com" <donald.hunter@gmail.com>,
	"ast@fiberby.net" <ast@fiberby.net>,
	"liuhangbin@gmail.com" <liuhangbin@gmail.com>,
	"shuah@kernel.org" <shuah@kernel.org>,
	"linux-kselftest@vger.kernel.org"
	<linux-kselftest@vger.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 v5 net-next 2/2] net: hns3: fix GSO_ECN flag setting in the RX path
Date: Wed, 19 Aug 2026 10:51:33 +0800	[thread overview]
Message-ID: <b1aa6136-3dc1-4190-beaa-32bee88b7091@huawei.com> (raw)
In-Reply-To: <20260812155927.57ee295b@kernel.org>


on 2026/8/13 6:59, Jakub Kicinski wrote:
> On Wed, 12 Aug 2026 10:35:25 +0000 Chia-Yu Chang (Nokia) wrote:
>>> Tested on hns3 HW (2x 100G, direct cable, openEuler 24.03, kernel 7.2.0-rc6).
>>>
>>> tcpdump confirms HW GRO zeroes IP ToS: aggregated (>MTU) packets carry tos 0x0, while non-aggregated packets keep their ToS/ECN marks — so the zeroing is done by HW GRO, not the sender. Before patch, CWR packets had SKB_GSO_TCP_ECN set (0x5 = SKB_GSO_TCPV4 | SKB_GSO_TCP_ECN). After patch, all GRO events gso_type=0x1 (SKB_GSO_TCPV4 only), no 0x5 observed.
>>>
>>> Tested-by: Jijie Shao <shaojijie@huawei.com>
>> Thanks Jijie for confirmation, I will submit to net in the next round.
> Hold on.. Sounds like hns3 zeros ToS out (?!)
>
> This would be invalid and illegal for HW-GRO. If hns3 nukes crucial IP
> header fields it should probably be advertising LRO not HW-GRO in the
> first place.

Your assessment is correct — HW GRO on hns3 does NOT zero IP ToS.

My earlier Tested-by claiming "HW GRO zeroes IP ToS" was wrong. The
tos=0x0 I observed was caused by a test methodology error: I used
iperf3 with --tos but did not set net.ipv4.tcp_ecn=1, so the sender's
kernel TCP stack cleared the ECN bits before the packets hit the wire.
I mistakenly attributed this TX-side clearing to HW GRO.

I have retested with tesgine (direct packet construction, bypassing
the kernel TCP stack) and confirmed:
   - HW GRO preserves IP ToS — each aggregate group retains the head
     packet's ToS value (verified with 0x00/0x02/0x03/0x10/0xB8)
   - HW GRO segments flows by ToS boundaries — any ToS change (DSCP or
     ECN bits) terminates the current aggregate group
   - ECN signals are intact — CE packets (tos=0x03) are delivered
     independently with the CE mark preserved
     
hns3 HW GRO is behaving correctly. Sorry for the confusion caused by
my earlier report.

Full test details in my correction reply to the patch 2/2 thread:
https://lore.kernel.org/all/dd817755-eb4d-4ac2-b282-ac06f847270d@huawei.com/

Regards,
Jijie Shao



  reply	other threads:[~2026-08-19  2:51 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-08-04 21:35 [PATCH v5 net-next 0/2] ECN offload handling series chia-yu.chang
2026-08-04 21:35 ` [PATCH v5 net-next 1/2] net: update comments for SKB_GSO_TCP_ECN and SKB_GSO_TCP_ACCECN chia-yu.chang
2026-08-12  0:30   ` Jakub Kicinski
2026-08-12 10:33     ` Chia-Yu Chang (Nokia)
2026-08-12 22:54       ` Jakub Kicinski
2026-08-13 10:28         ` Chia-Yu Chang (Nokia)
2026-08-13 15:58           ` Willem de Bruijn
     [not found]             ` <47BE8A8A-F80C-4C30-BC95-C85FEBFFB606@ericsson.com>
2026-08-14 10:29               ` Chia-Yu Chang (Nokia)
2026-08-14 13:34                 ` Willem de Bruijn
2026-08-14 19:01                   ` Jakub Kicinski
2026-08-14 19:14                     ` Willem de Bruijn
2026-08-04 21:35 ` [PATCH v5 net-next 2/2] net: hns3: fix GSO_ECN flag setting in the RX path chia-yu.chang
2026-08-06 11:47   ` Jijie Shao
2026-08-11 13:31   ` Jijie Shao
2026-08-12 10:35     ` Chia-Yu Chang (Nokia)
2026-08-12 22:59       ` Jakub Kicinski
2026-08-19  2:51         ` Jijie Shao [this message]
2026-08-18 13:32     ` Jijie Shao

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=b1aa6136-3dc1-4190-beaa-32bee88b7091@huawei.com \
    --to=shaojijie@huawei.com \
    --cc=Jason_Livingood@comcast.com \
    --cc=andrew+netdev@lunn.ch \
    --cc=ast@fiberby.net \
    --cc=bpf@vger.kernel.org \
    --cc=cheshire@apple.com \
    --cc=chia-yu.chang@nokia-bell-labs.com \
    --cc=corbet@lwn.net \
    --cc=dave.taht@gmail.com \
    --cc=davem@davemloft.net \
    --cc=donald.hunter@gmail.com \
    --cc=dsahern@kernel.org \
    --cc=edumazet@google.com \
    --cc=eperezma@redhat.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=jhs@mojatatu.com \
    --cc=jiri@resnulli.us \
    --cc=koen.de_schepper@nokia-bell-labs.com \
    --cc=kuba@kernel.org \
    --cc=kuniyu@google.com \
    --cc=linux-doc@vger.kernel.org \
    --cc=linux-kselftest@vger.kernel.org \
    --cc=linux-rdma@vger.kernel.org \
    --cc=liuhangbin@gmail.com \
    --cc=mirja.kuehlewind@ericsson.com \
    --cc=mst@redhat.com \
    --cc=ncardwell@google.com \
    --cc=netdev@vger.kernel.org \
    --cc=pabeni@redhat.com \
    --cc=rs.ietf@gmx.at \
    --cc=shenjian15@huawei.com \
    --cc=shuah@kernel.org \
    --cc=stephen@networkplumber.org \
    --cc=vidhi_goel@apple.com \
    --cc=virtualization@lists.linux.dev \
    --cc=xiyou.wangcong@gmail.com \
    --cc=xuanzhuo@linux.alibaba.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