summaryrefslogtreecommitdiff
path: root/drivers/net/ethernet/qlogic/qlcnic/qlcnic_io.c
diff options
context:
space:
mode:
authorShahed Shaikh <shahed.shaikh@qlogic.com>2013-02-18 12:06:16 +0000
committerDavid S. Miller <davem@davemloft.net>2013-02-19 00:47:01 -0500
commit99e8587900a3d32b1eaa3a92da90b49e9d4ff765 (patch)
tree299bad8dae01ef115cf5e6a9dd3f08d65f1ca449 /drivers/net/ethernet/qlogic/qlcnic/qlcnic_io.c
parentac166700991c8f2760e4d3656b4783986cfbf545 (diff)
downloadlwn-99e8587900a3d32b1eaa3a92da90b49e9d4ff765.tar.gz
lwn-99e8587900a3d32b1eaa3a92da90b49e9d4ff765.zip
qlcnic: fix estimation of receive MSS in case of LRO for 83xx adapter
Set gso_size to MSS obtained from adapter to avoid incorrect estimation of receive MSS, which would lead to delayed ACKs in some traffic patterns Example: Send two or three packets and wait for ack and only then send remaining packets. Signed-off-by: Shahed Shaikh <shahed.shaikh@qlogic.com> Signed-off-by: Jitendra Kalsaria <jitendra.kalsaria@qlogic.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/ethernet/qlogic/qlcnic/qlcnic_io.c')
-rw-r--r--drivers/net/ethernet/qlogic/qlcnic/qlcnic_io.c13
1 files changed, 12 insertions, 1 deletions
diff --git a/drivers/net/ethernet/qlogic/qlcnic/qlcnic_io.c b/drivers/net/ethernet/qlogic/qlcnic/qlcnic_io.c
index 662292de1486..2990f45df787 100644
--- a/drivers/net/ethernet/qlogic/qlcnic/qlcnic_io.c
+++ b/drivers/net/ethernet/qlogic/qlcnic/qlcnic_io.c
@@ -88,6 +88,8 @@
#define qlcnic_get_lro_sts_mss(sts_data1) \
((sts_data1 >> 32) & 0x0FFFF)
+#define qlcnic_83xx_get_lro_sts_mss(sts) ((sts) & 0xffff)
+
/* opcode field in status_desc */
#define QLCNIC_SYN_OFFLOAD 0x03
#define QLCNIC_RXPKT_DESC 0x04
@@ -1423,7 +1425,7 @@ qlcnic_83xx_process_lro(struct qlcnic_adapter *adapter,
bool push;
int l2_hdr_offset, l4_hdr_offset;
int index;
- u16 lro_length, length, data_offset;
+ u16 lro_length, length, data_offset, gso_size;
u16 vid = 0xffff;
if (unlikely(ring > adapter->max_rds_rings))
@@ -1478,6 +1480,15 @@ qlcnic_83xx_process_lro(struct qlcnic_adapter *adapter,
th->psh = push;
length = skb->len;
+ if (adapter->flags & QLCNIC_FW_LRO_MSS_CAP) {
+ gso_size = qlcnic_83xx_get_lro_sts_mss(sts_data[0]);
+ skb_shinfo(skb)->gso_size = gso_size;
+ if (skb->protocol == htons(ETH_P_IPV6))
+ skb_shinfo(skb)->gso_type = SKB_GSO_TCPV6;
+ else
+ skb_shinfo(skb)->gso_type = SKB_GSO_TCPV4;
+ }
+
if (vid != 0xffff)
__vlan_hwaccel_put_tag(skb, vid);