[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <e2e24b1b-a175-f0b4-2528-a09d786d380b@cogentembedded.com>
Date: Thu, 14 Nov 2019 23:38:08 +0300
From: Sergei Shtylyov <sergei.shtylyov@...entembedded.com>
To: Ulrich Hecht <uli+renesas@...nd.eu>,
linux-renesas-soc@...r.kernel.org
Cc: netdev@...r.kernel.org, davem@...emloft.net,
niklas.soderlund@...natech.se, wsa@...-dreams.de,
horms@...ge.net.au, magnus.damm@...il.com, geert@...der.be
Subject: Re: [PATCH v4] ravb: implement MTU change while device is up
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@...nd.eu>
Reviewed-by: Sergei Shtylyov <sergei.shtylyov@...entembedded.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
Powered by blists - more mailing lists