net: rswitch: Allow jumbo frames
authorYoshihiro Shimoda <yoshihiro.shimoda.uh@renesas.com>
Fri, 8 Dec 2023 04:10:30 +0000 (13:10 +0900)
committerDavid S. Miller <davem@davemloft.net>
Sun, 10 Dec 2023 19:31:42 +0000 (19:31 +0000)
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>
drivers/net/ethernet/renesas/rswitch.c
drivers/net/ethernet/renesas/rswitch.h

index d43f705f410b318bed1d577db42f00beb750f437..dcab638c57fe829d85a794942dfd1726951249b2 100644 (file)
@@ -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);
 
index 4252677e2a55432b4f60276812f45782a72a0d37..72e3ff596d3183fa6512516907d485937aee316c 100644 (file)
                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))