All of lore.kernel.org
 help / color / mirror / Atom feed
From: Gal Pressman <gal@nvidia.com>
To: Shay Agroskin <shayagr@amazon.com>, Jakub Kicinski <kuba@kernel.org>
Cc: David Miller <davem@davemloft.net>,
	netdev@vger.kernel.org, "Woodhouse, David" <dwmw@amazon.com>,
	"Machulsky, Zorik" <zorik@amazon.com>,
	"Matushevsky, Alexander" <matua@amazon.com>,
	Saeed Bshara <saeedb@amazon.com>, "Wilson, Matt" <msw@amazon.com>,
	"Liguori, Anthony" <aliguori@amazon.com>,
	"Bshara, Nafea" <nafea@amazon.com>,
	"Belgazal, Netanel" <netanel@amazon.com>,
	"Saidi, Ali" <alisaidi@amazon.com>,
	"Herrenschmidt, Benjamin" <benh@amazon.com>,
	"Kiyanovski, Arthur" <akiyano@amazon.com>,
	"Dagan, Noam" <ndagan@amazon.com>,
	"Arinzon, David" <darinzon@amazon.com>,
	"Itzko, Shahar" <itzko@amazon.com>,
	"Abboud, Osama" <osamaabb@amazon.com>
Subject: Re: [PATCH v4 net-next 1/5] ethtool: Add support for configuring tx_push_buf_len
Date: Thu, 16 Mar 2023 13:57:26 +0200	[thread overview]
Message-ID: <30cb3990-80ce-ca07-6d73-cdc00d0ad7b8@nvidia.com> (raw)
In-Reply-To: <pj41zlbkkv2v6z.fsf@u570694869fb251.ant.amazon.com>

On 14/03/2023 17:38, Shay Agroskin wrote:
> 
> Jakub Kicinski <kuba@kernel.org> writes:
> 
>> CAUTION: This email originated from outside of the organization. Do
>> not click links or open attachments unless you can confirm the sender
>> and know the content is safe.
>>
>>
>>
>> On Sun, 12 Mar 2023 14:41:39 +0200 Gal Pressman wrote:
>>> On 10/03/2023 8:53, Jakub Kicinski wrote:
>>> > On Thu, 9 Mar 2023 19:15:43 +0200 Gal Pressman wrote:
>>> >> I know Jakub prefers the new parameter, but the description >> of
>>> this
>>> >> still sounds extremely similar to TX copybreak to me..
>>> >> TX copybreak was traditionally used to copy packets to >>
>>> preallocated DMA
>>> >> buffers, but this could be implemented as copying the packet >> to
>>> the
>>> >> (preallocated) WQE's inline part. That usually means DMA >>
>>> memory, but
>>> >> could also be device memory in this ENA LLQ case.
>>> >>
>>> >> Are we drawing a line that TX copybreak is the threshold for >>
>>> DMA memory
>>> >> and tx_push_buf_len is the threshold for device memory?
>>> >
>>> > Pretty much, yes. Not an amazing distinction but since TX >
>>> copybreak can
>>> > already mean two different things (inline or DMA buf) I'd err > on
>>> > the side of not overloading it with another one.
>>>
>>> Can we document that please?
>>
>> Shay, could you add a paragraph in the docs regarding copybreak in v5?
> 
> Document that tx_copybreak defines the threshold below which the packet
> is copied into a preallocated DMA'ed buffer and that tx_push_buf defines
> the same but for device memory?
> Are we sure we want to make this distinction ? While the meaning of both
> params can overlap in their current definition, the motivation to use
> them is pretty different.
> A driver can implement both for different purposes (and still copy both
> into the device).

I don't understand what it means to implement both.

It's confusing because both parameters result in skipping the DMA map
operation, but their usage motivation is different?
What are we instructing our customers? Use copybreak when your iommu is
slow, but when should they use this new parameter?

IMO, a reasonable way to use both would be to only account for the
tx_push_buf_len when tx_push is enabled, otherwise use copybreak.

  reply	other threads:[~2023-03-16 11:57 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-03-09 13:13 [PATCH v4 net-next 0/5] Add tx push buf len param to ethtool Shay Agroskin
2023-03-09 13:13 ` [PATCH v4 net-next 1/5] ethtool: Add support for configuring tx_push_buf_len Shay Agroskin
2023-03-09 16:25   ` Simon Horman
2023-03-09 17:15   ` Gal Pressman
2023-03-10  6:53     ` Jakub Kicinski
2023-03-12 12:41       ` Gal Pressman
2023-03-13 19:09         ` Jakub Kicinski
2023-03-14 15:38           ` Shay Agroskin
2023-03-16 11:57             ` Gal Pressman [this message]
2023-03-16 20:42               ` Jakub Kicinski
2023-03-14 15:46     ` Shay Agroskin
2023-03-09 13:13 ` [PATCH v4 net-next 2/5] net: ena: Make few cosmetic preparations to support large LLQ Shay Agroskin
2023-03-09 16:28   ` Simon Horman
2023-03-09 13:13 ` [PATCH v4 net-next 3/5] net: ena: Add an option to configure large LLQ headers Shay Agroskin
2023-03-09 16:28   ` Simon Horman
2023-03-09 13:13 ` [PATCH v4 net-next 4/5] net: ena: Recalculate TX state variables every device reset Shay Agroskin
2023-03-09 13:13 ` [PATCH v4 net-next 5/5] net: ena: Add support to changing tx_push_buf_len Shay Agroskin
2023-03-09 16:28   ` Simon Horman
2023-03-10  6:54   ` Jakub Kicinski

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=30cb3990-80ce-ca07-6d73-cdc00d0ad7b8@nvidia.com \
    --to=gal@nvidia.com \
    --cc=akiyano@amazon.com \
    --cc=aliguori@amazon.com \
    --cc=alisaidi@amazon.com \
    --cc=benh@amazon.com \
    --cc=darinzon@amazon.com \
    --cc=davem@davemloft.net \
    --cc=dwmw@amazon.com \
    --cc=itzko@amazon.com \
    --cc=kuba@kernel.org \
    --cc=matua@amazon.com \
    --cc=msw@amazon.com \
    --cc=nafea@amazon.com \
    --cc=ndagan@amazon.com \
    --cc=netanel@amazon.com \
    --cc=netdev@vger.kernel.org \
    --cc=osamaabb@amazon.com \
    --cc=saeedb@amazon.com \
    --cc=shayagr@amazon.com \
    --cc=zorik@amazon.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.