From: Yuval Mintz <Yuval.Mintz@qlogic.com>
To: <davem@davemloft.net>, <netdev@vger.kernel.org>
Cc: <Ariel.Elior@qlogic.com>,
Dmitry Kravkov <Dmitry.Kravkov@qlogic.com>,
Yuval Mintz <Yuval.Mintz@qlogic.com>
Subject: [PATCH net-next 4/5] bnx2x: Be more forgiving toward SW GRO
Date: Mon, 25 Aug 2014 17:48:32 +0300 [thread overview]
Message-ID: <1408978113-27902-5-git-send-email-Yuval.Mintz@qlogic.com> (raw)
In-Reply-To: <1408978113-27902-1-git-send-email-Yuval.Mintz@qlogic.com>
From: Dmitry Kravkov <Dmitry.Kravkov@qlogic.com>
This introduces 2 new relaxations in the bnx2x driver regarding GRO:
1. Don't prevent SW GRO if HW GRO is disabled.
2. If all aggregations are disabled, when GRO configuration changes
there's no need to perform an inner-reload [since it will have no
actual effect].
Signed-off-by: Dmitry Kravkov <Dmitry.Kravkov@qlogic.com>
Signed-off-by: Yuval Mintz <Yuval.Mintz@qlogic.com>
Signed-off-by: Ariel Elior <Ariel.Elior@qlogic.com>
---
drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c | 10 +++++++++-
1 file changed, 9 insertions(+), 1 deletion(-)
diff --git a/drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c b/drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c
index 6304da2..de65640 100644
--- a/drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c
+++ b/drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c
@@ -4816,11 +4816,15 @@ netdev_features_t bnx2x_fix_features(struct net_device *dev,
struct bnx2x *bp = netdev_priv(dev);
/* TPA requires Rx CSUM offloading */
- if (!(features & NETIF_F_RXCSUM) || bp->disable_tpa) {
+ if (!(features & NETIF_F_RXCSUM)) {
features &= ~NETIF_F_LRO;
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;
}
@@ -4859,6 +4863,10 @@ int bnx2x_set_features(struct net_device *dev, netdev_features_t features)
if ((changes & GRO_ENABLE_FLAG) && (flags & TPA_ENABLE_FLAG))
changes &= ~GRO_ENABLE_FLAG;
+ /* if GRO is changed while HW TPA is off, don't force a reload */
+ if ((changes & GRO_ENABLE_FLAG) && bp->disable_tpa)
+ changes &= ~GRO_ENABLE_FLAG;
+
if (changes)
bnx2x_reload = true;
--
1.8.3.1
next prev parent reply other threads:[~2014-08-25 14:49 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-08-25 14:48 [PATCH net-next 0/5] bnx2x: `fixes' patch-series Yuval Mintz
2014-08-25 14:48 ` [PATCH net-next 1/5] bnx2x: ethtool -d might cause timeout in log Yuval Mintz
2014-08-25 14:48 ` [PATCH net-next 2/5] bnx2x: Fix stop-on-error Yuval Mintz
2014-08-25 14:48 ` [PATCH net-next 3/5] bnx2x: VF clean statistics Yuval Mintz
2014-08-25 14:48 ` Yuval Mintz [this message]
2014-08-25 14:48 ` [PATCH net-next 5/5] bnx2x: Fix timesync endianity Yuval Mintz
2014-08-26 0:30 ` [PATCH net-next 0/5] bnx2x: `fixes' patch-series 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=1408978113-27902-5-git-send-email-Yuval.Mintz@qlogic.com \
--to=yuval.mintz@qlogic.com \
--cc=Ariel.Elior@qlogic.com \
--cc=Dmitry.Kravkov@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).