Skip to content

Commit 30d8177

Browse files
YueHaibingdavem330
authored andcommitted
bonding: Always enable vlan tx offload
We build vlan on top of bonding interface, which vlan offload is off, bond mode is 802.3ad (LACP) and xmit_hash_policy is BOND_XMIT_POLICY_ENCAP34. Because vlan tx offload is off, vlan tci is cleared and skb push the vlan header in validate_xmit_vlan() while sending from vlan devices. Then in bond_xmit_hash, __skb_flow_dissect() fails to get information from protocol headers encapsulated within vlan, because 'nhoff' is points to IP header, so bond hashing is based on layer 2 info, which fails to distribute packets across slaves. This patch always enable bonding's vlan tx offload, pass the vlan packets to the slave devices with vlan tci, let them to handle vlan implementation. Fixes: 278339a ("bonding: propogate vlan_features to bonding master") Suggested-by: Jiri Pirko <[email protected]> Signed-off-by: YueHaibing <[email protected]> Acked-by: Jiri Pirko <[email protected]> Signed-off-by: David S. Miller <[email protected]>
1 parent b8e8a86 commit 30d8177

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

drivers/net/bonding/bond_main.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4320,12 +4320,12 @@ void bond_setup(struct net_device *bond_dev)
43204320
bond_dev->features |= NETIF_F_NETNS_LOCAL;
43214321

43224322
bond_dev->hw_features = BOND_VLAN_FEATURES |
4323-
NETIF_F_HW_VLAN_CTAG_TX |
43244323
NETIF_F_HW_VLAN_CTAG_RX |
43254324
NETIF_F_HW_VLAN_CTAG_FILTER;
43264325

43274326
bond_dev->hw_features |= NETIF_F_GSO_ENCAP_ALL | NETIF_F_GSO_UDP_L4;
43284327
bond_dev->features |= bond_dev->hw_features;
4328+
bond_dev->features |= NETIF_F_HW_VLAN_CTAG_TX | NETIF_F_HW_VLAN_STAG_TX;
43294329
}
43304330

43314331
/* Destroy a bonding device.

0 commit comments

Comments
 (0)