lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <402f6b7a-779d-06f3-e248-386c06a3d97c@huawei.com>
Date:   Wed, 7 Aug 2019 09:46:07 +0800
From:   Yuehaibing <yuehaibing@...wei.com>
To:     Jay Vosburgh <jay.vosburgh@...onical.com>
CC:     <vfalico@...il.com>, <andy@...yhouse.net>, <davem@...emloft.net>,
        <jiri@...nulli.us>, <linux-kernel@...r.kernel.org>,
        <netdev@...r.kernel.org>
Subject: Re: [PATCH] bonding: Add vlan tx offload to hw_enc_features

On 2019/8/6 21:41, Jay Vosburgh wrote:
> YueHaibing <yuehaibing@...wei.com> wrote:
> 
>> As commit 30d8177e8ac7 ("bonding: Always enable vlan tx offload")
>> said, we should always enable bonding's vlan tx offload, pass the
>> vlan packets to the slave devices with vlan tci, let them to handle
>> vlan implementation.
>>
>> Now if encapsulation protocols like VXLAN is used, skb->encapsulation
>> may be set, then the packet is passed to vlan devicec which based on
> 
> 	Typo: "devicec"

oh, yes, thanks!

> 
>> bonding device. However in netif_skb_features(), the check of
>> hw_enc_features:
>>
>> 	 if (skb->encapsulation)
>>                 features &= dev->hw_enc_features;
>>
>> clears NETIF_F_HW_VLAN_CTAG_TX/NETIF_F_HW_VLAN_STAG_TX. This results
>> in same issue in commit 30d8177e8ac7 like this:
>>
>> vlan_dev_hard_start_xmit
>>  -->dev_queue_xmit
>>    -->validate_xmit_skb
>>      -->netif_skb_features //NETIF_F_HW_VLAN_CTAG_TX is cleared
>>      -->validate_xmit_vlan
>>        -->__vlan_hwaccel_push_inside //skb->tci is cleared
>> ...
>> --> bond_start_xmit
>>   --> bond_xmit_hash //BOND_XMIT_POLICY_ENCAP34
>>     --> __skb_flow_dissect // nhoff point to IP header
>>        -->  case htons(ETH_P_8021Q)
>>             // skb_vlan_tag_present is false, so
>>             vlan = __skb_header_pointer(skb, nhoff, sizeof(_vlan),
>>             //vlan point to ip header wrongly
>>
>> Signed-off-by: YueHaibing <yuehaibing@...wei.com>
> 
> 	Looks good to me; should this be tagged with
> 
> Fixes: 278339a42a1b ("bonding: propogate vlan_features to bonding master")
> 
> 	as 30d8177e8ac7 was?  If not, is there an appropriate commit id?

It seems the commit was:

Fixes: b2a103e6d0af ("bonding: convert to ndo_fix_features")

> 
> Acked-by: Jay Vosburgh <jay.vosburgh@...onical.com>


Thanks, will send v2.

> 
> 	-J
> 
>> ---
>> drivers/net/bonding/bond_main.c | 2 ++
>> 1 file changed, 2 insertions(+)
>>
>> diff --git a/drivers/net/bonding/bond_main.c b/drivers/net/bonding/bond_main.c
>> index 02fd782..931d9d9 100644
>> --- a/drivers/net/bonding/bond_main.c
>> +++ b/drivers/net/bonding/bond_main.c
>> @@ -1126,6 +1126,8 @@ static void bond_compute_features(struct bonding *bond)
>> done:
>> 	bond_dev->vlan_features = vlan_features;
>> 	bond_dev->hw_enc_features = enc_features | NETIF_F_GSO_ENCAP_ALL |
>> +				    NETIF_F_HW_VLAN_CTAG_TX |
>> +				    NETIF_F_HW_VLAN_STAG_TX |
>> 				    NETIF_F_GSO_UDP_L4;
>> 	bond_dev->mpls_features = mpls_features;
>> 	bond_dev->gso_max_segs = gso_max_segs;
>> -- 
>> 2.7.4
> 
> ---
> 	-Jay Vosburgh, jay.vosburgh@...onical.com
> 
> .
> 

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ