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] [thread-next>] [day] [month] [year] [list]
Message-ID: <a0ea9822-695b-df3f-c95f-766ef5b3f6a9@huawei.com>
Date:   Wed, 19 Apr 2023 20:40:44 +0800
From:   Yunsheng Lin <linyunsheng@...wei.com>
To:     "mengyuanlou@...-swift.com" <mengyuanlou@...-swift.com>
CC:     <netdev@...r.kernel.org>, Jiawen Wu <jiawenwu@...stnetic.com>
Subject: Re: [PATCH net-next v2 1/5] net: wangxun: libwx add tx offload
 functions

On 2023/4/19 10:27, mengyuanlou@...-swift.com wrote:
> 
> 
>> 2023年4月18日 20:11,Yunsheng Lin <linyunsheng@...wei.com> 写道:
>>
>> On 2023/4/18 15:00, mengyuanlou@...-swift.com wrote:
>>>>> + goto exit;
>>>>> + case htons(ETH_P_ARP):
>>>>> + ptype = WX_PTYPE_L2_ARP;
>>>>> + goto exit;
>>>>> + default:
>>>>> + ptype = WX_PTYPE_L2_MAC;
>>>>
>>>> Is it ok to set ptype to WX_PTYPE_L2_MAC for first->protocol != ETH_P_IP
>>>> && first->protocol != ETH_P_IPV6? Does hw need to do checksum/tso or other thing
>>>> about those packet? if not, setting WX_PTYPE_L2_MAC seems enough?
>>>>
>>>    • The hardware needs to parse these packets with these ptype bits.
>>
>> What does hw do after parsing these packets? Updating some stats according to
>> the protocol type?
>> It seems really related to hw implementation, I am just curious if it is worth
>> the added overhead for driver.
>>
> For ETH_P_1588 hw will add timestamp for packets. 

I am not quite familiar with 1588, but does stack not set the SKBTX_HW_TSTAMP
in skb_shinfo(skb)->tx_flags when hw timestamp is required?

> The others are used to loopback scene, because hw can not parse l2 type.

I suppose that is for sriov loopback case where one function send packet
to another function under the same PF?

For the above case, hw just copy the packet type from tx desc to rx desc
without parsing the packet and assuming the driver always put the correct
packet type? I am not sure it is safe to assume that driver always put the
correct packet type, as the driver can be in a vm which may not be trustworthy?
If this happens, I am also not sure if this may cause problem for other
vm using different VF under the same PF?

> 
> According to chip designers, the others are not necessary.
> Does it really cost a a lot for driver? 
> Thanks.
> 
> 
> .
> 

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ