public inbox for netdev@vger.kernel.org
 help / color / mirror / Atom feed
From: "Michael S. Tsirkin" <mst@redhat.com>
To: chia-yu.chang@nokia-bell-labs.com
Cc: tariqt@nvidia.com, linux-rdma@vger.kernel.org,
	shaojijie@huawei.com, shenjian15@huawei.com,
	salil.mehta@huawei.com, mbloch@nvidia.com, saeedm@nvidia.com,
	leon@kernel.org, eperezma@redhat.com, brett.creeley@amd.com,
	jasowang@redhat.com, virtualization@lists.linux.dev,
	xuanzhuo@linux.alibaba.com, pabeni@redhat.com,
	edumazet@google.com, parav@nvidia.com, linux-doc@vger.kernel.org,
	corbet@lwn.net, horms@kernel.org, dsahern@kernel.org,
	kuniyu@google.com, bpf@vger.kernel.org, netdev@vger.kernel.org,
	dave.taht@gmail.com, jhs@mojatatu.com, kuba@kernel.org,
	stephen@networkplumber.org, xiyou.wangcong@gmail.com,
	jiri@resnulli.us, davem@davemloft.net, andrew+netdev@lunn.ch,
	donald.hunter@gmail.com, ast@fiberby.net, liuhangbin@gmail.com,
	shuah@kernel.org, linux-kselftest@vger.kernel.org, ij@kernel.org,
	ncardwell@google.com, 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 v1 net-next 2/3] net: hns3/mlx5e: avoid corrupting CWR flag when receiving GRO packet
Date: Sun, 1 Feb 2026 04:05:02 -0500	[thread overview]
Message-ID: <20260201040151-mutt-send-email-mst@kernel.org> (raw)
In-Reply-To: <20260131225510.2946-3-chia-yu.chang@nokia-bell-labs.com>

On Sat, Jan 31, 2026 at 11:55:09PM +0100, chia-yu.chang@nokia-bell-labs.com wrote:
> From: Chia-Yu Chang <chia-yu.chang@nokia-bell-labs.com>
> 
> In Accurate ECN, ACE counter (AE, ECE, CWR flags) changes only when new
> CE packets arrive, while setting SKB_GSO_TCP_ECN in case of not knowing
> the ECN variant can result in header change that corrupts the ACE field.
> The new flag SKB_GSO_TCP_ACCECN is to prevent SKB_GSO_TCP_ECN or
> NETIF_F_TSO_ECN offloading to be used because they would corrupt CWR
> flag somewhere.
> 
> Signed-off-by: Chia-Yu Chang <chia-yu.chang@nokia-bell-labs.com>

Not my driver, but a better format is something along the lines of:

Currently .... this is wrong because ... as the result .... fix this by ...
so that ....

the coding style does say that you should use the imperative form.



> ---
>  drivers/net/ethernet/hisilicon/hns3/hns3_enet.c | 2 +-
>  drivers/net/ethernet/mellanox/mlx5/core/en_rx.c | 4 ++--
>  2 files changed, 3 insertions(+), 3 deletions(-)
> 
> diff --git a/drivers/net/ethernet/hisilicon/hns3/hns3_enet.c b/drivers/net/ethernet/hisilicon/hns3/hns3_enet.c
> index a47464a22751..3a1cf4335477 100644
> --- a/drivers/net/ethernet/hisilicon/hns3/hns3_enet.c
> +++ b/drivers/net/ethernet/hisilicon/hns3/hns3_enet.c
> @@ -3897,7 +3897,7 @@ static int hns3_gro_complete(struct sk_buff *skb, u32 l234info)
>  
>  	skb_shinfo(skb)->gso_segs = NAPI_GRO_CB(skb)->count;
>  	if (th->cwr)
> -		skb_shinfo(skb)->gso_type |= SKB_GSO_TCP_ECN;
> +		skb_shinfo(skb)->gso_type |= SKB_GSO_TCP_ACCECN;
>  
>  	if (l234info & BIT(HNS3_RXD_GRO_FIXID_B))
>  		skb_shinfo(skb)->gso_type |= SKB_GSO_TCP_FIXEDID;
> diff --git a/drivers/net/ethernet/mellanox/mlx5/core/en_rx.c b/drivers/net/ethernet/mellanox/mlx5/core/en_rx.c
> index 1fc3720d2201..d174f83478a3 100644
> --- a/drivers/net/ethernet/mellanox/mlx5/core/en_rx.c
> +++ b/drivers/net/ethernet/mellanox/mlx5/core/en_rx.c
> @@ -1311,7 +1311,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;
>  }
>  
>  static void mlx5e_shampo_update_ipv6_tcp_hdr(struct mlx5e_rq *rq, struct ipv6hdr *ipv6,
> @@ -1332,7 +1332,7 @@ static void mlx5e_shampo_update_ipv6_tcp_hdr(struct mlx5e_rq *rq, struct ipv6hdr
>  	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;
>  }
>  
>  static void mlx5e_shampo_update_hdr(struct mlx5e_rq *rq, struct mlx5_cqe64 *cqe, bool match)
> -- 
> 2.34.1


  reply	other threads:[~2026-02-01  9:05 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-01-31 22:55 [PATCH v1 net-next 0/3] ECN offload handling for AccECN series chia-yu.chang
2026-01-31 22:55 ` [PATCH v1 net-next 1/3] net: update commnets for SKB_GSO_TCP_ECN and SKB_GSO_TCP_ACCECN chia-yu.chang
2026-02-01  9:01   ` Michael S. Tsirkin
2026-01-31 22:55 ` [PATCH v1 net-next 2/3] net: hns3/mlx5e: avoid corrupting CWR flag when receiving GRO packet chia-yu.chang
2026-02-01  9:05   ` Michael S. Tsirkin [this message]
2026-02-02 16:44     ` Chia-Yu Chang (Nokia)
2026-01-31 22:55 ` [PATCH v1 net-next 3/3] virtio_net: Accurate ECN flag in virtio_net_hdr chia-yu.chang
2026-02-01  9:17   ` Michael S. Tsirkin
2026-02-02 16:56     ` Chia-Yu Chang (Nokia)
2026-02-02 17:19       ` Michael S. Tsirkin
2026-02-02 21:09         ` Chia-Yu Chang (Nokia)
2026-02-02 23:45           ` Michael S. Tsirkin
2026-02-01  0:45 ` [PATCH v1 net-next 0/3] ECN offload handling for AccECN series Jakub Kicinski
2026-02-02 14:10   ` Chia-Yu Chang (Nokia)
  -- strict thread matches above, loose matches on Subject: below --
2026-01-28 14:44 chia-yu.chang
2026-01-28 14:44 ` [PATCH v1 net-next 2/3] net: hns3/mlx5e: avoid corrupting CWR flag when receiving GRO packet chia-yu.chang

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=20260201040151-mutt-send-email-mst@kernel.org \
    --to=mst@redhat.com \
    --cc=Jason_Livingood@comcast.com \
    --cc=andrew+netdev@lunn.ch \
    --cc=ast@fiberby.net \
    --cc=bpf@vger.kernel.org \
    --cc=brett.creeley@amd.com \
    --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=leon@kernel.org \
    --cc=linux-doc@vger.kernel.org \
    --cc=linux-kselftest@vger.kernel.org \
    --cc=linux-rdma@vger.kernel.org \
    --cc=liuhangbin@gmail.com \
    --cc=mbloch@nvidia.com \
    --cc=mirja.kuehlewind@ericsson.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=shuah@kernel.org \
    --cc=stephen@networkplumber.org \
    --cc=tariqt@nvidia.com \
    --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