aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAmerigo Wang <amwang@redhat.com>2010-08-17 17:51:18 -0400
committerDavid S. Miller <davem@davemloft.net>2010-08-23 00:43:58 -0400
commitf3c58aceaa3f237ba43735805f4677950327b8ee (patch)
treed847af6efead20dc3eeea2c6cb73be097d507a7a
parentf502bf2bc0de4795e8dd081a2095006021c00a0f (diff)
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>
-rw-r--r--drivers/net/mlx4/en_ethtool.c2
-rw-r--r--drivers/net/mlx4/en_main.c5
-rw-r--r--drivers/net/mlx4/en_netdev.c3
-rw-r--r--drivers/net/mlx4/en_rx.c4
-rw-r--r--drivers/net/mlx4/mlx4_en.h1
5 files changed, 3 insertions, 12 deletions
diff --git a/drivers/net/mlx4/en_ethtool.c b/drivers/net/mlx4/en_ethtool.c
index b275238fe70d..398d54136967 100644
--- a/drivers/net/mlx4/en_ethtool.c
+++ b/drivers/net/mlx4/en_ethtool.c
@@ -398,8 +398,6 @@ static int mlx4_ethtool_op_set_flags(struct net_device *dev, u32 data)
398 return -EOPNOTSUPP; 398 return -EOPNOTSUPP;
399 399
400 if (data & ETH_FLAG_LRO) { 400 if (data & ETH_FLAG_LRO) {
401 if (mdev->profile.num_lro == 0)
402 return -EOPNOTSUPP;
403 if (!(dev->features & NETIF_F_LRO)) 401 if (!(dev->features & NETIF_F_LRO))
404 changed = 1; 402 changed = 1;
405 } else if (dev->features & NETIF_F_LRO) { 403 } else if (dev->features & NETIF_F_LRO) {
diff --git a/drivers/net/mlx4/en_main.c b/drivers/net/mlx4/en_main.c
index 97934f1ec53a..cacac4e966ee 100644
--- a/drivers/net/mlx4/en_main.c
+++ b/drivers/net/mlx4/en_main.c
@@ -69,10 +69,6 @@ MLX4_EN_PARM_INT(rss_xor, 0, "Use XOR hash function for RSS");
69/* RSS hash type mask - default to <saddr, daddr, sport, dport> */ 69/* RSS hash type mask - default to <saddr, daddr, sport, dport> */
70MLX4_EN_PARM_INT(rss_mask, 0xf, "RSS hash type bitmask"); 70MLX4_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) */
73MLX4_EN_PARM_INT(num_lro, MLX4_EN_MAX_LRO_DESCRIPTORS,
74 "Number of LRO sessions per ring or disabled (0)");
75
76/* Priority pausing */ 72/* Priority pausing */
77MLX4_EN_PARM_INT(pfctx, 0, "Priority based Flow Control policy on TX[7:0]." 73MLX4_EN_PARM_INT(pfctx, 0, "Priority based Flow Control policy on TX[7:0]."
78 " Per priority bit mask"); 74 " Per priority bit mask");
@@ -109,7 +105,6 @@ static int mlx4_en_get_profile(struct mlx4_en_dev *mdev)
109 105
110 params->rss_xor = (rss_xor != 0); 106 params->rss_xor = (rss_xor != 0);
111 params->rss_mask = rss_mask & 0x1f; 107 params->rss_mask = rss_mask & 0x1f;
112 params->num_lro = min_t(int, num_lro , MLX4_EN_MAX_LRO_DESCRIPTORS);
113 for (i = 1; i <= MLX4_MAX_PORTS; i++) { 108 for (i = 1; i <= MLX4_MAX_PORTS; i++) {
114 params->prof[i].rx_pause = 1; 109 params->prof[i].rx_pause = 1;
115 params->prof[i].rx_ppp = pfcrx; 110 params->prof[i].rx_ppp = pfcrx;
diff --git a/drivers/net/mlx4/en_netdev.c b/drivers/net/mlx4/en_netdev.c
index a0d8a26f5a02..d00bfe250b05 100644
--- a/drivers/net/mlx4/en_netdev.c
+++ b/drivers/net/mlx4/en_netdev.c
@@ -1038,8 +1038,7 @@ int mlx4_en_init_netdev(struct mlx4_en_dev *mdev, int port,
1038 dev->features |= NETIF_F_HW_VLAN_TX | 1038 dev->features |= NETIF_F_HW_VLAN_TX |
1039 NETIF_F_HW_VLAN_RX | 1039 NETIF_F_HW_VLAN_RX |
1040 NETIF_F_HW_VLAN_FILTER; 1040 NETIF_F_HW_VLAN_FILTER;
1041 if (mdev->profile.num_lro) 1041 dev->features |= NETIF_F_LRO;
1042 dev->features |= NETIF_F_LRO;
1043 if (mdev->LSO_support) { 1042 if (mdev->LSO_support) {
1044 dev->features |= NETIF_F_TSO; 1043 dev->features |= NETIF_F_TSO;
1045 dev->features |= NETIF_F_TSO6; 1044 dev->features |= NETIF_F_TSO6;
diff --git a/drivers/net/mlx4/en_rx.c b/drivers/net/mlx4/en_rx.c
index efc3fad468db..2add04025fd0 100644
--- a/drivers/net/mlx4/en_rx.c
+++ b/drivers/net/mlx4/en_rx.c
@@ -320,9 +320,9 @@ int mlx4_en_create_rx_ring(struct mlx4_en_priv *priv,
320 ring->lro.frag_align_pad = NET_IP_ALIGN; 320 ring->lro.frag_align_pad = NET_IP_ALIGN;
321 ring->lro.ip_summed = CHECKSUM_UNNECESSARY; 321 ring->lro.ip_summed = CHECKSUM_UNNECESSARY;
322 ring->lro.ip_summed_aggr = CHECKSUM_UNNECESSARY; 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 ring->lro.max_aggr = MAX_SKB_FRAGS; 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 sizeof(struct net_lro_desc), 326 sizeof(struct net_lro_desc),
327 GFP_KERNEL); 327 GFP_KERNEL);
328 if (!ring->lro.lro_arr) { 328 if (!ring->lro.lro_arr) {
diff --git a/drivers/net/mlx4/mlx4_en.h b/drivers/net/mlx4/mlx4_en.h
index 449210994ee9..9d0932348b96 100644
--- a/drivers/net/mlx4/mlx4_en.h
+++ b/drivers/net/mlx4/mlx4_en.h
@@ -313,7 +313,6 @@ struct mlx4_en_port_profile {
313 313
314struct mlx4_en_profile { 314struct mlx4_en_profile {
315 int rss_xor; 315 int rss_xor;
316 int num_lro;
317 u8 rss_mask; 316 u8 rss_mask;
318 u32 active_ports; 317 u32 active_ports;
319 u32 small_pkt_int; 318 u32 small_pkt_int;