linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Grygorii Strashko <grygorii.strashko@ti.com>
To: David Miller <davem@davemloft.net>
Cc: <netdev@vger.kernel.org>, <kuba@kernel.org>, <vigneshr@ti.com>,
	<nsekhar@ti.com>, <linux-kernel@vger.kernel.org>,
	<linux-omap@vger.kernel.org>, <m-karicheri2@ti.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
Date: Mon, 5 Oct 2020 13:28:11 +0300	[thread overview]
Message-ID: <29aad51d-0974-cb1c-4725-7ac6d8dc6402@ti.com> (raw)
In-Reply-To: <20201002.190931.2160541172091214230.davem@davemloft.net>



On 03/10/2020 05:09, David Miller wrote:
> From: Grygorii Strashko <grygorii.strashko@ti.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@ti.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

  reply	other threads:[~2020-10-05 10:28 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-10-01 10:52 [PATCH net-next 0/8] net: ethernet: ti: am65-cpsw: add multi port support in mac-only mode Grygorii Strashko
2020-10-01 10:52 ` [PATCH net-next 1/8] net: ethernet: ti: am65-cpsw: move ale selection in pdata Grygorii Strashko
2020-10-01 10:52 ` [PATCH net-next 2/8] net: ethernet: ti: am65-cpsw: move free desc queue mode " Grygorii Strashko
2020-10-01 10:52 ` [PATCH net-next 3/8] net: ethernet: ti: am65-cpsw: use cppi5_desc_is_tdcm() Grygorii Strashko
2020-10-01 10:52 ` [PATCH net-next 4/8] net: ethernet: ti: cpsw_ale: add cpsw_ale_vlan_del_modify() Grygorii Strashko
2020-10-01 10:52 ` [PATCH net-next 5/8] net: ethernet: ti: am65-cpsw: fix vlan offload for multi mac mode Grygorii Strashko
2020-10-01 10:52 ` [PATCH net-next 6/8] net: ethernet: ti: am65-cpsw: keep active if cpts enabled Grygorii Strashko
2020-10-01 10:52 ` [PATCH net-next 7/8] net: ethernet: ti: am65-cpsw: prepare xmit/rx path for multi-port devices in mac-only mode Grygorii Strashko
2020-10-03  2:09   ` David Miller
2020-10-05 10:28     ` Grygorii Strashko [this message]
2020-10-01 10:52 ` [PATCH net-next 8/8] net: ethernet: ti: am65-cpsw: add multi port support " Grygorii Strashko
2020-10-01 23:08 ` [PATCH net-next 0/8] " Jakub Kicinski
2020-10-02  9:56   ` Grygorii Strashko
2020-10-02 23:04     ` Jakub Kicinski
2020-10-02 23:07       ` Jakub Kicinski
2020-10-05 10:16         ` Grygorii Strashko

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=29aad51d-0974-cb1c-4725-7ac6d8dc6402@ti.com \
    --to=grygorii.strashko@ti.com \
    --cc=davem@davemloft.net \
    --cc=kuba@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-omap@vger.kernel.org \
    --cc=m-karicheri2@ti.com \
    --cc=netdev@vger.kernel.org \
    --cc=nsekhar@ti.com \
    --cc=vigneshr@ti.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).