[PATCH] [UPDATED] ixgbe: add LRO support

Previous thread: [PATCH 2/2 v2] sctp: Correclty set changeover_active for SFR-CACC by Vlad Yasevich on Friday, June 13, 2008 - 6:58 am. (2 messages)

Next thread: [0/3] POHMELFS high performance network filesystem. First steps in parallel processing. by Evgeniy Polyakov on Friday, June 13, 2008 - 9:37 am. (19 messages)
From: Jeff Kirsher
Date: Friday, June 13, 2008 - 9:30 am

From: Mallikarjuna R Chilakala <mallikarjuna.chilakala@intel.com>

Support for in-kernel LRO with the ability to enable/disable via ethtool
based on comments from Ben Hutchings and Randy Dunlap.


Signed-off-by: Mallikarjuna R Chilakala <mallikarjuna.chilakala@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Signed-off-by: PJ Waskiewicz <peter.p.waskiewicz.jr@intel.com>
---

 drivers/net/Kconfig               |    1 
 drivers/net/ixgbe/ixgbe.h         |    9 +++
 drivers/net/ixgbe/ixgbe_ethtool.c |   11 ++++
 drivers/net/ixgbe/ixgbe_main.c    |  111 ++++++++++++++++++++++++++++++-------
 4 files changed, 111 insertions(+), 21 deletions(-)

diff --git a/drivers/net/Kconfig b/drivers/net/Kconfig
index af46341..f6a15ed 100644
--- a/drivers/net/Kconfig
+++ b/drivers/net/Kconfig
@@ -2451,6 +2451,7 @@ config EHEA
 config IXGBE
 	tristate "Intel(R) 10GbE PCI Express adapters support"
 	depends on PCI
+	select INET_LRO
 	---help---
 	  This driver supports Intel(R) 10GbE PCI Express family of
 	  adapters.  For more information on how to identify your adapter, go
diff --git a/drivers/net/ixgbe/ixgbe.h b/drivers/net/ixgbe/ixgbe.h
index d981134..956914a 100644
--- a/drivers/net/ixgbe/ixgbe.h
+++ b/drivers/net/ixgbe/ixgbe.h
@@ -32,6 +32,7 @@
 #include <linux/types.h>
 #include <linux/pci.h>
 #include <linux/netdevice.h>
+#include <linux/inet_lro.h>
 
 #include "ixgbe_type.h"
 #include "ixgbe_common.h"
@@ -100,6 +101,9 @@
 #define IXGBE_TX_FLAGS_VLAN_MASK	0xffff0000
 #define IXGBE_TX_FLAGS_VLAN_SHIFT	16
 
+#define IXGBE_MAX_LRO_DESCRIPTORS       8
+#define IXGBE_MAX_LRO_AGGREGATE         32
+
 /* wrapper around a pointer to a socket buffer,
  * so a DMA handle can be stored along with the buffer */
 struct ixgbe_tx_buffer {
@@ -150,6 +154,8 @@ struct ixgbe_ring {
 	/* cpu for tx queue */
 	int cpu;
 #endif
+	struct net_lro_mgr lro_mgr;
+	bool lro_used;
 	struct ixgbe_queue_stats stats;
 	u8 v_idx; /* maps directly to the index for this ring in ...
From: Randy Dunlap
Date: Friday, June 13, 2008 - 9:38 am

If INET is not enabled, selecting INET_LRO still won't enable INET and


---
~Randy
'"Daemon' is an old piece of jargon from the UNIX operating system,
where it referred to a piece of low-level utility software, a
fundamental part of the operating system."
--

From: Jeff Kirsher
Date: Friday, June 13, 2008 - 10:29 am

Thanks for the catch Randy.  I have updated the patch and will send it out.

-- 
Cheers,
Jeff
--

Previous thread: [PATCH 2/2 v2] sctp: Correclty set changeover_active for SFR-CACC by Vlad Yasevich on Friday, June 13, 2008 - 6:58 am. (2 messages)

Next thread: [0/3] POHMELFS high performance network filesystem. First steps in parallel processing. by Evgeniy Polyakov on Friday, June 13, 2008 - 9:37 am. (19 messages)