aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/e1000/e1000_main.c
diff options
context:
space:
mode:
authorHerbert Xu <herbert@gondor.apana.org.au>2006-07-08 16:34:32 -0400
committerDavid S. Miller <davem@davemloft.net>2006-07-08 16:34:32 -0400
commit89114afd435a486deb8583e89f490fc274444d18 (patch)
tree800e784ba59755f9f3c9926a6992e1d0f5b8eec7 /drivers/net/e1000/e1000_main.c
parent9c6c6795eda34e4dc38ecac912a16b6314082beb (diff)
[NET] gso: Add skb_is_gso
This patch adds the wrapper function skb_is_gso which can be used instead of directly testing skb_shinfo(skb)->gso_size. This makes things a little nicer and allows us to change the primary key for indicating whether an skb is GSO (if we ever want to do that). Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/e1000/e1000_main.c')
-rw-r--r--drivers/net/e1000/e1000_main.c7
1 files changed, 3 insertions, 4 deletions
diff --git a/drivers/net/e1000/e1000_main.c b/drivers/net/e1000/e1000_main.c
index f77624f5f17b..1f34d06d01b0 100644
--- a/drivers/net/e1000/e1000_main.c
+++ b/drivers/net/e1000/e1000_main.c
@@ -2394,7 +2394,7 @@ e1000_tso(struct e1000_adapter *adapter, struct e1000_tx_ring *tx_ring,
2394 uint8_t ipcss, ipcso, tucss, tucso, hdr_len; 2394 uint8_t ipcss, ipcso, tucss, tucso, hdr_len;
2395 int err; 2395 int err;
2396 2396
2397 if (skb_shinfo(skb)->gso_size) { 2397 if (skb_is_gso(skb)) {
2398 if (skb_header_cloned(skb)) { 2398 if (skb_header_cloned(skb)) {
2399 err = pskb_expand_head(skb, 0, 0, GFP_ATOMIC); 2399 err = pskb_expand_head(skb, 0, 0, GFP_ATOMIC);
2400 if (err) 2400 if (err)
@@ -2519,7 +2519,7 @@ e1000_tx_map(struct e1000_adapter *adapter, struct e1000_tx_ring *tx_ring,
2519 * tso gets written back prematurely before the data is fully 2519 * tso gets written back prematurely before the data is fully
2520 * DMA'd to the controller */ 2520 * DMA'd to the controller */
2521 if (!skb->data_len && tx_ring->last_tx_tso && 2521 if (!skb->data_len && tx_ring->last_tx_tso &&
2522 !skb_shinfo(skb)->gso_size) { 2522 !skb_is_gso(skb)) {
2523 tx_ring->last_tx_tso = 0; 2523 tx_ring->last_tx_tso = 0;
2524 size -= 4; 2524 size -= 4;
2525 } 2525 }
@@ -2806,8 +2806,7 @@ e1000_xmit_frame(struct sk_buff *skb, struct net_device *netdev)
2806 2806
2807#ifdef NETIF_F_TSO 2807#ifdef NETIF_F_TSO
2808 /* Controller Erratum workaround */ 2808 /* Controller Erratum workaround */
2809 if (!skb->data_len && tx_ring->last_tx_tso && 2809 if (!skb->data_len && tx_ring->last_tx_tso && !skb_is_gso(skb))
2810 !skb_shinfo(skb)->gso_size)
2811 count++; 2810 count++;
2812#endif 2811#endif
2813 2812