]> git.baikalelectronics.ru Git - kernel.git/commit
bonding: Always enable vlan tx offload
authorYueHaibing <yuehaibing@huawei.com>
Wed, 26 Jun 2019 08:08:44 +0000 (16:08 +0800)
committerDavid S. Miller <davem@davemloft.net>
Wed, 26 Jun 2019 15:56:35 +0000 (08:56 -0700)
commita21180d9081f49723121e33c4d83f6641803d411
tree18f76d8f92bcd7eebfcf6b1aeb6d493969ba244f
parentf369b9c60d3b25996a1687e4802148b9b491ad2c
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: 795d64acbbc9 ("bonding: propogate vlan_features to bonding master")
Suggested-by: Jiri Pirko <jiri@resnulli.us>
Signed-off-by: YueHaibing <yuehaibing@huawei.com>
Acked-by: Jiri Pirko <jiri@mellanox.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/bonding/bond_main.c