aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/ethernet/qlogic/qlcnic/qlcnic.h
diff options
context:
space:
mode:
authorRajesh Borundia <rajesh.borundia@qlogic.com>2012-06-06 03:35:06 -0400
committerDavid S. Miller <davem@davemloft.net>2012-06-07 16:18:53 -0400
commitcae82d499979d99fc061f939d451244971024864 (patch)
treed3b971e44a39d0db9728c80167bd5b1ce062d145 /drivers/net/ethernet/qlogic/qlcnic/qlcnic.h
parentc3001b773bb63afd403bae37febf3f09826912cb (diff)
qlcnic: Fix estimation of recv MSS in case of LRO
o Linux stack estimates MSS from skb->len or skb_shinfo(skb)->gso_size. In case of LRO skb->len is aggregate of len of number of packets hence MSS obtained using skb->len would be incorrect. Incorrect estimation of recv MSS would lead to delayed acks in some traffic patterns (which sends two or three packets and wait for ack and only then send remaining packets). This leads to drop in performance. Hence we need to set gso_size to MSS obtained from firmware. o This is fixed recently in firmware hence the MSS is obtained based on capability. If fw is capable of sending the MSS then only driver sets the gso_size. Signed-off-by: Rajesh Borundia <rajesh.borundia@qlogic.com> Signed-off-by: Anirban Chakraborty <anirban.chakraborty@qlogic.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/ethernet/qlogic/qlcnic/qlcnic.h')
-rw-r--r--drivers/net/ethernet/qlogic/qlcnic/qlcnic.h7
1 files changed, 7 insertions, 0 deletions
diff --git a/drivers/net/ethernet/qlogic/qlcnic/qlcnic.h b/drivers/net/ethernet/qlogic/qlcnic/qlcnic.h
index 8680a5dae4a2..520ff031cfaa 100644
--- a/drivers/net/ethernet/qlogic/qlcnic/qlcnic.h
+++ b/drivers/net/ethernet/qlogic/qlcnic/qlcnic.h
@@ -258,6 +258,8 @@ struct rcv_desc {
258 (((sts_data) >> 52) & 0x1) 258 (((sts_data) >> 52) & 0x1)
259#define qlcnic_get_lro_sts_seq_number(sts_data) \ 259#define qlcnic_get_lro_sts_seq_number(sts_data) \
260 ((sts_data) & 0x0FFFFFFFF) 260 ((sts_data) & 0x0FFFFFFFF)
261#define qlcnic_get_lro_sts_mss(sts_data1) \
262 ((sts_data1 >> 32) & 0x0FFFF)
261 263
262 264
263struct status_desc { 265struct status_desc {
@@ -623,6 +625,7 @@ struct qlcnic_recv_context {
623#define QLCNIC_CAP0_JUMBO_CONTIGUOUS (1 << 7) 625#define QLCNIC_CAP0_JUMBO_CONTIGUOUS (1 << 7)
624#define QLCNIC_CAP0_LRO_CONTIGUOUS (1 << 8) 626#define QLCNIC_CAP0_LRO_CONTIGUOUS (1 << 8)
625#define QLCNIC_CAP0_VALIDOFF (1 << 11) 627#define QLCNIC_CAP0_VALIDOFF (1 << 11)
628#define QLCNIC_CAP0_LRO_MSS (1 << 21)
626 629
627/* 630/*
628 * Context state 631 * Context state
@@ -829,6 +832,9 @@ struct qlcnic_mac_list_s {
829#define QLCNIC_FW_CAPABILITY_FVLANTX BIT_9 832#define QLCNIC_FW_CAPABILITY_FVLANTX BIT_9
830#define QLCNIC_FW_CAPABILITY_HW_LRO BIT_10 833#define QLCNIC_FW_CAPABILITY_HW_LRO BIT_10
831#define QLCNIC_FW_CAPABILITY_MULTI_LOOPBACK BIT_27 834#define QLCNIC_FW_CAPABILITY_MULTI_LOOPBACK BIT_27
835#define QLCNIC_FW_CAPABILITY_MORE_CAPS BIT_31
836
837#define QLCNIC_FW_CAPABILITY_2_LRO_MAX_TCP_SEG BIT_2
832 838
833/* module types */ 839/* module types */
834#define LINKEVENT_MODULE_NOT_PRESENT 1 840#define LINKEVENT_MODULE_NOT_PRESENT 1
@@ -918,6 +924,7 @@ struct qlcnic_ipaddr {
918#define QLCNIC_NEED_FLR 0x1000 924#define QLCNIC_NEED_FLR 0x1000
919#define QLCNIC_FW_RESET_OWNER 0x2000 925#define QLCNIC_FW_RESET_OWNER 0x2000
920#define QLCNIC_FW_HANG 0x4000 926#define QLCNIC_FW_HANG 0x4000
927#define QLCNIC_FW_LRO_MSS_CAP 0x8000
921#define QLCNIC_IS_MSI_FAMILY(adapter) \ 928#define QLCNIC_IS_MSI_FAMILY(adapter) \
922 ((adapter)->flags & (QLCNIC_MSI_ENABLED | QLCNIC_MSIX_ENABLED)) 929 ((adapter)->flags & (QLCNIC_MSI_ENABLED | QLCNIC_MSIX_ENABLED))
923 930