]> git.proxmox.com Git - mirror_ubuntu-eoan-kernel.git/commitdiff
net/mlx4_en: Do not count LLC/SNAP in MTU calculation
authorYishai Hadas <yishaih@mellanox.com>
Tue, 8 Jul 2014 08:25:23 +0000 (11:25 +0300)
committerDavid S. Miller <davem@davemloft.net>
Wed, 9 Jul 2014 02:58:44 +0000 (19:58 -0700)
LLC/SNAP 8 bytes should not be added as part of header calculation.
If used, payload will be decreased accordingly. For MTU of 1500
we'll set 1522 instead of 1523.

Signed-off-by: Yishai Hadas <yishaih@mellanox.com>
Reviewed-by: Liran Liss <liranl@mellanox.com>
Signed-off-by: Eugenia Emantayev <eugenia@mellanox.com>
Signed-off-by: Amir Vadai <amirv@mellanox.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/mellanox/mlx4/en_rx.c
drivers/net/ethernet/mellanox/mlx4/mlx4_en.h

index d2d415732d994178117eafb39cc6d8207ce5322e..b8ec9208e12a00ef65fc1cf44ced2a6fbb22939d 100644 (file)
@@ -922,7 +922,7 @@ static const int frag_sizes[] = {
 void mlx4_en_calc_rx_buf(struct net_device *dev)
 {
        struct mlx4_en_priv *priv = netdev_priv(dev);
-       int eff_mtu = dev->mtu + ETH_HLEN + VLAN_HLEN + ETH_LLC_SNAP_SIZE;
+       int eff_mtu = dev->mtu + ETH_HLEN + VLAN_HLEN;
        int buf_size = 0;
        int i = 0;
 
index 0e15295bedd671a0c3fc8c1ebbf0372052c489b7..01011d4a7cbb63468ae80c282f22c1a7e4632fbc 100644 (file)
@@ -152,8 +152,6 @@ enum {
 #define MLX4_EN_TX_POLL_MODER  16
 #define MLX4_EN_TX_POLL_TIMEOUT        (HZ / 4)
 
-#define ETH_LLC_SNAP_SIZE      8
-
 #define SMALL_PACKET_SIZE      (256 - NET_IP_ALIGN)
 #define HEADER_COPY_SIZE       (128 - NET_IP_ALIGN)
 #define MLX4_LOOPBACK_TEST_PAYLOAD (HEADER_COPY_SIZE - ETH_HLEN)