Skip to contentSkip to conversation

Add GRO support to the be2net driver. LRO is not supported anymore.

PATCH Applied Ajit Khaparde 2 participants 4 messages Jul 21, 2009 – Jul 23, 2009

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 Add GRO support to the be2net driver. LRO is not supported anymore.

This patch removes support for INET_LRO and switches over to GRO. Please accept.

-Ajit

---
 drivers/net/benet/Kconfig      |    1 -
 drivers/net/benet/be.h         |   11 +----
 drivers/net/benet/be_ethtool.c |    9 +---
 drivers/net/benet/be_main.c    |  104 +++++++++++-----------------------------
 4 files changed, 31 insertions(+), 94 deletions(-)
drivers/net/benet/Kconfig +0 -1
index c6934f1..fdb6e81 100644
@@ -1,7 +1,6 @@
 config BE2NET
 	tristate "ServerEngines' 10Gbps NIC - BladeEngine 2"
 	depends on PCI && INET
-	select INET_LRO
 	help
 	This driver implements the NIC functionality for ServerEngines'
 	10Gbps network adapter - BladeEngine 2.
drivers/net/benet/be.h +1 -10
index 5b4bf3d..41cddbe 100644
@@ -28,11 +28,10 @@
 #include <linux/if_vlan.h>
 #include <linux/workqueue.h>
 #include <linux/interrupt.h>
-#include <linux/inet_lro.h>
 
 #include "be_hw.h"
 
-#define DRV_VER			"2.0.348"
+#define DRV_VER			"2.0.400"
 #define DRV_NAME		"be2net"
 #define BE_NAME			"ServerEngines BladeEngine2 10Gbps NIC"
 #define OC_NAME			"Emulex OneConnect 10Gbps NIC"
@@ -72,9 +71,6 @@ static inline char *nic_name(struct pci_dev *pdev)
 #define MAX_RX_POST 		BE_NAPI_WEIGHT /* Frags posted at a time */
 #define RX_FRAGS_REFILL_WM	(RX_Q_LEN - MAX_RX_POST)
 
-#define BE_MAX_LRO_DESCRIPTORS  16
-#define BE_MAX_FRAGS_PER_FRAME  (min((u32) 16, (u32) MAX_SKB_FRAGS))
-
 struct be_dma_mem {
 	void *va;
 	dma_addr_t dma;
@@ -189,8 +185,6 @@ struct be_drvr_stats {
 	u32 be_polls;		/* number of times NAPI called poll function */
 	u32 be_rx_events;	/* number of ucast rx completion events  */
 	u32 be_rx_compl;	/* number of rx completion entries processed */
-	u32 be_lro_hgram_data[8];	/* histogram of LRO data packets */
-	u32 be_lro_hgram_ack[8];	/* histogram of LRO ACKs */
 	ulong be_rx_jiffies;
 	u64 be_rx_bytes;
 	u64 be_rx_bytes_prev;
@@ -233,8 +227,6 @@ struct be_rx_obj {
 	struct be_queue_info q;
 	struct be_queue_info cq;
 	struct be_rx_page_info page_info_tbl[RX_Q_LEN];
-	struct net_lro_mgr lro_mgr;
-	struct net_lro_desc lro_desc[BE_MAX_LRO_DESCRIPTORS];
 };
 
 #define BE_NUM_MSIX_VECTORS		2	/* 1 each for Tx and Rx */
@@ -271,7 +263,6 @@ struct be_adapter {
 
 	/* Ethtool knobs and info */
 	bool rx_csum; 		/* BE card must perform rx-checksumming */
-	u32 max_rx_coal;
 	char fw_ver[FW_VER_LEN];
 	u32 if_handle;		/* Used to configure filtering */
 	u32 pmac_id;		/* MAC addr handle used by BE card */
drivers/net/benet/be_ethtool.c +1 -8
index cccc541..f3f0f91 100644
@@ -127,8 +127,6 @@ be_get_coalesce(struct net_device *netdev, struct ethtool_coalesce *coalesce)
 	struct be_eq_obj *rx_eq = &adapter->rx_eq;
 	struct be_eq_obj *tx_eq = &adapter->tx_eq;
 
-	coalesce->rx_max_coalesced_frames = adapter->max_rx_coal;
-
 	coalesce->rx_coalesce_usecs = rx_eq->cur_eqd;
 	coalesce->rx_coalesce_usecs_high = rx_eq->max_eqd;
 	coalesce->rx_coalesce_usecs_low = rx_eq->min_eqd;
@@ -144,8 +142,7 @@ be_get_coalesce(struct net_device *netdev, struct ethtool_coalesce *coalesce)
 }
 
 /*
- * This routine is used to set interrup coalescing delay *as well as*
- * the number of pkts to coalesce for LRO.
+ * This routine is used to set interrup coalescing delay
  */
 static int
 be_set_coalesce(struct net_device *netdev, struct ethtool_coalesce *coalesce)
@@ -161,10 +158,6 @@ be_set_coalesce(struct net_device *netdev, struct ethtool_coalesce *coalesce)
 	if (coalesce->use_adaptive_tx_coalesce == 1)
 		return -EINVAL;
 
-	adapter->max_rx_coal = coalesce->rx_max_coalesced_frames;
-	if (adapter->max_rx_coal > BE_MAX_FRAGS_PER_FRAME)
-		adapter->max_rx_coal = BE_MAX_FRAGS_PER_FRAME;
-
 	/* if AIC is being turned on now, start with an EQD of 0 */
 	if (rx_eq->enable_aic == 0 &&
 		coalesce->use_adaptive_rx_coalesce == 1) {
drivers/net/benet/be_main.c +29 -75

196 lines not on this page · raw message

Signature · 1 line
1.6.0.4
#2 lore raw
Quoted 9 lines · David Miller

From: Ajit Khaparde <[email protected]>
Date: Tue, 21 Jul 2009 17:37:11 +0530

Quoted 4 lines

This patch removes support for INET_LRO and switches over to GRO.

Applied, thanks a lot for doing this work.

Dave, I just finished a git pull, but don't see the changes. What could be the reason?

-Ajit

maintainer
#3 lore raw

From: Ajit Khaparde <[email protected]>
Date: Thu, 23 Jul 2009 11:48:26 +0530

Quoted 5 lines · David Miller
Quoted 4 lines

From: Ajit Khaparde <[email protected]>
Date: Tue, 21 Jul 2009 17:37:11 +0530

Quoted 1 line
Quoted 8 lines
Quoted 5 lines
Quoted 3 lines

This patch removes support for INET_LRO and switches over to GRO.

Applied, thanks a lot for doing this work.

Dave, I just finished a git pull, but don't see the changes. What could be the reason?

I don't always push things immediately, sometimes I give it a few days before pushing to kernel.org so that build failures and objections to changes can be dealt with more cleanly.