Commit f3c58ace authored by Amerigo Wang's avatar Amerigo Wang Committed by David S. Miller

mlx4: remove num_lro parameter

As suggested by David, this parameter can die, we can use ethtool
to turn LRO on/off. Compile tests only.
Signed-off-by: default avatarWANG Cong <amwang@redhat.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent f502bf2b
...@@ -398,8 +398,6 @@ static int mlx4_ethtool_op_set_flags(struct net_device *dev, u32 data) ...@@ -398,8 +398,6 @@ static int mlx4_ethtool_op_set_flags(struct net_device *dev, u32 data)
return -EOPNOTSUPP; return -EOPNOTSUPP;
if (data & ETH_FLAG_LRO) { if (data & ETH_FLAG_LRO) {
if (mdev->profile.num_lro == 0)
return -EOPNOTSUPP;
if (!(dev->features & NETIF_F_LRO)) if (!(dev->features & NETIF_F_LRO))
changed = 1; changed = 1;
} else if (dev->features & NETIF_F_LRO) { } else if (dev->features & NETIF_F_LRO) {
......
...@@ -69,10 +69,6 @@ MLX4_EN_PARM_INT(rss_xor, 0, "Use XOR hash function for RSS"); ...@@ -69,10 +69,6 @@ MLX4_EN_PARM_INT(rss_xor, 0, "Use XOR hash function for RSS");
/* RSS hash type mask - default to <saddr, daddr, sport, dport> */ /* RSS hash type mask - default to <saddr, daddr, sport, dport> */
MLX4_EN_PARM_INT(rss_mask, 0xf, "RSS hash type bitmask"); MLX4_EN_PARM_INT(rss_mask, 0xf, "RSS hash type bitmask");
/* Number of LRO sessions per Rx ring (rounded up to a power of two) */
MLX4_EN_PARM_INT(num_lro, MLX4_EN_MAX_LRO_DESCRIPTORS,
"Number of LRO sessions per ring or disabled (0)");
/* Priority pausing */ /* Priority pausing */
MLX4_EN_PARM_INT(pfctx, 0, "Priority based Flow Control policy on TX[7:0]." MLX4_EN_PARM_INT(pfctx, 0, "Priority based Flow Control policy on TX[7:0]."
" Per priority bit mask"); " Per priority bit mask");
...@@ -109,7 +105,6 @@ static int mlx4_en_get_profile(struct mlx4_en_dev *mdev) ...@@ -109,7 +105,6 @@ static int mlx4_en_get_profile(struct mlx4_en_dev *mdev)
params->rss_xor = (rss_xor != 0); params->rss_xor = (rss_xor != 0);
params->rss_mask = rss_mask & 0x1f; params->rss_mask = rss_mask & 0x1f;
params->num_lro = min_t(int, num_lro , MLX4_EN_MAX_LRO_DESCRIPTORS);
for (i = 1; i <= MLX4_MAX_PORTS; i++) { for (i = 1; i <= MLX4_MAX_PORTS; i++) {
params->prof[i].rx_pause = 1; params->prof[i].rx_pause = 1;
params->prof[i].rx_ppp = pfcrx; params->prof[i].rx_ppp = pfcrx;
......
...@@ -1038,7 +1038,6 @@ int mlx4_en_init_netdev(struct mlx4_en_dev *mdev, int port, ...@@ -1038,7 +1038,6 @@ int mlx4_en_init_netdev(struct mlx4_en_dev *mdev, int port,
dev->features |= NETIF_F_HW_VLAN_TX | dev->features |= NETIF_F_HW_VLAN_TX |
NETIF_F_HW_VLAN_RX | NETIF_F_HW_VLAN_RX |
NETIF_F_HW_VLAN_FILTER; NETIF_F_HW_VLAN_FILTER;
if (mdev->profile.num_lro)
dev->features |= NETIF_F_LRO; dev->features |= NETIF_F_LRO;
if (mdev->LSO_support) { if (mdev->LSO_support) {
dev->features |= NETIF_F_TSO; dev->features |= NETIF_F_TSO;
......
...@@ -320,9 +320,9 @@ int mlx4_en_create_rx_ring(struct mlx4_en_priv *priv, ...@@ -320,9 +320,9 @@ int mlx4_en_create_rx_ring(struct mlx4_en_priv *priv,
ring->lro.frag_align_pad = NET_IP_ALIGN; ring->lro.frag_align_pad = NET_IP_ALIGN;
ring->lro.ip_summed = CHECKSUM_UNNECESSARY; ring->lro.ip_summed = CHECKSUM_UNNECESSARY;
ring->lro.ip_summed_aggr = CHECKSUM_UNNECESSARY; ring->lro.ip_summed_aggr = CHECKSUM_UNNECESSARY;
ring->lro.max_desc = mdev->profile.num_lro; ring->lro.max_desc = MLX4_EN_MAX_LRO_DESCRIPTORS;
ring->lro.max_aggr = MAX_SKB_FRAGS; ring->lro.max_aggr = MAX_SKB_FRAGS;
ring->lro.lro_arr = kcalloc(mdev->profile.num_lro, ring->lro.lro_arr = kcalloc(MLX4_EN_MAX_LRO_DESCRIPTORS,
sizeof(struct net_lro_desc), sizeof(struct net_lro_desc),
GFP_KERNEL); GFP_KERNEL);
if (!ring->lro.lro_arr) { if (!ring->lro.lro_arr) {
......
...@@ -313,7 +313,6 @@ struct mlx4_en_port_profile { ...@@ -313,7 +313,6 @@ struct mlx4_en_port_profile {
struct mlx4_en_profile { struct mlx4_en_profile {
int rss_xor; int rss_xor;
int num_lro;
u8 rss_mask; u8 rss_mask;
u32 active_ports; u32 active_ports;
u32 small_pkt_int; u32 small_pkt_int;
......
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