All of lore.kernel.org
 help / color / mirror / Atom feed
From: Igor Pylypiv <ipylypiv@silver-peak.com>
To: Shrikrishna Khare <skhare@vmware.com>,
	"VMware, Inc." <pv-drivers@vmware.com>
Cc: netdev@vger.kernel.org, ipylypiv@silver-peak.com
Subject: [PATCH] vmxnet3: fix LRO feature check
Date: Sat, 17 Mar 2018 00:58:52 -0700	[thread overview]
Message-ID: <20180317075852.11785-1-ipylypiv@silver-peak.com> (raw)

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@silver-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

             reply	other threads:[~2018-03-17  7:59 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-03-17  7:58 Igor Pylypiv [this message]
2018-03-18  0:20 ` [PATCH] vmxnet3: fix LRO feature check David Miller
2018-03-18  1:08   ` Igor Pylypiv
2018-03-18  6:37 ` kbuild test robot
2018-03-20 14:57   ` David Miller
2018-03-20 18:24     ` Igor Pylypiv
2018-03-20 18:42     ` Shrikrishna Khare
2018-03-20 18:59       ` David Miller
2018-03-18 11:23 ` kbuild test robot

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20180317075852.11785-1-ipylypiv@silver-peak.com \
    --to=ipylypiv@silver-peak.com \
    --cc=netdev@vger.kernel.org \
    --cc=pv-drivers@vmware.com \
    --cc=skhare@vmware.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.