Skip to content

Commit 034f405

Browse files
Ronak Doshidavem330
authored andcommitted
vmxnet3: use correct flag to indicate LRO feature
'Commit 45dac1d ("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: 45dac1d ("vmxnet3: Changes for vmxnet3 adapter version 2 (fwd)") Reported-by: Rachel Lunnon <[email protected]> Signed-off-by: Ronak Doshi <[email protected]> Acked-by: Shrikrishna Khare <[email protected]> Signed-off-by: David S. Miller <[email protected]>
1 parent 7a4c003 commit 034f405

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

drivers/net/vmxnet3/vmxnet3_drv.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1473,7 +1473,8 @@ vmxnet3_rq_rx_complete(struct vmxnet3_rx_queue *rq,
14731473
vmxnet3_rx_csum(adapter, skb,
14741474
(union Vmxnet3_GenericDesc *)rcd);
14751475
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))
14771478
goto not_lro;
14781479

14791480
if (segCnt != 0 && mss != 0) {

drivers/net/vmxnet3/vmxnet3_int.h

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -69,10 +69,10 @@
6969
/*
7070
* Version numbers
7171
*/
72-
#define VMXNET3_DRIVER_VERSION_STRING "1.4.12.0-k"
72+
#define VMXNET3_DRIVER_VERSION_STRING "1.4.13.0-k"
7373

7474
/* 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
7676

7777
#if defined(CONFIG_PCI_MSI)
7878
/* RSS only makes sense if MSI-X is supported. */
@@ -343,7 +343,6 @@ struct vmxnet3_adapter {
343343
u8 version;
344344

345345
bool rxcsum;
346-
bool lro;
347346

348347
#ifdef VMXNET3_RSS
349348
struct UPT1_RSSConf *rss_conf;

0 commit comments

Comments
 (0)