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: <df00b06a-d33b-4df8-8f44-2b7f659cb2f9@quicinc.com>
Date: Mon, 22 Jul 2024 14:54:24 +0800
From: Baochen Qiang <quic_bqiang@...cinc.com>
To: Jeff Johnson <quic_jjohnson@...cinc.com>, <ath12k@...ts.infradead.org>
CC: <linux-wireless@...r.kernel.org>, <kernel@...cinc.com>,
        <netdev@...r.kernel.org>
Subject: Re: [PATCH] wifi: ath12k: use 128 bytes aligned iova in transmit path
 for WCN7850



On 7/19/2024 10:10 PM, Jeff Johnson wrote:
> On 7/14/2024 7:38 PM, Baochen Qiang wrote:
>> In transmit path, it is likely that the iova is not aligned to PCIe TLP
>> max payload size, which is 128 for WCN7850. Normally in such cases hardware
>> is expected to split the packet into several parts in a manner such that
>> they, other than the first one, have aligned iova. However due to hardware
>> limitations, WCN7850 does not behave like that properly with some specific
>> unaligned iova in transmit path. This easily results in target hang in a
>> KPI transmit test: packet send/receive failure, WMI command send timeout
>> etc. Also fatal error seen in PCIe level:
>>
>> 	...
>> 	Capabilities: ...
>> 		...
>> 		DevSta: ... FatalErr+ ...
>> 		...
>> 	...
>>
>> Work around this by manually moving/reallocating payload buffer such that
>> we can map it to a 128 bytes aligned iova. The moving requires sufficient
>> head room or tail room in skb: for the former we can do ourselves a favor
>> by asking some extra bytes when registering with mac80211, while for the
>> latter we can do nothing.
>>
>> Moving/reallocating buffer consumes additional CPU cycles, but the good news
>> is that an aligned iova increases PCIe efficiency. In my tests on some X86
>> platforms the KPI results are almost consistent.
>>
>> Since this is seen only with WCN7850, add a new hardware parameter to
>> differentiate from others.
> 
> I asked for expert opinion on this patch and received the following response.
> Baochen, can you take a look at this suggestion?
> 
>> Aligning headers is sometimes done, but it appears the driver
>> doesn't support scatter gather? I think the author may want to advertise
right, ath12k does not support SG currently.

>> scatter and linearize manually in the driver, to a correct offset.
is there an existing skb API or API combinations which can do that for me? I checked __skb_linearize() and it does not take an 'offset' argument.

>> Because now core is linearizing the skb in validate_xmit_skb()
>> and then the driver moves it a second time..
> 
> 

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ