From: Tony Nguyen <anthony.l.nguyen@intel.com>
To: davem@davemloft.net, kuba@kernel.org, pabeni@redhat.com,
edumazet@google.com, andrew+netdev@lunn.ch,
netdev@vger.kernel.org
Cc: Joshua Hay <joshua.a.hay@intel.com>,
anthony.l.nguyen@intel.com, ae878000@gmail.com,
mhun512@gmail.com, sridhar.samudrala@intel.com,
milena.olech@intel.com, vadim.fedorenko@linux.dev,
willemb@google.com, jacob.e.keller@intel.com,
przemyslaw.kitszel@intel.com, jbrandeb@kernel.org,
Emil Tantilov <emil.s.tantilov@intel.com>,
Aleksandr Loktionov <aleksandr.loktionov@intel.com>,
Samuel Salin <Samuel.salin@intel.com>
Subject: [PATCH net 3/5] idpf: account for VLAN header when parsing RSC packet header
Date: Tue, 8 Sep 2026 14:44:58 -0700 [thread overview]
Message-ID: <20260908214502.528440-4-anthony.l.nguyen@intel.com> (raw)
In-Reply-To: <20260908214502.528440-1-anthony.l.nguyen@intel.com>
From: Joshua Hay <joshua.a.hay@intel.com>
While parsing the header of a Receive Side Coalesced (RSC) packet, check
if a VLAN tag is present and adjust the header parsing accordingly.
Otherwise, Rx TCP traffic is completely broken for any VLAN interface
whose underlying interface has RSC (rx-gro-hw) enabled.
We only need to worry about one VLAN header since Rx packets with
multiple VLAN headers are not candidates for RSC.
Fixes: 3a8845af66edb ("idpf: add RX splitq napi poll support")
Signed-off-by: Joshua Hay <joshua.a.hay@intel.com>
Reviewed-by: Emil Tantilov <emil.s.tantilov@intel.com>
Reviewed-by: Aleksandr Loktionov <aleksandr.loktionov@intel.com>
Tested-by: Samuel Salin <Samuel.salin@intel.com>
Signed-off-by: Tony Nguyen <anthony.l.nguyen@intel.com>
---
drivers/net/ethernet/intel/idpf/idpf_txrx.c | 10 +++++++---
1 file changed, 7 insertions(+), 3 deletions(-)
diff --git a/drivers/net/ethernet/intel/idpf/idpf_txrx.c b/drivers/net/ethernet/intel/idpf/idpf_txrx.c
index 9ba9c2952d78..4311ffa30bb1 100644
--- a/drivers/net/ethernet/intel/idpf/idpf_txrx.c
+++ b/drivers/net/ethernet/intel/idpf/idpf_txrx.c
@@ -3299,6 +3299,7 @@ static int idpf_rx_rsc(struct idpf_rx_queue *rxq, struct sk_buff *skb,
struct libeth_rx_pt decoded)
{
u16 rsc_segments, rsc_seg_len;
+ u16 l3_start = 0;
bool ipv4, ipv6;
int len;
@@ -3321,7 +3322,10 @@ static int idpf_rx_rsc(struct idpf_rx_queue *rxq, struct sk_buff *skb,
NAPI_GRO_CB(skb)->count = rsc_segments;
skb_shinfo(skb)->gso_size = rsc_seg_len;
- skb_reset_network_header(skb);
+ if (unlikely(eth_type_vlan(skb->protocol)))
+ l3_start = VLAN_HLEN;
+
+ skb_set_network_header(skb, l3_start);
if (ipv4) {
struct iphdr *ipv4h = ip_hdr(skb);
@@ -3329,7 +3333,7 @@ static int idpf_rx_rsc(struct idpf_rx_queue *rxq, struct sk_buff *skb,
skb_shinfo(skb)->gso_type = SKB_GSO_TCPV4;
/* Reset and set transport header offset in skb */
- skb_set_transport_header(skb, sizeof(struct iphdr));
+ skb_set_transport_header(skb, l3_start + sizeof(struct iphdr));
len = skb->len - skb_transport_offset(skb);
/* Compute the TCP pseudo header checksum*/
@@ -3339,7 +3343,7 @@ static int idpf_rx_rsc(struct idpf_rx_queue *rxq, struct sk_buff *skb,
struct ipv6hdr *ipv6h = ipv6_hdr(skb);
skb_shinfo(skb)->gso_type = SKB_GSO_TCPV6;
- skb_set_transport_header(skb, sizeof(struct ipv6hdr));
+ skb_set_transport_header(skb, l3_start + sizeof(struct ipv6hdr));
len = skb->len - skb_transport_offset(skb);
tcp_hdr(skb)->check =
~tcp_v6_check(len, &ipv6h->saddr, &ipv6h->daddr, 0);
--
2.47.1
next prev parent reply other threads:[~2026-09-08 21:45 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-09-08 21:44 [PATCH net 0/5][pull request] Intel Wired LAN Driver Updates 2026-09-08 (idpf, ice) Tony Nguyen
2026-09-08 21:44 ` [PATCH net 1/5] idpf: disable DIM work before freeing q_vectors Tony Nguyen
2026-09-08 21:44 ` [PATCH net 2/5] idpf: disable PTM on probe failure and on remove Tony Nguyen
2026-09-12 9:36 ` netdev-bot+sashiko
2026-09-08 21:44 ` Tony Nguyen [this message]
2026-09-08 21:44 ` [PATCH net 4/5] ice: add missing xa_destroy for sched_node_ids Tony Nguyen
2026-09-08 21:45 ` [PATCH net 5/5] eth: ice: don't dereference pointers from TP_printk() Tony Nguyen
2026-09-10 16:10 ` [PATCH net 0/5][pull request] Intel Wired LAN Driver Updates 2026-09-08 (idpf, ice) patchwork-bot+netdevbpf
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=20260908214502.528440-4-anthony.l.nguyen@intel.com \
--to=anthony.l.nguyen@intel.com \
--cc=Samuel.salin@intel.com \
--cc=ae878000@gmail.com \
--cc=aleksandr.loktionov@intel.com \
--cc=andrew+netdev@lunn.ch \
--cc=davem@davemloft.net \
--cc=edumazet@google.com \
--cc=emil.s.tantilov@intel.com \
--cc=jacob.e.keller@intel.com \
--cc=jbrandeb@kernel.org \
--cc=joshua.a.hay@intel.com \
--cc=kuba@kernel.org \
--cc=mhun512@gmail.com \
--cc=milena.olech@intel.com \
--cc=netdev@vger.kernel.org \
--cc=pabeni@redhat.com \
--cc=przemyslaw.kitszel@intel.com \
--cc=sridhar.samudrala@intel.com \
--cc=vadim.fedorenko@linux.dev \
--cc=willemb@google.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;
as well as URLs for NNTP newsgroup(s).