cxgb3: Replace LRO with GRO
[linux-2.6-block.git] / drivers / net / cxgb3 / adapter.h
index 5b346f9eaa8b482c556351a6d7eedf8c4fcce9ba..fbe15699584e537d6715a17d849acdb639296d7f 100644 (file)
@@ -42,7 +42,6 @@
 #include <linux/cache.h>
 #include <linux/mutex.h>
 #include <linux/bitops.h>
-#include <linux/inet_lro.h>
 #include "t3cdev.h"
 #include <asm/io.h>
 
@@ -50,12 +49,17 @@ struct vlan_group;
 struct adapter;
 struct sge_qset;
 
+enum {                 /* rx_offload flags */
+       T3_RX_CSUM      = 1 << 0,
+       T3_LRO          = 1 << 1,
+};
+
 struct port_info {
        struct adapter *adapter;
        struct vlan_group *vlan_grp;
        struct sge_qset *qs;
        u8 port_id;
-       u8 rx_csum_offload;
+       u8 rx_offload;
        u8 nqsets;
        u8 first_qset;
        struct cphy phy;
@@ -173,15 +177,11 @@ enum {                            /* per port SGE statistics */
        SGE_PSTAT_TX_CSUM,      /* # of TX checksum offloads */
        SGE_PSTAT_VLANEX,       /* # of VLAN tag extractions */
        SGE_PSTAT_VLANINS,      /* # of VLAN tag insertions */
-       SGE_PSTAT_LRO_AGGR,     /* # of page chunks added to LRO sessions */
-       SGE_PSTAT_LRO_FLUSHED,  /* # of flushed LRO sessions */
-       SGE_PSTAT_LRO_NO_DESC,  /* # of overflown LRO sessions */
 
        SGE_PSTAT_MAX           /* must be last */
 };
 
-#define T3_MAX_LRO_SES 8
-#define T3_MAX_LRO_MAX_PKTS 64
+struct napi_gro_fraginfo;
 
 struct sge_qset {              /* an SGE queue set */
        struct adapter *adap;
@@ -189,12 +189,8 @@ struct sge_qset {          /* an SGE queue set */
        struct sge_rspq rspq;
        struct sge_fl fl[SGE_RXQ_PER_SET];
        struct sge_txq txq[SGE_TXQ_PER_SET];
-       struct net_lro_mgr lro_mgr;
-       struct net_lro_desc lro_desc[T3_MAX_LRO_SES];
-       struct skb_frag_struct *lro_frag_tbl;
-       int lro_nfrags;
+       struct napi_gro_fraginfo lro_frag_tbl;
        int lro_enabled;
-       int lro_frag_len;
        void *lro_va;
        struct net_device *netdev;
        struct netdev_queue *tx_q;      /* associated netdev TX queue */
@@ -225,6 +221,7 @@ struct adapter {
        unsigned int slow_intr_mask;
        unsigned long irq_stats[IRQ_NUM_STATS];
 
+       int msix_nvectors;
        struct {
                unsigned short vec;
                char desc[22];