* [PATCH] e1000e: Do not allow CRC stripping to be disabled on 82579 w/ jumbo frames
@ 2015-04-09 1:37 Alexander Duyck
2015-04-09 2:58 ` Jeff Kirsher
0 siblings, 1 reply; 3+ messages in thread
From: Alexander Duyck @ 2015-04-09 1:37 UTC (permalink / raw)
To: intel-wired-lan, jeffrey.t.kirsher; +Cc: netdev
The driver wasn't allowing jumbo frames to be enabled when CRC stripping
was disabled, however it was allowing CRC stripping to be disabled while
jumbo frames were enabled. This fixes that by making it so that the
NETIF_F_RXFCS flag cannot be set when jumbo frames are enabled on 82579 and
newer parts.
Signed-off-by: Alexander Duyck <alexander.h.duyck@redhat.com>
---
drivers/net/ethernet/intel/e1000e/netdev.c | 14 ++++++++++++++
1 file changed, 14 insertions(+)
diff --git a/drivers/net/ethernet/intel/e1000e/netdev.c b/drivers/net/ethernet/intel/e1000e/netdev.c
index f77db9304060..5af46b8a9a16 100644
--- a/drivers/net/ethernet/intel/e1000e/netdev.c
+++ b/drivers/net/ethernet/intel/e1000e/netdev.c
@@ -6676,6 +6676,19 @@ static void e1000_eeprom_checks(struct e1000_adapter *adapter)
}
}
+static netdev_features_t e1000_fix_features(struct net_device *netdev,
+ netdev_features_t features)
+{
+ struct e1000_adapter *adapter = netdev_priv(netdev);
+ struct e1000_hw *hw = &adapter->hw;
+
+ /* Jumbo frame workaround on 82579 and newer requires CRC be stripped */
+ if ((hw->mac.type >= e1000_pch2lan) && (netdev->mtu > ETH_DATA_LEN))
+ features &= ~NETIF_F_RXFCS;
+
+ return features;
+}
+
static int e1000_set_features(struct net_device *netdev,
netdev_features_t features)
{
@@ -6732,6 +6745,7 @@ static const struct net_device_ops e1000e_netdev_ops = {
.ndo_poll_controller = e1000_netpoll,
#endif
.ndo_set_features = e1000_set_features,
+ .ndo_fix_features = e1000_fix_features,
};
/**
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH] e1000e: Do not allow CRC stripping to be disabled on 82579 w/ jumbo frames
2015-04-09 1:37 [PATCH] e1000e: Do not allow CRC stripping to be disabled on 82579 w/ jumbo frames Alexander Duyck
@ 2015-04-09 2:58 ` Jeff Kirsher
2015-04-21 3:12 ` [Intel-wired-lan] " Brown, Aaron F
0 siblings, 1 reply; 3+ messages in thread
From: Jeff Kirsher @ 2015-04-09 2:58 UTC (permalink / raw)
To: Alexander Duyck; +Cc: intel-wired-lan, netdev, Yanir Lubetkin
[-- Attachment #1: Type: text/plain, Size: 707 bytes --]
On Wed, 2015-04-08 at 18:37 -0700, Alexander Duyck wrote:
> The driver wasn't allowing jumbo frames to be enabled when CRC
> stripping
> was disabled, however it was allowing CRC stripping to be disabled
> while
> jumbo frames were enabled. This fixes that by making it so that the
> NETIF_F_RXFCS flag cannot be set when jumbo frames are enabled on
> 82579 and
> newer parts.
>
> Signed-off-by: Alexander Duyck <alexander.h.duyck@redhat.com>
> ---
> drivers/net/ethernet/intel/e1000e/netdev.c | 14 ++++++++++++++
> 1 file changed, 14 insertions(+)
Thanks Alex, I will add your patch to my queue.
--
git://git.kernel.org/pub/scm/linux/kernel/git/jkirsher/next-queue.git
dev-queue
[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 819 bytes --]
^ permalink raw reply [flat|nested] 3+ messages in thread
* RE: [Intel-wired-lan] [PATCH] e1000e: Do not allow CRC stripping to be disabled on 82579 w/ jumbo frames
2015-04-09 2:58 ` Jeff Kirsher
@ 2015-04-21 3:12 ` Brown, Aaron F
0 siblings, 0 replies; 3+ messages in thread
From: Brown, Aaron F @ 2015-04-21 3:12 UTC (permalink / raw)
To: Kirsher, Jeffrey T, Alexander Duyck
Cc: netdev@vger.kernel.org, intel-wired-lan@lists.osuosl.org
> From: Intel-wired-lan [mailto:intel-wired-lan-bounces@lists.osuosl.org] On
> Behalf Of Jeff Kirsher
> Sent: Wednesday, April 08, 2015 7:58 PM
> To: Alexander Duyck
> Cc: netdev@vger.kernel.org; intel-wired-lan@lists.osuosl.org
> Subject: Re: [Intel-wired-lan] [PATCH] e1000e: Do not allow CRC stripping
> to be disabled on 82579 w/ jumbo frames
>
> On Wed, 2015-04-08 at 18:37 -0700, Alexander Duyck wrote:
> > The driver wasn't allowing jumbo frames to be enabled when CRC
> > stripping
> > was disabled, however it was allowing CRC stripping to be disabled
> > while
> > jumbo frames were enabled. This fixes that by making it so that the
> > NETIF_F_RXFCS flag cannot be set when jumbo frames are enabled on
> > 82579 and
> > newer parts.
> >
> > Signed-off-by: Alexander Duyck <alexander.h.duyck@redhat.com>
> > ---
> > drivers/net/ethernet/intel/e1000e/netdev.c | 14 ++++++++++++++
> > 1 file changed, 14 insertions(+)
>
> Thanks Alex, I will add your patch to my queue.
Tested-by: Aaron Brown <aaron.f.brown@intel.com>
> --
> git://git.kernel.org/pub/scm/linux/kernel/git/jkirsher/next-queue.git
> dev-queue
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2015-04-21 3:12 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-04-09 1:37 [PATCH] e1000e: Do not allow CRC stripping to be disabled on 82579 w/ jumbo frames Alexander Duyck
2015-04-09 2:58 ` Jeff Kirsher
2015-04-21 3:12 ` [Intel-wired-lan] " Brown, Aaron F
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).