]> 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)
commitf9c7694a0ca5a1c0e8a985c55f440c3f64f28ad9
tree18f76d8f92bcd7eebfcf6b1aeb6d493969ba244f
parent4446245c41bb95434928d32073f4cb5cbe3d7512
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