Skip to content
Snippets Groups Projects
  • YueHaibing's avatar
    8dc57ea2
    bonding: Always enable vlan tx offload · 8dc57ea2
    YueHaibing authored
    
    commit 30d8177e upstream.
    
    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: 278339a4 ("bonding: propogate vlan_features to bonding master")
    Suggested-by: default avatarJiri Pirko <jiri@resnulli.us>
    Signed-off-by: default avatarYueHaibing <yuehaibing@huawei.com>
    Acked-by: default avatarJiri Pirko <jiri@mellanox.com>
    Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
    [bwh: Backported to 3.16: adjust context]
    Signed-off-by: default avatarBen Hutchings <ben@decadent.org.uk>
    8dc57ea2
    History
    bonding: Always enable vlan tx offload
    YueHaibing authored
    
    commit 30d8177e upstream.
    
    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: 278339a4 ("bonding: propogate vlan_features to bonding master")
    Suggested-by: default avatarJiri Pirko <jiri@resnulli.us>
    Signed-off-by: default avatarYueHaibing <yuehaibing@huawei.com>
    Acked-by: default avatarJiri Pirko <jiri@mellanox.com>
    Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
    [bwh: Backported to 3.16: adjust context]
    Signed-off-by: default avatarBen Hutchings <ben@decadent.org.uk>
Code owners
Assign users and groups as approvers for specific file changes. Learn more.