Skip to contentSkip to conversation

myri10ge fix for 2.6.21

PATCH Applied Brice Goglin 2 participants 4 messages Mar 27, 2007 – Mar 28, 2007

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

cover myri10ge fix for 2.6.21

Hi Jeff,

Here's a last minute fix for myri10ge in 2.6.21. Please apply.

Thanks,
Brice

#1 lore raw

PATCH 1/1 myri10ge: correctly detect when TSO should be used

Correctly detect when TSO should be used on transmit by looking at the skb->gso_size rather than seeing if the frame was larger than our MTU. The old method causes problems when a host with a large (jumbo) MTU is sending to a host with a small (standard) MTU.

---
 drivers/net/myri10ge/myri10ge.c |    7 +++----
 1 file changed, 3 insertions(+), 4 deletions(-)
drivers/net/myri10ge/myri10ge.c +3 -4
Index: linux-rc/drivers/net/myri10ge/myri10ge.c
===================================================================
@@ -71,7 +71,7 @@
 #include "myri10ge_mcp.h"
 #include "myri10ge_mcp_gen_header.h"
 
-#define MYRI10GE_VERSION_STR "1.3.0-1.226"
+#define MYRI10GE_VERSION_STR "1.3.0-1.227"
 
 MODULE_DESCRIPTION("Myricom 10G driver (10GbE)");
 MODULE_AUTHOR("Maintainer: [email protected]");
@@ -2015,10 +2015,9 @@
 	mss = 0;
 	max_segments = MXGEFW_MAX_SEND_DESC;
 
-	if (skb->len > (dev->mtu + ETH_HLEN)) {
+	if (skb_is_gso(skb)) {
 		mss = skb_shinfo(skb)->gso_size;
-		if (mss != 0)
-			max_segments = MYRI10GE_MAX_SEND_DESC_TSO;
+		max_segments = MYRI10GE_MAX_SEND_DESC_TSO;
 	}
 
 	if ((unlikely(avail < max_segments))) {
#2 lore raw

PATCH 1/1 myri10ge: correctly detect when TSO should be used

In reply to Brice Goglin

Correctly detect when TSO should be used on transmit by looking at the skb->gso_size rather than seeing if the frame was larger than our MTU. The old method causes problems when a host with a large (jumbo) MTU is sending to a host with a small (standard) MTU.

---
 drivers/net/myri10ge/myri10ge.c |    7 +++----
 1 file changed, 3 insertions(+), 4 deletions(-)
drivers/net/myri10ge/myri10ge.c +3 -4
Index: linux-rc/drivers/net/myri10ge/myri10ge.c
===================================================================
@@ -71,7 +71,7 @@
 #include "myri10ge_mcp.h"
 #include "myri10ge_mcp_gen_header.h"
 
-#define MYRI10GE_VERSION_STR "1.3.0-1.226"
+#define MYRI10GE_VERSION_STR "1.3.0-1.227"
 
 MODULE_DESCRIPTION("Myricom 10G driver (10GbE)");
 MODULE_AUTHOR("Maintainer: [email protected]");
@@ -2015,10 +2015,9 @@
 	mss = 0;
 	max_segments = MXGEFW_MAX_SEND_DESC;
 
-	if (skb->len > (dev->mtu + ETH_HLEN)) {
+	if (skb_is_gso(skb)) {
 		mss = skb_shinfo(skb)->gso_size;
-		if (mss != 0)
-			max_segments = MYRI10GE_MAX_SEND_DESC_TSO;
+		max_segments = MYRI10GE_MAX_SEND_DESC_TSO;
 	}
 
 	if ((unlikely(avail < max_segments))) {
Applied
#3 lore raw

Re: [PATCH 1/1] myri10ge: correctly detect when TSO should be used

Quoted 9 lines · Brice Goglin

Correctly detect when TSO should be used on transmit by looking at the skb->gso_size rather than seeing if the frame was larger than our MTU. The old method causes problems when a host with a large (jumbo) MTU is sending to a host with a small (standard) MTU.

---
 drivers/net/myri10ge/myri10ge.c |    7 +++----
 1 file changed, 3 insertions(+), 4 deletions(-)

applied to #upstream-fixes