diff options
author | 2023-12-08 13:10:30 +0900 | |
---|---|---|
committer | 2023-12-10 19:31:42 +0000 | |
commit | c71517fe7353d2cbfbf2e305b282bf23c1750e29 (patch) | |
tree | 147fdabd792f3ac1cf8f093bb97904337b910dd2 /drivers/net/ethernet/renesas | |
parent | net: rswitch: Add jumbo frames handling for TX (diff) | |
download | linux-c71517fe7353d2cbfbf2e305b282bf23c1750e29.tar.gz linux-c71517fe7353d2cbfbf2e305b282bf23c1750e29.tar.bz2 linux-c71517fe7353d2cbfbf2e305b282bf23c1750e29.zip |
net: rswitch: Allow jumbo frames
Allow jumbo frames by changing maximum MTU size and number of RX queues.
Signed-off-by: Yoshihiro Shimoda <yoshihiro.shimoda.uh@renesas.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/ethernet/renesas')
-rw-r--r-- | drivers/net/ethernet/renesas/rswitch.c | 2 | ||||
-rw-r--r-- | drivers/net/ethernet/renesas/rswitch.h | 3 |
2 files changed, 4 insertions, 1 deletions
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)) |