aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/s2io.h
diff options
context:
space:
mode:
authorJeff Garzik <jeff@garzik.org>2006-03-02 14:26:30 -0500
committerJeff Garzik <jeff@garzik.org>2006-03-02 14:26:30 -0500
commit2ade43618b0aee83a50b344171d33d85c73d01b1 (patch)
tree0a49fe46159a6ef66098a4f37935412f4f226f4c /drivers/net/s2io.h
parent75e47b36004d136edff68295420424cba3a5ccd0 (diff)
parent79dc190147f8a87718fe72928d5ceb58e09acdb9 (diff)
Merge branch 'lro'
Diffstat (limited to 'drivers/net/s2io.h')
-rw-r--r--drivers/net/s2io.h38
1 files changed, 38 insertions, 0 deletions
diff --git a/drivers/net/s2io.h b/drivers/net/s2io.h
index 68ae33651947..0a0b5b29d81e 100644
--- a/drivers/net/s2io.h
+++ b/drivers/net/s2io.h
@@ -78,6 +78,13 @@ static int debug_level = ERR_DBG;
78typedef struct { 78typedef struct {
79 unsigned long long single_ecc_errs; 79 unsigned long long single_ecc_errs;
80 unsigned long long double_ecc_errs; 80 unsigned long long double_ecc_errs;
81 /* LRO statistics */
82 unsigned long long clubbed_frms_cnt;
83 unsigned long long sending_both;
84 unsigned long long outof_sequence_pkts;
85 unsigned long long flush_max_pkts;
86 unsigned long long sum_avg_pkts_aggregated;
87 unsigned long long num_aggregations;
81} swStat_t; 88} swStat_t;
82 89
83/* The statistics block of Xena */ 90/* The statistics block of Xena */
@@ -680,6 +687,24 @@ struct msix_info_st {
680 u64 data; 687 u64 data;
681}; 688};
682 689
690/* Data structure to represent a LRO session */
691typedef struct lro {
692 struct sk_buff *parent;
693 u8 *l2h;
694 struct iphdr *iph;
695 struct tcphdr *tcph;
696 u32 tcp_next_seq;
697 u32 tcp_ack;
698 int total_len;
699 int frags_len;
700 int sg_num;
701 int in_use;
702 u16 window;
703 u32 cur_tsval;
704 u32 cur_tsecr;
705 u8 saw_ts;
706}lro_t;
707
683/* Structure representing one instance of the NIC */ 708/* Structure representing one instance of the NIC */
684struct s2io_nic { 709struct s2io_nic {
685 int rxd_mode; 710 int rxd_mode;
@@ -784,6 +809,13 @@ struct s2io_nic {
784#define XFRAME_II_DEVICE 2 809#define XFRAME_II_DEVICE 2
785 u8 device_type; 810 u8 device_type;
786 811
812#define MAX_LRO_SESSIONS 32
813 lro_t lro0_n[MAX_LRO_SESSIONS];
814 unsigned long clubbed_frms_cnt;
815 unsigned long sending_both;
816 u8 lro;
817 u16 lro_max_aggr_per_sess;
818
787#define INTA 0 819#define INTA 0
788#define MSI 1 820#define MSI 1
789#define MSI_X 2 821#define MSI_X 2
@@ -937,4 +969,10 @@ static void s2io_card_down(nic_t *nic);
937static int s2io_card_up(nic_t *nic); 969static int s2io_card_up(nic_t *nic);
938static int get_xena_rev_id(struct pci_dev *pdev); 970static int get_xena_rev_id(struct pci_dev *pdev);
939static void restore_xmsi_data(nic_t *nic); 971static void restore_xmsi_data(nic_t *nic);
972
973static int s2io_club_tcp_session(u8 *buffer, u8 **tcp, u32 *tcp_len, lro_t **lro, RxD_t *rxdp, nic_t *sp);
974static void clear_lro_session(lro_t *lro);
975static void queue_rx_frame(struct sk_buff *skb);
976static void update_L3L4_header(nic_t *sp, lro_t *lro);
977static void lro_append_pkt(nic_t *sp, lro_t *lro, struct sk_buff *skb, u32 tcp_len);
940#endif /* _S2IO_H */ 978#endif /* _S2IO_H */