diff mbox

[11/13] bnx2x: Forbid LRO on when XEN is enabled

Message ID 1271602258.27235.200.camel@lb-tlvb-vladz
State Changes Requested, archived
Delegated to: David Miller
Headers show

Commit Message

Vladislav Zolotarov April 18, 2010, 2:50 p.m. UTC
LRO cannot be used on virtualized environment, so it is best
to disable it on compile time in XEN kernel.


Author: Dmitry Kravkov <dmitry@broadcom.com>
Signed-off-by: Dmitry Kravkov <dmitry@broadcom.com>
Signed-off-by: Vladislav Zolotarov <vladz@broadcom.com>
Signed-off-by: Eilon Greenstein <eilong@broadcom.com>
---
 drivers/net/bnx2x_main.c |    4 ++++
 1 files changed, 4 insertions(+), 0 deletions(-)

Comments

Ben Hutchings April 18, 2010, 3:11 p.m. UTC | #1
On Sun, 2010-04-18 at 17:50 +0300, Vladislav Zolotarov wrote:
> LRO cannot be used on virtualized environment, so it is best
> to disable it on compile time in XEN kernel.
[...]

If you want to cripple your performance, I'm not going to stand in your
way, but be aware that most distribution kernels now enable CONFIG_XEN.

Ben.
David Miller April 19, 2010, 3:58 a.m. UTC | #2
From: Ben Hutchings <bhutchings@solarflare.com>
Date: Sun, 18 Apr 2010 16:11:25 +0100

> On Sun, 2010-04-18 at 17:50 +0300, Vladislav Zolotarov wrote:
>> LRO cannot be used on virtualized environment, so it is best
>> to disable it on compile time in XEN kernel.
> [...]
> 
> If you want to cripple your performance, I'm not going to stand in your
> way, but be aware that most distribution kernels now enable CONFIG_XEN.

There is also zero reason to do this.

When the XEN code or whatever setups up the bridge, LRO will be
disabled by the bridge code.

It automatically issues ethtool LRO disable commands to the devices
involved in the bridge configuration.  And it has done this for
a _long_ time.  The ipv4 routing code will do the same.

This change is bogus and likely based upon behavior in some ancient
distribution kernel that lacks the ethtool facilities.

I absolutely refuse to apply this.
--
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
stephen hemminger April 19, 2010, 4:14 p.m. UTC | #3
On Sun, 18 Apr 2010 20:58:58 -0700 (PDT)
David Miller <davem@davemloft.net> wrote:

> From: Ben Hutchings <bhutchings@solarflare.com>
> Date: Sun, 18 Apr 2010 16:11:25 +0100
> 
> > On Sun, 2010-04-18 at 17:50 +0300, Vladislav Zolotarov wrote:
> >> LRO cannot be used on virtualized environment, so it is best
> >> to disable it on compile time in XEN kernel.
> > [...]
> > 
> > If you want to cripple your performance, I'm not going to stand in your
> > way, but be aware that most distribution kernels now enable CONFIG_XEN.
> 
> There is also zero reason to do this.
> 
> When the XEN code or whatever setups up the bridge, LRO will be
> disabled by the bridge code.
> 
> It automatically issues ethtool LRO disable commands to the devices
> involved in the bridge configuration.  And it has done this for
> a _long_ time.  The ipv4 routing code will do the same.
> 
> This change is bogus and likely based upon behavior in some ancient
> distribution kernel that lacks the ethtool facilities.
> 
> I absolutely refuse to apply this.

Agreed. It is often devices that implement LRO, but don't have way
to turn it off.
--
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/drivers/net/bnx2x_main.c b/drivers/net/bnx2x_main.c
index a35def6..ab9a9eb 100644
--- a/drivers/net/bnx2x_main.c
+++ b/drivers/net/bnx2x_main.c
@@ -52,6 +52,10 @@ 
 #include <linux/stringify.h>
 
 
+#if defined(CONFIG_XEN)
+#define __NO_TPA__		1
+#endif
+
 #include "bnx2x.h"
 #include "bnx2x_init.h"
 #include "bnx2x_init_ops.h"