From: Michal Schmidt <mschmidt@redhat.com>
To: netdev@vger.kernel.org
Cc: Yuval Mintz <Yuval.Mintz@qlogic.com>,
Ariel Elior <Ariel.Elior@qlogic.com>,
Dmitry Kravkov <Dmitry.Kravkov@qlogic.com>,
"David S. Miller" <davem@davemloft.net>
Subject: [PATCH 1/3] bnx2x: mark LRO as a fixed disabled feature if disable_tpa is set
Date: Tue, 28 Apr 2015 11:34:21 +0200 [thread overview]
Message-ID: <1430213663-5657-2-git-send-email-mschmidt@redhat.com> (raw)
In-Reply-To: <1430213663-5657-1-git-send-email-mschmidt@redhat.com>
If disable_tpa is set, remove NETIF_F_LRO from hw_features, so ethtool sees
it as "off [fixed]".
Note that setting the NETIF_F_LRO bit in dev->features in the 'else'
branch is not needed, because the bit was already set by
bnx2x_init_dev().
Then the check for disable_tpa in in bnx2x_fix_features() becomes unnecessary.
Signed-off-by: Michal Schmidt <mschmidt@redhat.com>
---
drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c | 4 ----
drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c | 2 +-
2 files changed, 1 insertion(+), 5 deletions(-)
diff --git a/drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c b/drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c
index 3558a36b1c..dcdbd00d02 100644
--- a/drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c
+++ b/drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c
@@ -4834,10 +4834,6 @@ netdev_features_t bnx2x_fix_features(struct net_device *dev,
features &= ~NETIF_F_GRO;
}
- /* Note: do not disable SW GRO in kernel when HW GRO is off */
- if (bp->disable_tpa)
- features &= ~NETIF_F_LRO;
-
return features;
}
diff --git a/drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c b/drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c
index b9f85fccb4..2d067c937b 100644
--- a/drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c
+++ b/drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c
@@ -12108,10 +12108,10 @@ static int bnx2x_init_bp(struct bnx2x *bp)
/* Set TPA flags */
if (bp->disable_tpa) {
bp->flags &= ~(TPA_ENABLE_FLAG | GRO_ENABLE_FLAG);
+ bp->dev->hw_features &= ~NETIF_F_LRO;
bp->dev->features &= ~NETIF_F_LRO;
} else {
bp->flags |= (TPA_ENABLE_FLAG | GRO_ENABLE_FLAG);
- bp->dev->features |= NETIF_F_LRO;
}
if (CHIP_IS_E1(bp))
--
2.1.0
next prev parent reply other threads:[~2015-04-28 9:34 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-04-28 9:34 [PATCH 0/3] bnx2x: minor cleanups related to TPA bits Michal Schmidt
2015-04-28 9:34 ` Michal Schmidt [this message]
2015-04-28 9:34 ` [PATCH 2/3] bnx2x: merge fp->disable_tpa with fp->mode Michal Schmidt
2015-04-28 9:34 ` [PATCH 3/3] bnx2x: remove {TPA,GRO}_ENABLE_FLAG Michal Schmidt
2015-04-28 10:45 ` [PATCH 0/3] bnx2x: minor cleanups related to TPA bits Yuval Mintz
2015-04-29 18:47 ` David Miller
2015-04-29 18:47 ` David Miller
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=1430213663-5657-2-git-send-email-mschmidt@redhat.com \
--to=mschmidt@redhat.com \
--cc=Ariel.Elior@qlogic.com \
--cc=Dmitry.Kravkov@qlogic.com \
--cc=Yuval.Mintz@qlogic.com \
--cc=davem@davemloft.net \
--cc=netdev@vger.kernel.org \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).