diff mbox

[net-2.6,2/2] net: Disable NETIF_F_TSO_ECN when TSO is disabled

Message ID 1302655635.2880.35.camel@bwh-desktop
State Accepted, archived
Delegated to: David Miller
Headers show

Commit Message

Ben Hutchings April 13, 2011, 12:47 a.m. UTC
NETIF_F_TSO_ECN has no effect when TSO is disabled; this just means
that feature state will be accurately reported to user-space.

Signed-off-by: Ben Hutchings <bhutchings@solarflare.com>
---
This one is silent; I'm not sure that it's worth mentioning as the
feature flag previously had no effect on its own anyway.

Ben.

 net/core/dev.c |    4 ++++
 1 files changed, 4 insertions(+), 0 deletions(-)

Comments

David Miller April 13, 2011, 2:30 a.m. UTC | #1
From: Ben Hutchings <bhutchings@solarflare.com>
Date: Wed, 13 Apr 2011 01:47:15 +0100

> NETIF_F_TSO_ECN has no effect when TSO is disabled; this just means
> that feature state will be accurately reported to user-space.
> 
> Signed-off-by: Ben Hutchings <bhutchings@solarflare.com>

Applied.
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
diff mbox

Patch

diff --git a/net/core/dev.c b/net/core/dev.c
index 6401fb5..c2ac599 100644
--- a/net/core/dev.c
+++ b/net/core/dev.c
@@ -5208,6 +5208,10 @@  u32 netdev_fix_features(struct net_device *dev, u32 features)
 		features &= ~NETIF_F_ALL_TSO;
 	}
 
+	/* TSO ECN requires that TSO is present as well. */
+	if ((features & NETIF_F_ALL_TSO) == NETIF_F_TSO_ECN)
+		features &= ~NETIF_F_TSO_ECN;
+
 	/* Software GSO depends on SG. */
 	if ((features & NETIF_F_GSO) && !(features & NETIF_F_SG)) {
 		netdev_info(dev, "Dropping NETIF_F_GSO since no SG feature.\n");