Re: [Intel-wired-lan] [PATCH iwl-net] idpf: account for VLAN header when parsing RSC packet header
"Loktionov, Aleksandr" <[email protected]> Thu, 30 Jul 2026 13:53:21 +0000
| Newsgroups | org.osuosl.intel-wired-lan,org.kernel.vger.netdev |
|---|---|
| Message-ID | <IA3PR11MB89867614C1641C49AAF96AE9E5C92@IA3PR11MB8986.namprd11.prod.outlook.com> |
> -----Original Message----- > From: Intel-wired-lan <[email protected]> On Behalf > Of Joshua Hay > Sent: Tuesday, July 28, 2026 1:09 AM > To: [email protected] > Cc: [email protected] > Subject: [Intel-wired-lan] [PATCH iwl-net] idpf: account for VLAN > header when parsing RSC packet header >=20 > 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. >=20 > We only need to worry about one VLAN header since Rx packets with > multiple VLAN headers are not candidates for RSC. >=20 > Fixes: 3a8845af66edb ("idpf: add RX splitq napi poll support") > Signed-off-by: Joshua Hay <[email protected]> > Reviewed-by: Emil Tantilov <[email protected]> > --- > drivers/net/ethernet/intel/idpf/idpf_txrx.c | 10 +++++++--- > 1 file changed, 7 insertions(+), 3 deletions(-) >=20 > diff --git a/drivers/net/ethernet/intel/idpf/idpf_txrx.c > b/drivers/net/ethernet/intel/idpf/idpf_txrx.c > index c724d429a7aa..70553f64f770 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 =3D 0; > bool ipv4, ipv6; > int len; >=20 > @@ -3321,7 +3322,10 @@ static int idpf_rx_rsc(struct idpf_rx_queue > *rxq, struct sk_buff *skb, > NAPI_GRO_CB(skb)->count =3D rsc_segments; > skb_shinfo(skb)->gso_size =3D rsc_seg_len; >=20 > - skb_reset_network_header(skb); > + if (unlikely(eth_type_vlan(skb->protocol))) > + l3_start =3D VLAN_HLEN; > + > + skb_set_network_header(skb, l3_start); >=20 > if (ipv4) { > struct iphdr *ipv4h =3D 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 =3D SKB_GSO_TCPV4; >=20 > /* 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 =3D skb->len - skb_transport_offset(skb); >=20 > /* 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 =3D ipv6_hdr(skb); >=20 > skb_shinfo(skb)->gso_type =3D SKB_GSO_TCPV6; > - skb_set_transport_header(skb, sizeof(struct ipv6hdr)); > + skb_set_transport_header(skb, l3_start + sizeof(struct > ipv6hdr)); > len =3D skb->len - skb_transport_offset(skb); > tcp_hdr(skb)->check =3D > ~tcp_v6_check(len, &ipv6h->saddr, &ipv6h->daddr, > 0); > -- > 2.39.2 Reviewed-by: Aleksandr Loktionov <[email protected]>