[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-Id: <20180317075852.11785-1-ipylypiv@silver-peak.com>
Date: Sat, 17 Mar 2018 00:58:52 -0700
From: Igor Pylypiv <ipylypiv@...ver-peak.com>
To: Shrikrishna Khare <skhare@...are.com>,
"VMware, Inc." <pv-drivers@...are.com>
Cc: netdev@...r.kernel.org, ipylypiv@...ver-peak.com
Subject: [PATCH] vmxnet3: fix LRO feature check
rxcsum and lro fields were deleted in commit a0d2730c9571 ("net: vmxnet3:
convert to hw_features"). With upgrading to newer version those fields were
resurrected and new code started using uninitialized lro field.
Removing rxcsum and lro fields.
Fixes: 45dac1d6ea04 ("vmxnet3: Changes for vmxnet3 adapter version 2 (fwd)")
Signed-off-by: Igor Pylypiv <ipylypiv@...ver-peak.com>
---
drivers/net/vmxnet3/vmxnet3_drv.c | 4 +++-
drivers/net/vmxnet3/vmxnet3_int.h | 3 ---
2 files changed, 3 insertions(+), 4 deletions(-)
diff --git a/drivers/net/vmxnet3/vmxnet3_drv.c b/drivers/net/vmxnet3/vmxnet3_drv.c
index 8b39c160743d..60776c86aaaf 100644
--- a/drivers/net/vmxnet3/vmxnet3_drv.c
+++ b/drivers/net/vmxnet3/vmxnet3_drv.c
@@ -1470,8 +1470,10 @@ vmxnet3_rq_rx_complete(struct vmxnet3_rx_queue *rq,
vmxnet3_rx_csum(adapter, skb,
(union Vmxnet3_GenericDesc *)rcd);
skb->protocol = eth_type_trans(skb, adapter->netdev);
- if (!rcd->tcp || !adapter->lro)
+ if (!rcd->tcp ||
+ !adapter->netdev->features & NETIF_F_LRO) {
goto not_lro;
+ }
if (segCnt != 0 && mss != 0) {
skb_shinfo(skb)->gso_type = rcd->v4 ?
diff --git a/drivers/net/vmxnet3/vmxnet3_int.h b/drivers/net/vmxnet3/vmxnet3_int.h
index 5ba222920e80..3de4cecda35a 100644
--- a/drivers/net/vmxnet3/vmxnet3_int.h
+++ b/drivers/net/vmxnet3/vmxnet3_int.h
@@ -342,9 +342,6 @@ struct vmxnet3_adapter {
u8 __iomem *hw_addr1; /* for BAR 1 */
u8 version;
- bool rxcsum;
- bool lro;
-
#ifdef VMXNET3_RSS
struct UPT1_RSSConf *rss_conf;
bool rss;
--
2.16.2
Powered by blists - more mailing lists