Commit c71517fe authored by Yoshihiro Shimoda's avatar Yoshihiro Shimoda Committed by David S. Miller

net: rswitch: Allow jumbo frames

Allow jumbo frames by changing maximum MTU size and number of RX queues.
Signed-off-by: default avatarYoshihiro Shimoda <yoshihiro.shimoda.uh@renesas.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent d2c96b9d
...@@ -1883,6 +1883,8 @@ static int rswitch_device_alloc(struct rswitch_private *priv, unsigned int index ...@@ -1883,6 +1883,8 @@ static int rswitch_device_alloc(struct rswitch_private *priv, unsigned int index
snprintf(ndev->name, IFNAMSIZ, "tsn%d", index); snprintf(ndev->name, IFNAMSIZ, "tsn%d", index);
ndev->netdev_ops = &rswitch_netdev_ops; ndev->netdev_ops = &rswitch_netdev_ops;
ndev->ethtool_ops = &rswitch_ethtool_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); netif_napi_add(ndev, &rdev->napi, rswitch_poll);
......
...@@ -26,9 +26,10 @@ ...@@ -26,9 +26,10 @@
else else
#define TX_RING_SIZE 1024 #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 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_HEADROOM (NET_SKB_PAD + NET_IP_ALIGN)
#define RSWITCH_DESC_BUF_SIZE 2048 #define RSWITCH_DESC_BUF_SIZE 2048
#define RSWITCH_TAILROOM SKB_DATA_ALIGN(sizeof(struct skb_shared_info)) #define RSWITCH_TAILROOM SKB_DATA_ALIGN(sizeof(struct skb_shared_info))
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment