]> git.ipfire.org Git - thirdparty/kernel/stable.git/commitdiff
net: libwx: fix FDIR ATR queue mismatch for software VLAN packets
authorJiawen Wu <jiawenwu@trustnetic.com>
Fri, 24 Jul 2026 07:46:57 +0000 (15:46 +0800)
committerPaolo Abeni <pabeni@redhat.com>
Thu, 30 Jul 2026 10:43:52 +0000 (12:43 +0200)
When TX VLAN hardware offload is disabled, VLAN tags are embedded in
the packet payload (software VLAN). Previously, the driver failed to
set the WX_TX_FLAGS_SW_VLAN flag for these packets during transmission.

This missing flag caused the txgbe FDIR ATR logic to fall through to the
default hash calculation path. This resulted in asymmetric hash values
for Tx and Rx flows, preventing return packets from being steered to the
same queue as the transmit packets.

Fix this by detecting software VLANs via eth_type_vlan(skb->protocol)
and setting WX_TX_FLAGS_SW_VLAN. This ensures the ATR feature selects
the correct hashing algorithm to maintain Tx/Rx queue symmetry.

Fixes: b501d261a5b3 ("net: txgbe: add FDIR ATR support")
Signed-off-by: Jiawen Wu <jiawenwu@trustnetic.com>
Reviewed-by: Simon Horman <horms@kernel.org>
Link: https://patch.msgid.link/0879DA38A8E32701+20260724074657.10773-1-jiawenwu@trustnetic.com
Signed-off-by: Paolo Abeni <pabeni@redhat.com>
drivers/net/ethernet/wangxun/libwx/wx_lib.c

index 814d88d2aee4874236d0df69dc550d9a28b04245..5d99e870de5ef2a3c6738d791136728ba230360b 100644 (file)
@@ -1606,6 +1606,8 @@ static netdev_tx_t wx_xmit_frame_ring(struct sk_buff *skb,
        if (skb_vlan_tag_present(skb)) {
                tx_flags |= skb_vlan_tag_get(skb) << WX_TX_FLAGS_VLAN_SHIFT;
                tx_flags |= WX_TX_FLAGS_HW_VLAN;
+       } else if (eth_type_vlan(skb->protocol)) {
+               tx_flags |= WX_TX_FLAGS_SW_VLAN;
        }
 
        if (unlikely(skb_shinfo(skb)->tx_flags & SKBTX_HW_TSTAMP) &&