aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRonak Doshi <doshir@vmware.com>2018-03-16 17:49:19 -0400
committerDavid S. Miller <davem@davemloft.net>2018-03-17 20:03:53 -0400
commit034f405793897a3c8f642935f5494b86c340cde7 (patch)
tree7e5d27e94b0c1a5f5591aaf0be68356e5b0927bd
parent7a4c003d6921e2af215f4790aa43a292bdc78be0 (diff)
vmxnet3: use correct flag to indicate LRO feature
'Commit 45dac1d6ea04 ("vmxnet3: Changes for vmxnet3 adapter version 2 (fwd)")' introduced a flag "lro" in structure vmxnet3_adapter which is used to indicate whether LRO is enabled or not. However, the patch did not set the flag and hence it was never exercised. So, when LRO is enabled, it resulted in poor TCP performance due to delayed acks. This issue is seen with packets which are larger than the mss getting a delayed ack rather than an immediate ack, thus resulting in high latency. This patch removes the lro flag and directly uses device features against NETIF_F_LRO to check if lro is enabled. Fixes: 45dac1d6ea04 ("vmxnet3: Changes for vmxnet3 adapter version 2 (fwd)") Reported-by: Rachel Lunnon <rachel_lunnon@stormagic.com> Signed-off-by: Ronak Doshi <doshir@vmware.com> Acked-by: Shrikrishna Khare <skhare@vmware.com> Signed-off-by: David S. Miller <davem@davemloft.net>
-rw-r--r--drivers/net/vmxnet3/vmxnet3_drv.c3
-rw-r--r--drivers/net/vmxnet3/vmxnet3_int.h5
2 files changed, 4 insertions, 4 deletions
diff --git a/drivers/net/vmxnet3/vmxnet3_drv.c b/drivers/net/vmxnet3/vmxnet3_drv.c
index b466a422b72d..e04937f44f33 100644
--- a/drivers/net/vmxnet3/vmxnet3_drv.c
+++ b/drivers/net/vmxnet3/vmxnet3_drv.c
@@ -1473,7 +1473,8 @@ vmxnet3_rq_rx_complete(struct vmxnet3_rx_queue *rq,
1473 vmxnet3_rx_csum(adapter, skb, 1473 vmxnet3_rx_csum(adapter, skb,
1474 (union Vmxnet3_GenericDesc *)rcd); 1474 (union Vmxnet3_GenericDesc *)rcd);
1475 skb->protocol = eth_type_trans(skb, adapter->netdev); 1475 skb->protocol = eth_type_trans(skb, adapter->netdev);
1476 if (!rcd->tcp || !adapter->lro) 1476 if (!rcd->tcp ||
1477 !(adapter->netdev->features & NETIF_F_LRO))
1477 goto not_lro; 1478 goto not_lro;
1478 1479
1479 if (segCnt != 0 && mss != 0) { 1480 if (segCnt != 0 && mss != 0) {
diff --git a/drivers/net/vmxnet3/vmxnet3_int.h b/drivers/net/vmxnet3/vmxnet3_int.h
index b94fdfd0b6f1..99387a4a20a8 100644
--- a/drivers/net/vmxnet3/vmxnet3_int.h
+++ b/drivers/net/vmxnet3/vmxnet3_int.h
@@ -69,10 +69,10 @@
69/* 69/*
70 * Version numbers 70 * Version numbers
71 */ 71 */
72#define VMXNET3_DRIVER_VERSION_STRING "1.4.12.0-k" 72#define VMXNET3_DRIVER_VERSION_STRING "1.4.13.0-k"
73 73
74/* a 32-bit int, each byte encode a verion number in VMXNET3_DRIVER_VERSION */ 74/* a 32-bit int, each byte encode a verion number in VMXNET3_DRIVER_VERSION */
75#define VMXNET3_DRIVER_VERSION_NUM 0x01040c00 75#define VMXNET3_DRIVER_VERSION_NUM 0x01040d00
76 76
77#if defined(CONFIG_PCI_MSI) 77#if defined(CONFIG_PCI_MSI)
78 /* RSS only makes sense if MSI-X is supported. */ 78 /* RSS only makes sense if MSI-X is supported. */
@@ -343,7 +343,6 @@ struct vmxnet3_adapter {
343 u8 version; 343 u8 version;
344 344
345 bool rxcsum; 345 bool rxcsum;
346 bool lro;
347 346
348#ifdef VMXNET3_RSS 347#ifdef VMXNET3_RSS
349 struct UPT1_RSSConf *rss_conf; 348 struct UPT1_RSSConf *rss_conf;