All of lore.kernel.org
 help / color / mirror / Atom feed
From: Lorenzo Bianconi <lorenzo@kernel.org>
To: Jakub Kicinski <kuba@kernel.org>
Cc: Eric Dumazet <edumazet@google.com>,
	Andrew Lunn <andrew+netdev@lunn.ch>,
	"David S. Miller" <davem@davemloft.net>,
	Paolo Abeni <pabeni@redhat.com>,
	linux-arm-kernel@lists.infradead.org,
	linux-mediatek@lists.infradead.org, netdev@vger.kernel.org
Subject: Re: [PATCH net-next] net: airoha: Add TCP LRO support
Date: Fri, 31 Oct 2025 09:42:15 +0100	[thread overview]
Message-ID: <aQR2Z51Q45Zl99m_@lore-desk> (raw)
In-Reply-To: <aFATYATliil63D5R@lore-desk>

[-- Attachment #1: Type: text/plain, Size: 2089 bytes --]

> > On Thu, 12 Jun 2025 23:02:30 +0200 Lorenzo Bianconi wrote:
> > > > I'm not Eric but FWIW 256B is not going to help much. It's best to keep
> > > > the len / truesize ratio above 50%, so with 32k buffers we're talking
> > > > about copying multiple frames.  
> > > 
> > > what I mean here is reallocate the skb if the true size is small (e.g. below
> > > 256B) in order to avoid consuming the high order page from the page_pool. Maybe
> > > we can avoid it if reducing the page order to 2 for LRO queues provide
> > > comparable results.
> > 
> > Hm, truesize is the buffer size, right? If the driver allocated n bytes
> > of memory for packets it sent up the stack, the truesizes of the skbs
> > it generated must add up to approximately n bytes.
> 
> With 'truesize' I am referring to the real data size contained in the x-order
> page returned by the hw. If this size is small, I was thinking to just allocate
> a skb for it, copy the data from the x-order page into it and re-insert the
> x-order page into the page_pool running page_pool_put_full_page().
> Let me do some tests with order-2 page to see if the GRO can compensate the
> reduced page size.

Sorry for the late reply about this item.
I carried out some comparison tests between GRO-only and GRO+LRO with order-2
pages [0]. The system is using a 2.5Gbps link. The device is receiving a single TCP
stream. MTU is set to 1500B.

- GRO only:			~1.6Gbps
- GRO+LRO (order-2 pages):	~2.1Gbps

In both cases we can't reach the line-rate. Do you think the difference can justify
the hw LRO support? Thanks in advance.

Regards,
Lorenzo

[0] the hw LRO requires contiguous memory pages to work. I reduced the size to
order-2 from order-5 (original implementation).

> 
> Regards,
> Lorenzo
> 
> > 
> > So if the HW places one aggregation session per buffer, and the buffer
> > is 32kB -- to avoid mem use ratio < 25% you'd need to copy all sessions
> > smaller than 8kB?
> > 
> > If I'm not making sense - just ignore, I haven't looked at the rest of
> > the driver :)
> > 



[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 228 bytes --]

  reply	other threads:[~2025-10-31  8:42 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-06-10  9:12 [PATCH net-next] net: airoha: Add TCP LRO support Lorenzo Bianconi
2025-06-10  9:34 ` Eric Dumazet
2025-06-10 13:39   ` Lorenzo Bianconi
2025-06-12  0:36     ` Jakub Kicinski
2025-06-12 21:02       ` Lorenzo Bianconi
2025-06-12 22:57         ` Jakub Kicinski
2025-06-16 12:51           ` Lorenzo Bianconi
2025-10-31  8:42             ` Lorenzo Bianconi [this message]
2025-10-31 18:16               ` Jakub Kicinski
2025-11-07 13:30                 ` Lorenzo Bianconi
2025-11-08  1:11                   ` 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=aQR2Z51Q45Zl99m_@lore-desk \
    --to=lorenzo@kernel.org \
    --cc=andrew+netdev@lunn.ch \
    --cc=davem@davemloft.net \
    --cc=edumazet@google.com \
    --cc=kuba@kernel.org \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-mediatek@lists.infradead.org \
    --cc=netdev@vger.kernel.org \
    --cc=pabeni@redhat.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.