aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/myri10ge/myri10ge.c
diff options
context:
space:
mode:
authorBrice Goglin <brice@myri.com>2007-03-27 15:54:53 -0400
committerJeff Garzik <jeff@garzik.org>2007-03-28 02:18:50 -0400
commit917690cd035b422b1ac933ac160d26016aa454ac (patch)
tree7fa878d49198084cc42475e802b22e86c70cfabf /drivers/net/myri10ge/myri10ge.c
parent28defbea64622f69d65a6079bf800cedb9915a5f (diff)
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. Signed-off-by: Brice Goglin <brice@myri.com> Signed-off-by: Jeff Garzik <jeff@garzik.org>
Diffstat (limited to 'drivers/net/myri10ge/myri10ge.c')
-rw-r--r--drivers/net/myri10ge/myri10ge.c7
1 files changed, 3 insertions, 4 deletions
diff --git a/drivers/net/myri10ge/myri10ge.c b/drivers/net/myri10ge/myri10ge.c
index b05b20ef8c0a..c216e6a5d235 100644
--- a/drivers/net/myri10ge/myri10ge.c
+++ b/drivers/net/myri10ge/myri10ge.c
@@ -71,7 +71,7 @@
71#include "myri10ge_mcp.h" 71#include "myri10ge_mcp.h"
72#include "myri10ge_mcp_gen_header.h" 72#include "myri10ge_mcp_gen_header.h"
73 73
74#define MYRI10GE_VERSION_STR "1.3.0-1.226" 74#define MYRI10GE_VERSION_STR "1.3.0-1.227"
75 75
76MODULE_DESCRIPTION("Myricom 10G driver (10GbE)"); 76MODULE_DESCRIPTION("Myricom 10G driver (10GbE)");
77MODULE_AUTHOR("Maintainer: help@myri.com"); 77MODULE_AUTHOR("Maintainer: help@myri.com");
@@ -2015,10 +2015,9 @@ again:
2015 mss = 0; 2015 mss = 0;
2016 max_segments = MXGEFW_MAX_SEND_DESC; 2016 max_segments = MXGEFW_MAX_SEND_DESC;
2017 2017
2018 if (skb->len > (dev->mtu + ETH_HLEN)) { 2018 if (skb_is_gso(skb)) {
2019 mss = skb_shinfo(skb)->gso_size; 2019 mss = skb_shinfo(skb)->gso_size;
2020 if (mss != 0) 2020 max_segments = MYRI10GE_MAX_SEND_DESC_TSO;
2021 max_segments = MYRI10GE_MAX_SEND_DESC_TSO;
2022 } 2021 }
2023 2022
2024 if ((unlikely(avail < max_segments))) { 2023 if ((unlikely(avail < max_segments))) {