igb: Replace LRO with GRO

This patch makes igb invoke the GRO hooks instead of LRO.  As
GRO has a compatible external interface to LRO this is a very
straightforward replacement.

Three things of note:

1) I've kept the LRO Kconfig option until we decide to enable
GRO across the board at which point it can also be killed.

2) The poll_controller stuff is broken in igb as it tries to do
the same work as the normal poll routine.  Since poll_controller
can be called in the middle of a poll, this can't be good.

I noticed this because poll_controller can invoke the GRO hooks
without flushing held GRO packets.

However, this should be harmless (assuming the poll_controller
bug above doesn't kill you first :) since the next ->poll will
clear the backlog.  The only time when we'll have a problem is
if we're already executing the GRO code on the same ring, but
that's no worse than what happens now.

3) I kept the ip_summed check before calling GRO so that we're
on par with previous behaviour.

Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Signed-off-by: David S. Miller <davem@davemloft.net>
此提交包含在:
Herbert Xu
2009-01-19 15:20:57 -08:00
提交者 David S. Miller
父節點 649aa95d75
當前提交 5c0999b72b
共有 4 個檔案被更改,包括 6 行新增118 行删除

查看文件

@@ -36,12 +36,6 @@
struct igb_adapter;
#ifdef CONFIG_IGB_LRO
#include <linux/inet_lro.h>
#define MAX_LRO_AGGR 32
#define MAX_LRO_DESCRIPTORS 8
#endif
/* Interrupt defines */
#define IGB_MIN_DYN_ITR 3000
#define IGB_MAX_DYN_ITR 96000
@@ -176,10 +170,6 @@ struct igb_ring {
struct napi_struct napi;
int set_itr;
struct igb_ring *buddy;
#ifdef CONFIG_IGB_LRO
struct net_lro_mgr lro_mgr;
bool lro_used;
#endif
};
};
@@ -288,12 +278,6 @@ struct igb_adapter {
int need_ioport;
struct igb_ring *multi_tx_table[IGB_MAX_TX_QUEUES];
#ifdef CONFIG_IGB_LRO
unsigned int lro_max_aggr;
unsigned int lro_aggregated;
unsigned int lro_flushed;
unsigned int lro_no_desc;
#endif
unsigned int tx_ring_count;
unsigned int rx_ring_count;
};