netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Paul Barker <paul.barker.ct@bp.renesas.com>
To: Andrew Lunn <andrew@lunn.ch>
Cc: "Sergey Shtylyov" <s.shtylyov@omp.ru>,
	"David S. Miller" <davem@davemloft.net>,
	"Eric Dumazet" <edumazet@google.com>,
	"Jakub Kicinski" <kuba@kernel.org>,
	"Paolo Abeni" <pabeni@redhat.com>,
	"Niklas Söderlund" <niklas.soderlund+renesas@ragnatech.se>,
	"Biju Das" <biju.das.jz@bp.renesas.com>,
	"Claudiu Beznea" <claudiu.beznea.uj@bp.renesas.com>,
	"Lad Prabhakar" <prabhakar.mahadev-lad.rj@bp.renesas.com>,
	"Mitsuhiro Kimura" <mitsuhiro.kimura.kc@renesas.com>,
	netdev@vger.kernel.org, linux-renesas-soc@vger.kernel.org,
	linux-kernel@vger.kernel.org
Subject: Re: [net-next PATCH 2/2] net: ravb: Fix R-Car RX frame size limit
Date: Thu, 15 Aug 2024 10:10:21 +0100	[thread overview]
Message-ID: <4e1034fb-daf6-4bdb-80d2-62536394fc2d@bp.renesas.com> (raw)
In-Reply-To: <d5e2d054-e309-4382-a211-9fa9a0e83783@lunn.ch>


[-- Attachment #1.1.1: Type: text/plain, Size: 1850 bytes --]

On 13/08/2024 15:06, Andrew Lunn wrote:
>> Apologies, my response here is abysmally late due to illness, other
>> priorities and then the loss of my main dev box.
> 
> Not a problem, life happens.
> 
>> As you've said, a number of devices do not limit received packet size to
>> the MTU. There are many applications, other than a gateway, where using
>> jumbo packets in even just one direction would be beneficial. For
>> example if an application needs to receive large amounts of data but
>> only needs to send back control and acknowledgement messages. I think we
>> should support this where possible. This is the thought behind the first
>> patch in this series as the GbEth IP present in the RZ/G2L and other
>> Renesas SoCs has a very asymmetric capability (it can receive 8000 byte
>> frames but only transmit 1522 byte frames).
>>
>> If we explicitly do not wish to support this, that restriction should be
>> documented and then (maybe over time) handled uniformly for all network
>> drivers.
>>
>> I'm planning to submit v2 of this series shortly.
> 
> Does the hardware support scatter/gather? How does supporting jumbo
> receive affect memory usage? Can you give the hardware a number of 2K
> buffers, and it will use one for a typical packet, and 4 for a jumbo
> frame?

This is exactly what happens. After recent changes [1], we use 2kB RX
buffers and an 8kB maximum RX frame size for the GbEth IP. The hardware
will split the received frame over one or more buffers as needed. As we
would allocate a ring of 2kB buffers in any case, supporting jumbo
packets doesn't cause any increase in memory usage or in CPU time spent
in memory management.

[1]: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=966726324b7b14009216fda33b47e0bc003944c6

Thanks,

-- 
Paul Barker

[-- Attachment #1.1.2: OpenPGP public key --]
[-- Type: application/pgp-keys, Size: 3577 bytes --]

[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 236 bytes --]

  reply	other threads:[~2024-08-15  9:10 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-06-15 10:30 [net-next PATCH 0/2] Fix maximum TX/RX frame sizes in ravb driver Paul Barker
2024-06-15 10:30 ` [net-next PATCH 1/2] net: ravb: Fix maximum MTU for GbEth devices Paul Barker
2024-06-15 12:38   ` Niklas Söderlund
2024-06-17 19:38   ` Sergey Shtylyov
2024-06-17 19:45     ` Sergey Shtylyov
2024-08-13 13:37     ` Paul Barker
2024-06-18  0:07   ` Jakub Kicinski
2024-08-13 12:53     ` Paul Barker
2024-06-15 10:30 ` [net-next PATCH 2/2] net: ravb: Fix R-Car RX frame size limit Paul Barker
2024-06-15 13:04   ` Niklas Söderlund
2024-06-17 14:20     ` Paul Barker
2024-06-16  1:23   ` Andrew Lunn
2024-06-17 14:03     ` Paul Barker
2024-06-17 14:29       ` Andrew Lunn
2024-08-13 13:29         ` Paul Barker
2024-08-13 14:06           ` Andrew Lunn
2024-08-15  9:10             ` Paul Barker [this message]
2024-06-17 20:18   ` Sergey Shtylyov
2024-06-16 19:22 ` [net-next PATCH 0/2] Fix maximum TX/RX frame sizes in ravb driver Sergey Shtylyov

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=4e1034fb-daf6-4bdb-80d2-62536394fc2d@bp.renesas.com \
    --to=paul.barker.ct@bp.renesas.com \
    --cc=andrew@lunn.ch \
    --cc=biju.das.jz@bp.renesas.com \
    --cc=claudiu.beznea.uj@bp.renesas.com \
    --cc=davem@davemloft.net \
    --cc=edumazet@google.com \
    --cc=kuba@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-renesas-soc@vger.kernel.org \
    --cc=mitsuhiro.kimura.kc@renesas.com \
    --cc=netdev@vger.kernel.org \
    --cc=niklas.soderlund+renesas@ragnatech.se \
    --cc=pabeni@redhat.com \
    --cc=prabhakar.mahadev-lad.rj@bp.renesas.com \
    --cc=s.shtylyov@omp.ru \
    /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).