Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

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: WANG Cong <amwang@redhat.com>
Signed-off-by: David S. Miller <davem@davemloft.net>

authored by

Amerigo Wang and committed by
David S. Miller
f3c58ace f502bf2b

+3 -12
-2
drivers/net/mlx4/en_ethtool.c
··· 398 398 return -EOPNOTSUPP; 399 399 400 400 if (data & ETH_FLAG_LRO) { 401 - if (mdev->profile.num_lro == 0) 402 - return -EOPNOTSUPP; 403 401 if (!(dev->features & NETIF_F_LRO)) 404 402 changed = 1; 405 403 } else if (dev->features & NETIF_F_LRO) {
-5
drivers/net/mlx4/en_main.c
··· 69 69 /* RSS hash type mask - default to <saddr, daddr, sport, dport> */ 70 70 MLX4_EN_PARM_INT(rss_mask, 0xf, "RSS hash type bitmask"); 71 71 72 - /* Number of LRO sessions per Rx ring (rounded up to a power of two) */ 73 - MLX4_EN_PARM_INT(num_lro, MLX4_EN_MAX_LRO_DESCRIPTORS, 74 - "Number of LRO sessions per ring or disabled (0)"); 75 - 76 72 /* Priority pausing */ 77 73 MLX4_EN_PARM_INT(pfctx, 0, "Priority based Flow Control policy on TX[7:0]." 78 74 " Per priority bit mask"); ··· 105 109 106 110 params->rss_xor = (rss_xor != 0); 107 111 params->rss_mask = rss_mask & 0x1f; 108 - params->num_lro = min_t(int, num_lro , MLX4_EN_MAX_LRO_DESCRIPTORS); 109 112 for (i = 1; i <= MLX4_MAX_PORTS; i++) { 110 113 params->prof[i].rx_pause = 1; 111 114 params->prof[i].rx_ppp = pfcrx;
+1 -2
drivers/net/mlx4/en_netdev.c
··· 1038 1038 dev->features |= NETIF_F_HW_VLAN_TX | 1039 1039 NETIF_F_HW_VLAN_RX | 1040 1040 NETIF_F_HW_VLAN_FILTER; 1041 - if (mdev->profile.num_lro) 1042 - dev->features |= NETIF_F_LRO; 1041 + dev->features |= NETIF_F_LRO; 1043 1042 if (mdev->LSO_support) { 1044 1043 dev->features |= NETIF_F_TSO; 1045 1044 dev->features |= NETIF_F_TSO6;
+2 -2
drivers/net/mlx4/en_rx.c
··· 320 320 ring->lro.frag_align_pad = NET_IP_ALIGN; 321 321 ring->lro.ip_summed = CHECKSUM_UNNECESSARY; 322 322 ring->lro.ip_summed_aggr = CHECKSUM_UNNECESSARY; 323 - ring->lro.max_desc = mdev->profile.num_lro; 323 + ring->lro.max_desc = MLX4_EN_MAX_LRO_DESCRIPTORS; 324 324 ring->lro.max_aggr = MAX_SKB_FRAGS; 325 - ring->lro.lro_arr = kcalloc(mdev->profile.num_lro, 325 + ring->lro.lro_arr = kcalloc(MLX4_EN_MAX_LRO_DESCRIPTORS, 326 326 sizeof(struct net_lro_desc), 327 327 GFP_KERNEL); 328 328 if (!ring->lro.lro_arr) {
-1
drivers/net/mlx4/mlx4_en.h
··· 313 313 314 314 struct mlx4_en_profile { 315 315 int rss_xor; 316 - int num_lro; 317 316 u8 rss_mask; 318 317 u32 active_ports; 319 318 u32 small_pkt_int;