From: Sergei Shtylyov <sergei.shtylyov@cogentembedded.com>
To: Ulrich Hecht <uli+renesas@fpond.eu>, linux-renesas-soc@vger.kernel.org
Cc: netdev@vger.kernel.org, davem@davemloft.net,
niklas.soderlund@ragnatech.se, wsa@the-dreams.de,
horms@verge.net.au, magnus.damm@gmail.com, geert@glider.be
Subject: Re: [PATCH v4] ravb: implement MTU change while device is up
Date: Thu, 14 Nov 2019 23:38:08 +0300 [thread overview]
Message-ID: <e2e24b1b-a175-f0b4-2528-a09d786d380b@cogentembedded.com> (raw)
In-Reply-To: <20191114014949.31057-1-uli+renesas@fpond.eu>
Hello!
On 11/14/2019 04:49 AM, Ulrich Hecht wrote:
> Pre-allocates buffers sufficient for the maximum supported MTU (2026) in
> order to eliminate the possibility of resource exhaustion when changing the
> MTU while the device is up.
>
> Signed-off-by: Ulrich Hecht <uli+renesas@fpond.eu>
Reviewed-by: Sergei Shtylyov <sergei.shtylyov@cogentembedded.com>
> ---
> drivers/net/ethernet/renesas/ravb.h | 3 ++-
> drivers/net/ethernet/renesas/ravb_main.c | 26 +++++++++++++-----------
> 2 files changed, 16 insertions(+), 13 deletions(-)
>
> diff --git a/drivers/net/ethernet/renesas/ravb.h b/drivers/net/ethernet/renesas/ravb.h
> index a9c89d5d8898..9f88b5db4f89 100644
> --- a/drivers/net/ethernet/renesas/ravb.h
> +++ b/drivers/net/ethernet/renesas/ravb.h
> @@ -955,6 +955,8 @@ enum RAVB_QUEUE {
> #define NUM_RX_QUEUE 2
> #define NUM_TX_QUEUE 2
>
> +#define RX_BUF_SZ (2048 - ETH_FCS_LEN + sizeof(__sum16))
That's smart but won't scale iff we decide to support e.g. Jumbo frames (the real AVB h/w
supports up to 128 KiB frames.
[...]
MBR, Sergei
next prev parent reply other threads:[~2019-11-14 20:38 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-10-16 14:30 [PATCH] clocksource/drivers/sh_mtu2: Do not loop using platform_get_irq_by_name() Geert Uytterhoeven
2019-10-16 15:06 ` Daniel Lezcano
2019-11-14 1:49 ` [PATCH v4] ravb: implement MTU change while device is up Ulrich Hecht
2019-11-14 10:26 ` Geert Uytterhoeven
2019-11-14 20:38 ` Sergei Shtylyov [this message]
2019-11-15 2:05 ` David Miller
2019-11-18 9:20 ` Patchwork summary for: linux-renesas-soc patchwork-bot+linux-renesas-soc
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=e2e24b1b-a175-f0b4-2528-a09d786d380b@cogentembedded.com \
--to=sergei.shtylyov@cogentembedded.com \
--cc=davem@davemloft.net \
--cc=geert@glider.be \
--cc=horms@verge.net.au \
--cc=linux-renesas-soc@vger.kernel.org \
--cc=magnus.damm@gmail.com \
--cc=netdev@vger.kernel.org \
--cc=niklas.soderlund@ragnatech.se \
--cc=uli+renesas@fpond.eu \
--cc=wsa@the-dreams.de \
/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).