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 for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Date:   Thu, 20 Apr 2023 10:05:22 +0800
From:   "mengyuanlou@...-swift.com" <mengyuanlou@...-swift.com>
To:     Yunsheng Lin <linyunsheng@...wei.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



> 2023年4月19日 20:40,Yunsheng Lin <linyunsheng@...wei.com> 写道:
> 
> 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?

Not for VF/PF scene,I just want to know it cost。
The others will be removed。
> 
>> 
>> 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