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: <29aad51d-0974-cb1c-4725-7ac6d8dc6402@ti.com>
Date:   Mon, 5 Oct 2020 13:28:11 +0300
From:   Grygorii Strashko <grygorii.strashko@...com>
To:     David Miller <davem@...emloft.net>
CC:     <netdev@...r.kernel.org>, <kuba@...nel.org>, <vigneshr@...com>,
        <nsekhar@...com>, <linux-kernel@...r.kernel.org>,
        <linux-omap@...r.kernel.org>, <m-karicheri2@...com>
Subject: Re: [PATCH net-next 7/8] net: ethernet: ti: am65-cpsw: prepare
 xmit/rx path for multi-port devices in mac-only mode



On 03/10/2020 05:09, David Miller wrote:
> From: Grygorii Strashko <grygorii.strashko@...com>
> Date: Thu, 1 Oct 2020 13:52:57 +0300
> 
>> This patch adds multi-port support to TI AM65x CPSW driver xmit/rx path in
>> preparation for adding support for multi-port devices, like Main CPSW0 on
>> K3 J721E SoC or future CPSW3g on K3 AM64x SoC.
>> Hence DMA channels are common/shared for all ext Ports and the RX/TX NAPI
>> and DMA processing going to be assigned to first netdev this patch:
>>   - ensures all RX descriptors fields are initialized;
>>   - adds synchronization for TX DMA push/pop operation (locking) as
>> Networking core is not enough any more;
>>   - updates TX bql processing for every packet in
>> am65_cpsw_nuss_tx_compl_packets() as every completed TX skb can have
>> different ndev assigned (come from different netdevs).
>>
>> Signed-off-by: Grygorii Strashko <grygorii.strashko@...com>
> 
> This locking is unnecessary in single-port non-shared DMA situations
> and therefore will impose unnecessary performance loss for basically
> all existing supported setups.
> 
> Please do this another way.

ok. I'll try add lock-less push/pop operations and use them for single-port

> 
> In fact, I would encourage you to find a way to avoid the new atomic
> operations even in multi-port configurations.

I'm not sure I how :( The DMA channels are shared, while net_device TX queues are separate.
I've thought - hence there is 8 TX DMA channels it should be possible to use qdisc,
like mqprio to segregate traffic between ports and TX DMA channels in which case no
blocking on tx dma locks should happen in .xmit().

Thank you.
-- 
Best regards,
grygorii

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ