aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBen Hutchings <bhutchings@solarflare.com>2012-11-16 07:44:56 -0500
committerDavid S. Miller <davem@davemloft.net>2012-11-19 19:13:59 -0500
commitf1d29a3fa68ba7c0b78b659a0e427ab834a26b44 (patch)
tree9c753bdde61384321e3dc99929d6c2754cd76587
parent01f1c6b994bc4e0cf048534e67702e08ae69a890 (diff)
mlx4_en: Remove remnants of LRO support
Commit fa37a9586f92051de03a13e55e5ec3880bb6783e ('mlx4_en: Moving to work with GRO') left behind the Kconfig depends/select, some dead code and comments referring to LRO. Signed-off-by: Ben Hutchings <bhutchings@solarflare.com> Acked-by: Amir Vadai <amirv@mellanox.com> Signed-off-by: David S. Miller <davem@davemloft.net>
-rw-r--r--drivers/net/ethernet/mellanox/mlx4/Kconfig3
-rw-r--r--drivers/net/ethernet/mellanox/mlx4/en_rx.c9
-rw-r--r--drivers/net/ethernet/mellanox/mlx4/mlx4_en.h17
3 files changed, 4 insertions, 25 deletions
diff --git a/drivers/net/ethernet/mellanox/mlx4/Kconfig b/drivers/net/ethernet/mellanox/mlx4/Kconfig
index 5f027f95cc8..eb520ab6401 100644
--- a/drivers/net/ethernet/mellanox/mlx4/Kconfig
+++ b/drivers/net/ethernet/mellanox/mlx4/Kconfig
@@ -4,9 +4,8 @@
4 4
5config MLX4_EN 5config MLX4_EN
6 tristate "Mellanox Technologies 10Gbit Ethernet support" 6 tristate "Mellanox Technologies 10Gbit Ethernet support"
7 depends on PCI && INET 7 depends on PCI
8 select MLX4_CORE 8 select MLX4_CORE
9 select INET_LRO
10 ---help--- 9 ---help---
11 This driver supports Mellanox Technologies ConnectX Ethernet 10 This driver supports Mellanox Technologies ConnectX Ethernet
12 devices. 11 devices.
diff --git a/drivers/net/ethernet/mellanox/mlx4/en_rx.c b/drivers/net/ethernet/mellanox/mlx4/en_rx.c
index 5aba5ecdf1e..f76c9671f36 100644
--- a/drivers/net/ethernet/mellanox/mlx4/en_rx.c
+++ b/drivers/net/ethernet/mellanox/mlx4/en_rx.c
@@ -630,7 +630,7 @@ int mlx4_en_process_rx_cq(struct net_device *dev, struct mlx4_en_cq *cq, int bud
630 if ((cqe->status & cpu_to_be16(MLX4_CQE_STATUS_IPOK)) && 630 if ((cqe->status & cpu_to_be16(MLX4_CQE_STATUS_IPOK)) &&
631 (cqe->checksum == cpu_to_be16(0xffff))) { 631 (cqe->checksum == cpu_to_be16(0xffff))) {
632 ring->csum_ok++; 632 ring->csum_ok++;
633 /* This packet is eligible for LRO if it is: 633 /* This packet is eligible for GRO if it is:
634 * - DIX Ethernet (type interpretation) 634 * - DIX Ethernet (type interpretation)
635 * - TCP/IP (v4) 635 * - TCP/IP (v4)
636 * - without IP options 636 * - without IP options
@@ -667,7 +667,7 @@ int mlx4_en_process_rx_cq(struct net_device *dev, struct mlx4_en_cq *cq, int bud
667 goto next; 667 goto next;
668 } 668 }
669 669
670 /* LRO not possible, complete processing here */ 670 /* GRO not possible, complete processing here */
671 ip_summed = CHECKSUM_UNNECESSARY; 671 ip_summed = CHECKSUM_UNNECESSARY;
672 } else { 672 } else {
673 ip_summed = CHECKSUM_NONE; 673 ip_summed = CHECKSUM_NONE;
@@ -710,11 +710,8 @@ next:
710 ++cq->mcq.cons_index; 710 ++cq->mcq.cons_index;
711 index = (cq->mcq.cons_index) & ring->size_mask; 711 index = (cq->mcq.cons_index) & ring->size_mask;
712 cqe = &cq->buf[index]; 712 cqe = &cq->buf[index];
713 if (++polled == budget) { 713 if (++polled == budget)
714 /* We are here because we reached the NAPI budget -
715 * flush only pending LRO sessions */
716 goto out; 714 goto out;
717 }
718 } 715 }
719 716
720out: 717out:
diff --git a/drivers/net/ethernet/mellanox/mlx4/mlx4_en.h b/drivers/net/ethernet/mellanox/mlx4/mlx4_en.h
index 8a5e70d6889..d3eba8bcce1 100644
--- a/drivers/net/ethernet/mellanox/mlx4/mlx4_en.h
+++ b/drivers/net/ethernet/mellanox/mlx4/mlx4_en.h
@@ -95,8 +95,6 @@
95#define MLX4_EN_ALLOC_SIZE PAGE_ALIGN(16384) 95#define MLX4_EN_ALLOC_SIZE PAGE_ALIGN(16384)
96#define MLX4_EN_ALLOC_ORDER get_order(MLX4_EN_ALLOC_SIZE) 96#define MLX4_EN_ALLOC_ORDER get_order(MLX4_EN_ALLOC_SIZE)
97 97
98#define MLX4_EN_MAX_LRO_DESCRIPTORS 32
99
100/* Receive fragment sizes; we use at most 4 fragments (for 9600 byte MTU 98/* Receive fragment sizes; we use at most 4 fragments (for 9600 byte MTU
101 * and 4K allocations) */ 99 * and 4K allocations) */
102enum { 100enum {
@@ -290,21 +288,6 @@ struct mlx4_en_rx_ring {
290 unsigned long csum_none; 288 unsigned long csum_none;
291}; 289};
292 290
293
294static inline int mlx4_en_can_lro(__be16 status)
295{
296 return (status & cpu_to_be16(MLX4_CQE_STATUS_IPV4 |
297 MLX4_CQE_STATUS_IPV4F |
298 MLX4_CQE_STATUS_IPV6 |
299 MLX4_CQE_STATUS_IPV4OPT |
300 MLX4_CQE_STATUS_TCP |
301 MLX4_CQE_STATUS_UDP |
302 MLX4_CQE_STATUS_IPOK)) ==
303 cpu_to_be16(MLX4_CQE_STATUS_IPV4 |
304 MLX4_CQE_STATUS_IPOK |
305 MLX4_CQE_STATUS_TCP);
306}
307
308struct mlx4_en_cq { 291struct mlx4_en_cq {
309 struct mlx4_cq mcq; 292 struct mlx4_cq mcq;
310 struct mlx4_hwq_resources wqres; 293 struct mlx4_hwq_resources wqres;