All of lore.kernel.org
 help / color / mirror / Atom feed
From: Yoshihiro Shimoda <yoshihiro.shimoda.uh@renesas.com>
To: s.shtylyov@omp.ru, davem@davemloft.net, edumazet@google.com,
	kuba@kernel.org, pabeni@redhat.com
Cc: netdev@vger.kernel.org, linux-renesas-soc@vger.kernel.org,
	Yoshihiro Shimoda <yoshihiro.shimoda.uh@renesas.com>
Subject: [PATCH net-next v5 9/9] net: rswitch: Allow jumbo frames
Date: Fri,  8 Dec 2023 13:10:30 +0900	[thread overview]
Message-ID: <20231208041030.2497657-10-yoshihiro.shimoda.uh@renesas.com> (raw)
In-Reply-To: <20231208041030.2497657-1-yoshihiro.shimoda.uh@renesas.com>

Allow jumbo frames by changing maximum MTU size and number of RX queues.

Signed-off-by: Yoshihiro Shimoda <yoshihiro.shimoda.uh@renesas.com>
---
 drivers/net/ethernet/renesas/rswitch.c | 2 ++
 drivers/net/ethernet/renesas/rswitch.h | 3 ++-
 2 files changed, 4 insertions(+), 1 deletion(-)

diff --git a/drivers/net/ethernet/renesas/rswitch.c b/drivers/net/ethernet/renesas/rswitch.c
index d43f705f410b..dcab638c57fe 100644
--- a/drivers/net/ethernet/renesas/rswitch.c
+++ b/drivers/net/ethernet/renesas/rswitch.c
@@ -1883,6 +1883,8 @@ static int rswitch_device_alloc(struct rswitch_private *priv, unsigned int index
 	snprintf(ndev->name, IFNAMSIZ, "tsn%d", index);
 	ndev->netdev_ops = &rswitch_netdev_ops;
 	ndev->ethtool_ops = &rswitch_ethtool_ops;
+	ndev->max_mtu = RSWITCH_MAX_MTU;
+	ndev->min_mtu = ETH_MIN_MTU;
 
 	netif_napi_add(ndev, &rdev->napi, rswitch_poll);
 
diff --git a/drivers/net/ethernet/renesas/rswitch.h b/drivers/net/ethernet/renesas/rswitch.h
index 4252677e2a55..72e3ff596d31 100644
--- a/drivers/net/ethernet/renesas/rswitch.h
+++ b/drivers/net/ethernet/renesas/rswitch.h
@@ -26,9 +26,10 @@
 		else
 
 #define TX_RING_SIZE		1024
-#define RX_RING_SIZE		1024
+#define RX_RING_SIZE		4096
 #define TS_RING_SIZE		(TX_RING_SIZE * RSWITCH_NUM_PORTS)
 
+#define RSWITCH_MAX_MTU		9600
 #define RSWITCH_HEADROOM	(NET_SKB_PAD + NET_IP_ALIGN)
 #define RSWITCH_DESC_BUF_SIZE	2048
 #define RSWITCH_TAILROOM	SKB_DATA_ALIGN(sizeof(struct skb_shared_info))
-- 
2.25.1


  parent reply	other threads:[~2023-12-08  4:10 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-12-08  4:10 [PATCH net-next v5 0/9] net: rswitch: Add jumbo frames support Yoshihiro Shimoda
2023-12-08  4:10 ` [PATCH net-next v5 1/9] net: rswitch: Drop unused argument/return value Yoshihiro Shimoda
2023-12-08  4:10 ` [PATCH net-next v5 2/9] net: rswitch: Use unsigned int for desc related array index Yoshihiro Shimoda
2023-12-08  4:10 ` [PATCH net-next v5 3/9] net: rswitch: Use build_skb() for RX Yoshihiro Shimoda
2023-12-08  4:10 ` [PATCH net-next v5 4/9] net: rswitch: Add unmap_addrs instead of dma address in each desc Yoshihiro Shimoda
2023-12-08  4:10 ` [PATCH net-next v5 5/9] net: rswitch: Add a setting ext descriptor function Yoshihiro Shimoda
2023-12-08  4:10 ` [PATCH net-next v5 6/9] net: rswitch: Set GWMDNC register Yoshihiro Shimoda
2023-12-08  4:10 ` [PATCH net-next v5 7/9] net: rswitch: Add jumbo frames handling for RX Yoshihiro Shimoda
2023-12-08  4:10 ` [PATCH net-next v5 8/9] net: rswitch: Add jumbo frames handling for TX Yoshihiro Shimoda
2023-12-08  4:10 ` Yoshihiro Shimoda [this message]
2023-12-10 19:40 ` [PATCH net-next v5 0/9] net: rswitch: Add jumbo frames support patchwork-bot+netdevbpf

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=20231208041030.2497657-10-yoshihiro.shimoda.uh@renesas.com \
    --to=yoshihiro.shimoda.uh@renesas.com \
    --cc=davem@davemloft.net \
    --cc=edumazet@google.com \
    --cc=kuba@kernel.org \
    --cc=linux-renesas-soc@vger.kernel.org \
    --cc=netdev@vger.kernel.org \
    --cc=pabeni@redhat.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 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.