e1000e: disable rxhash when try to enable jumbo frame also rxhash and rxcsum have enabled
Subsystems (3)
PATCH 1/1 e1000e: disable rxhash when try to enable jumbo frame also rxhash and rxcsum have enabled
Upstream commit 70495a5 check if both rxhash and rxcsum enabled when enabling jumbo frames and disallowed all of them enabled at the same time.
Since jumbo frame widely be used in real world, so when try to enable jumbo frames but rxhash and rxcsum have enabled, change the default behavior to disable receive hashing.
--- drivers/net/ethernet/intel/e1000e/netdev.c | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-)
drivers/net/ethernet/intel/e1000e/netdev.c +11 -2
@@ -66,6 +66,8 @@ module_param(debug, int, 0);MODULE_PARM_DESC (debug,"Debug level (0=none,...,16=all)" );static void e1000e_disable_aspm (struct pci_dev *pdev,u16 state); +static int e1000_set_features (struct net_device *netdev, +netdev_features_t features);static const struct e1000_info *e1000_info_tbl[] = { [board_82571] = &e1000_82571_info,
@@ -5254,8 +5256,15 @@ static int e1000_change_mtu(struct net_device *netdev, int new_mtu)*/ if ((netdev->features &NETIF_F_RXCSUM ) && (netdev->features &NETIF_F_RXHASH )) { -e_err ("Jumbo frames cannot be enabled when both receive checksum offload and receive hashing are enabled. Disable one of the receive offload features before enabling jumbos.\n" ); -return -EINVAL ; +netdev_features_t features; + +/* Disable receive hashing if conflicted */ + features = netdev->features & (~NETIF_F_RXHASH ); +if (e1000_set_features (netdev, features)) { +e_err ("Jumbo frames cannot be enabled when both receive checksum offload and receive hashing are enabled. Disable one of the receive offload features before enabling jumbos.\n" ); +return -EINVAL ; + } +e_info ("Jumbo frames cannot be enabled when both receive checksum offload and receive hashing are enabled. Disabling Receive Hashing.\n" ); } }
Signature · 14 lines
1.7.10.2 ------------------------------------------------------------------------------ Live Security Virtual Conference Exclusive live event will cover all the ways today's security and threat landscape has changed and how IT managers can respond. Discussions will include endpoint security, mobile security and the latest in malware threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/ _______________________________________________ E1000-devel mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/e1000-devel To learn more about Intel® Ethernet, visit http://communities.intel.com/community/wired
David Miller
maintainerFrom: Joe Jin <[email protected]>
Date: Fri, 08 Jun 2012 09:06:40 +0800
Quoted 10 lines
Upstream commit 70495a5 check if both rxhash and rxcsum enabled when enabling jumbo frames and disallowed all of them enabled at the same time.
Since jumbo frame widely be used in real world, so when try to enable jumbo frames but rxhash and rxcsum have enabled, change the default behavior to disable receive hashing.
Signed-off-by Joe Jin <[email protected]>Signed-off-by Guru Anbalagane <[email protected]>Acked-by Adnan Misherfi <[email protected]>
If I were the Intel developers I would not apply this patch, it sets a very bad precedence.
The tool tells you that the combination you're attempting to use is invalid, and the kernel log message tells you exactly why.
The driver should never automatically change configuration settings not actually requested by the user.
Quoted 27 lines
-----Original Message-----
From: David Miller [mailto:[email protected]]
Sent: Thursday, June 07, 2012 6:12 PM
To: [email protected]
Cc: [email protected]; [email protected]; Allan, Bruce W; Brandeburg, Jesse; [email protected]; Ronciak, John; [email protected]; [email protected]
Subject: Re: [E1000-devel] [PATCH] e1000e: disable rxhash when try to enable jumbo frame also rxhash and rxcsum have enabledFrom: Joe Jin <[email protected]>
Date: Fri, 08 Jun 2012 09:06:40 +0800Quoted 1 line
Upstream commit 70495a5 check if both rxhash and rxcsum enabled when
enabling
Quoted 3 lines
jumbo frames and disallowed all of them enabled at the same time.
Since jumbo frame widely be used in real world, so when try to
enable jumbo
Quoted 1 line
frames but rxhash and rxcsum have enabled, change the default
behavior to
Quoted 5 lines
disable receive hashing.
Signed-off-by Joe Jin <[email protected]>Signed-off-by Guru Anbalagane <[email protected]>Acked-by Adnan Misherfi <[email protected]>
Quoted 8 lines
If I were the Intel developers I would not apply this patch, it sets a very bad precedence.
The tool tells you that the combination you're attempting to use is invalid, and the kernel log message tells you exactly why.
The driver should never automatically change configuration settings not actually requested by the user.
I've been working on another patch that removes the issue with disabling one feature over another altogether, so this patch would be moot. It will be pushed to our internal testing organization in the next day or two.
------------------------------------------------------------------------------
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and
threat landscape has changed and how IT managers can respond. Discussions will include endpoint security, mobile security and the latest in malware threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
_______________________________________________
E1000-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/e1000-devel
To learn more about Intel® Ethernet, visit http://communities.intel.com/community/wired