diff options
author | Herbert Xu <herbert@gondor.apana.org.au> | 2006-06-22 05:40:14 -0400 |
---|---|---|
committer | David S. Miller <davem@sunset.davemloft.net> | 2006-06-23 05:07:29 -0400 |
commit | 7967168cefdbc63bf332d6b1548eca7cd65ebbcc (patch) | |
tree | c45759149ae0acdc89d746e556a0ae278d11776d /drivers | |
parent | d4828d85d188dc70ed172802e798d3978bb6e29e (diff) |
[NET]: Merge TSO/UFO fields in sk_buff
Having separate fields in sk_buff for TSO/UFO (tso_size/ufo_size) is not
going to scale if we add any more segmentation methods (e.g., DCCP). So
let's merge them.
They were used to tell the protocol of a packet. This function has been
subsumed by the new gso_type field. This is essentially a set of netdev
feature bits (shifted by 16 bits) that are required to process a specific
skb. As such it's easy to tell whether a given device can process a GSO
skb: you just have to and the gso_type field and the netdev's features
field.
I've made gso_type a conjunction. The idea is that you have a base type
(e.g., SKB_GSO_TCPV4) that can be modified further to support new features.
For example, if we add a hardware TSO type that supports ECN, they would
declare NETIF_F_TSO | NETIF_F_TSO_ECN. All TSO packets with CWR set would
have a gso_type of SKB_GSO_TCPV4 | SKB_GSO_TCPV4_ECN while all other TSO
packets would be SKB_GSO_TCPV4. This means that only the CWR packets need
to be emulated in software.
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/net/8139cp.c | 2 | ||||
-rw-r--r-- | drivers/net/bnx2.c | 4 | ||||
-rw-r--r-- | drivers/net/chelsio/sge.c | 4 | ||||
-rw-r--r-- | drivers/net/e1000/e1000_main.c | 10 | ||||
-rw-r--r-- | drivers/net/forcedeth.c | 4 | ||||
-rw-r--r-- | drivers/net/ixgb/ixgb_main.c | 4 | ||||
-rw-r--r-- | drivers/net/loopback.c | 4 | ||||
-rw-r--r-- | drivers/net/myri10ge/myri10ge.c | 4 | ||||
-rw-r--r-- | drivers/net/r8169.c | 2 | ||||
-rw-r--r-- | drivers/net/s2io.c | 16 | ||||
-rw-r--r-- | drivers/net/sky2.c | 4 | ||||
-rw-r--r-- | drivers/net/tg3.c | 4 | ||||
-rw-r--r-- | drivers/net/typhoon.c | 2 | ||||
-rw-r--r-- | drivers/s390/net/qeth_eddp.c | 12 | ||||
-rw-r--r-- | drivers/s390/net/qeth_main.c | 4 | ||||
-rw-r--r-- | drivers/s390/net/qeth_tso.h | 2 |
16 files changed, 41 insertions, 41 deletions
diff --git a/drivers/net/8139cp.c b/drivers/net/8139cp.c index a26077a175ad..0cdc830449d8 100644 --- a/drivers/net/8139cp.c +++ b/drivers/net/8139cp.c | |||
@@ -797,7 +797,7 @@ static int cp_start_xmit (struct sk_buff *skb, struct net_device *dev) | |||
797 | entry = cp->tx_head; | 797 | entry = cp->tx_head; |
798 | eor = (entry == (CP_TX_RING_SIZE - 1)) ? RingEnd : 0; | 798 | eor = (entry == (CP_TX_RING_SIZE - 1)) ? RingEnd : 0; |
799 | if (dev->features & NETIF_F_TSO) | 799 | if (dev->features & NETIF_F_TSO) |
800 | mss = skb_shinfo(skb)->tso_size; | 800 | mss = skb_shinfo(skb)->gso_size; |
801 | 801 | ||
802 | if (skb_shinfo(skb)->nr_frags == 0) { | 802 | if (skb_shinfo(skb)->nr_frags == 0) { |
803 | struct cp_desc *txd = &cp->tx_ring[entry]; | 803 | struct cp_desc *txd = &cp->tx_ring[entry]; |
diff --git a/drivers/net/bnx2.c b/drivers/net/bnx2.c index 702d546567ad..7635736cc791 100644 --- a/drivers/net/bnx2.c +++ b/drivers/net/bnx2.c | |||
@@ -1640,7 +1640,7 @@ bnx2_tx_int(struct bnx2 *bp) | |||
1640 | skb = tx_buf->skb; | 1640 | skb = tx_buf->skb; |
1641 | #ifdef BCM_TSO | 1641 | #ifdef BCM_TSO |
1642 | /* partial BD completions possible with TSO packets */ | 1642 | /* partial BD completions possible with TSO packets */ |
1643 | if (skb_shinfo(skb)->tso_size) { | 1643 | if (skb_shinfo(skb)->gso_size) { |
1644 | u16 last_idx, last_ring_idx; | 1644 | u16 last_idx, last_ring_idx; |
1645 | 1645 | ||
1646 | last_idx = sw_cons + | 1646 | last_idx = sw_cons + |
@@ -4428,7 +4428,7 @@ bnx2_start_xmit(struct sk_buff *skb, struct net_device *dev) | |||
4428 | (TX_BD_FLAGS_VLAN_TAG | (vlan_tx_tag_get(skb) << 16)); | 4428 | (TX_BD_FLAGS_VLAN_TAG | (vlan_tx_tag_get(skb) << 16)); |
4429 | } | 4429 | } |
4430 | #ifdef BCM_TSO | 4430 | #ifdef BCM_TSO |
4431 | if ((mss = skb_shinfo(skb)->tso_size) && | 4431 | if ((mss = skb_shinfo(skb)->gso_size) && |
4432 | (skb->len > (bp->dev->mtu + ETH_HLEN))) { | 4432 | (skb->len > (bp->dev->mtu + ETH_HLEN))) { |
4433 | u32 tcp_opt_len, ip_tcp_len; | 4433 | u32 tcp_opt_len, ip_tcp_len; |
4434 | 4434 | ||
diff --git a/drivers/net/chelsio/sge.c b/drivers/net/chelsio/sge.c index 4391bf4bf573..53efff6da784 100644 --- a/drivers/net/chelsio/sge.c +++ b/drivers/net/chelsio/sge.c | |||
@@ -1418,7 +1418,7 @@ int t1_start_xmit(struct sk_buff *skb, struct net_device *dev) | |||
1418 | struct cpl_tx_pkt *cpl; | 1418 | struct cpl_tx_pkt *cpl; |
1419 | 1419 | ||
1420 | #ifdef NETIF_F_TSO | 1420 | #ifdef NETIF_F_TSO |
1421 | if (skb_shinfo(skb)->tso_size) { | 1421 | if (skb_shinfo(skb)->gso_size) { |
1422 | int eth_type; | 1422 | int eth_type; |
1423 | struct cpl_tx_pkt_lso *hdr; | 1423 | struct cpl_tx_pkt_lso *hdr; |
1424 | 1424 | ||
@@ -1433,7 +1433,7 @@ int t1_start_xmit(struct sk_buff *skb, struct net_device *dev) | |||
1433 | hdr->ip_hdr_words = skb->nh.iph->ihl; | 1433 | hdr->ip_hdr_words = skb->nh.iph->ihl; |
1434 | hdr->tcp_hdr_words = skb->h.th->doff; | 1434 | hdr->tcp_hdr_words = skb->h.th->doff; |
1435 | hdr->eth_type_mss = htons(MK_ETH_TYPE_MSS(eth_type, | 1435 | hdr->eth_type_mss = htons(MK_ETH_TYPE_MSS(eth_type, |
1436 | skb_shinfo(skb)->tso_size)); | 1436 | skb_shinfo(skb)->gso_size)); |
1437 | hdr->len = htonl(skb->len - sizeof(*hdr)); | 1437 | hdr->len = htonl(skb->len - sizeof(*hdr)); |
1438 | cpl = (struct cpl_tx_pkt *)hdr; | 1438 | cpl = (struct cpl_tx_pkt *)hdr; |
1439 | sge->stats.tx_lso_pkts++; | 1439 | sge->stats.tx_lso_pkts++; |
diff --git a/drivers/net/e1000/e1000_main.c b/drivers/net/e1000/e1000_main.c index a373ccb308d8..32b7d444b374 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)->tso_size) { | 2397 | if (skb_shinfo(skb)->gso_size) { |
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) |
@@ -2402,7 +2402,7 @@ e1000_tso(struct e1000_adapter *adapter, struct e1000_tx_ring *tx_ring, | |||
2402 | } | 2402 | } |
2403 | 2403 | ||
2404 | hdr_len = ((skb->h.raw - skb->data) + (skb->h.th->doff << 2)); | 2404 | hdr_len = ((skb->h.raw - skb->data) + (skb->h.th->doff << 2)); |
2405 | mss = skb_shinfo(skb)->tso_size; | 2405 | mss = skb_shinfo(skb)->gso_size; |
2406 | if (skb->protocol == htons(ETH_P_IP)) { | 2406 | if (skb->protocol == htons(ETH_P_IP)) { |
2407 | skb->nh.iph->tot_len = 0; | 2407 | skb->nh.iph->tot_len = 0; |
2408 | skb->nh.iph->check = 0; | 2408 | skb->nh.iph->check = 0; |
@@ -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)->tso_size) { | 2522 | !skb_shinfo(skb)->gso_size) { |
2523 | tx_ring->last_tx_tso = 0; | 2523 | tx_ring->last_tx_tso = 0; |
2524 | size -= 4; | 2524 | size -= 4; |
2525 | } | 2525 | } |
@@ -2757,7 +2757,7 @@ e1000_xmit_frame(struct sk_buff *skb, struct net_device *netdev) | |||
2757 | } | 2757 | } |
2758 | 2758 | ||
2759 | #ifdef NETIF_F_TSO | 2759 | #ifdef NETIF_F_TSO |
2760 | mss = skb_shinfo(skb)->tso_size; | 2760 | mss = skb_shinfo(skb)->gso_size; |
2761 | /* The controller does a simple calculation to | 2761 | /* The controller does a simple calculation to |
2762 | * make sure there is enough room in the FIFO before | 2762 | * make sure there is enough room in the FIFO before |
2763 | * initiating the DMA for each buffer. The calc is: | 2763 | * initiating the DMA for each buffer. The calc is: |
@@ -2807,7 +2807,7 @@ e1000_xmit_frame(struct sk_buff *skb, struct net_device *netdev) | |||
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 && |
2810 | !skb_shinfo(skb)->tso_size) | 2810 | !skb_shinfo(skb)->gso_size) |
2811 | count++; | 2811 | count++; |
2812 | #endif | 2812 | #endif |
2813 | 2813 | ||
diff --git a/drivers/net/forcedeth.c b/drivers/net/forcedeth.c index 191383d461d7..21be4fa071b5 100644 --- a/drivers/net/forcedeth.c +++ b/drivers/net/forcedeth.c | |||
@@ -1495,8 +1495,8 @@ static int nv_start_xmit(struct sk_buff *skb, struct net_device *dev) | |||
1495 | np->tx_skbuff[nr] = skb; | 1495 | np->tx_skbuff[nr] = skb; |
1496 | 1496 | ||
1497 | #ifdef NETIF_F_TSO | 1497 | #ifdef NETIF_F_TSO |
1498 | if (skb_shinfo(skb)->tso_size) | 1498 | if (skb_shinfo(skb)->gso_size) |
1499 | tx_flags_extra = NV_TX2_TSO | (skb_shinfo(skb)->tso_size << NV_TX2_TSO_SHIFT); | 1499 | tx_flags_extra = NV_TX2_TSO | (skb_shinfo(skb)->gso_size << NV_TX2_TSO_SHIFT); |
1500 | else | 1500 | else |
1501 | #endif | 1501 | #endif |
1502 | tx_flags_extra = (skb->ip_summed == CHECKSUM_HW ? (NV_TX2_CHECKSUM_L3|NV_TX2_CHECKSUM_L4) : 0); | 1502 | tx_flags_extra = (skb->ip_summed == CHECKSUM_HW ? (NV_TX2_CHECKSUM_L3|NV_TX2_CHECKSUM_L4) : 0); |
diff --git a/drivers/net/ixgb/ixgb_main.c b/drivers/net/ixgb/ixgb_main.c index 57006fb8840e..8bb32f946993 100644 --- a/drivers/net/ixgb/ixgb_main.c +++ b/drivers/net/ixgb/ixgb_main.c | |||
@@ -1173,7 +1173,7 @@ ixgb_tso(struct ixgb_adapter *adapter, struct sk_buff *skb) | |||
1173 | uint16_t ipcse, tucse, mss; | 1173 | uint16_t ipcse, tucse, mss; |
1174 | int err; | 1174 | int err; |
1175 | 1175 | ||
1176 | if(likely(skb_shinfo(skb)->tso_size)) { | 1176 | if(likely(skb_shinfo(skb)->gso_size)) { |
1177 | if (skb_header_cloned(skb)) { | 1177 | if (skb_header_cloned(skb)) { |
1178 | err = pskb_expand_head(skb, 0, 0, GFP_ATOMIC); | 1178 | err = pskb_expand_head(skb, 0, 0, GFP_ATOMIC); |
1179 | if (err) | 1179 | if (err) |
@@ -1181,7 +1181,7 @@ ixgb_tso(struct ixgb_adapter *adapter, struct sk_buff *skb) | |||
1181 | } | 1181 | } |
1182 | 1182 | ||
1183 | hdr_len = ((skb->h.raw - skb->data) + (skb->h.th->doff << 2)); | 1183 | hdr_len = ((skb->h.raw - skb->data) + (skb->h.th->doff << 2)); |
1184 | mss = skb_shinfo(skb)->tso_size; | 1184 | mss = skb_shinfo(skb)->gso_size; |
1185 | skb->nh.iph->tot_len = 0; | 1185 | skb->nh.iph->tot_len = 0; |
1186 | skb->nh.iph->check = 0; | 1186 | skb->nh.iph->check = 0; |
1187 | skb->h.th->check = ~csum_tcpudp_magic(skb->nh.iph->saddr, | 1187 | skb->h.th->check = ~csum_tcpudp_magic(skb->nh.iph->saddr, |
diff --git a/drivers/net/loopback.c b/drivers/net/loopback.c index b79d6e8d3045..43fef7de8cb9 100644 --- a/drivers/net/loopback.c +++ b/drivers/net/loopback.c | |||
@@ -74,7 +74,7 @@ static void emulate_large_send_offload(struct sk_buff *skb) | |||
74 | struct iphdr *iph = skb->nh.iph; | 74 | struct iphdr *iph = skb->nh.iph; |
75 | struct tcphdr *th = (struct tcphdr*)(skb->nh.raw + (iph->ihl * 4)); | 75 | struct tcphdr *th = (struct tcphdr*)(skb->nh.raw + (iph->ihl * 4)); |
76 | unsigned int doffset = (iph->ihl + th->doff) * 4; | 76 | unsigned int doffset = (iph->ihl + th->doff) * 4; |
77 | unsigned int mtu = skb_shinfo(skb)->tso_size + doffset; | 77 | unsigned int mtu = skb_shinfo(skb)->gso_size + doffset; |
78 | unsigned int offset = 0; | 78 | unsigned int offset = 0; |
79 | u32 seq = ntohl(th->seq); | 79 | u32 seq = ntohl(th->seq); |
80 | u16 id = ntohs(iph->id); | 80 | u16 id = ntohs(iph->id); |
@@ -139,7 +139,7 @@ static int loopback_xmit(struct sk_buff *skb, struct net_device *dev) | |||
139 | #endif | 139 | #endif |
140 | 140 | ||
141 | #ifdef LOOPBACK_TSO | 141 | #ifdef LOOPBACK_TSO |
142 | if (skb_shinfo(skb)->tso_size) { | 142 | if (skb_shinfo(skb)->gso_size) { |
143 | BUG_ON(skb->protocol != htons(ETH_P_IP)); | 143 | BUG_ON(skb->protocol != htons(ETH_P_IP)); |
144 | BUG_ON(skb->nh.iph->protocol != IPPROTO_TCP); | 144 | BUG_ON(skb->nh.iph->protocol != IPPROTO_TCP); |
145 | 145 | ||
diff --git a/drivers/net/myri10ge/myri10ge.c b/drivers/net/myri10ge/myri10ge.c index b983e1e04348..dbdf189436fa 100644 --- a/drivers/net/myri10ge/myri10ge.c +++ b/drivers/net/myri10ge/myri10ge.c | |||
@@ -1879,7 +1879,7 @@ again: | |||
1879 | 1879 | ||
1880 | #ifdef NETIF_F_TSO | 1880 | #ifdef NETIF_F_TSO |
1881 | if (skb->len > (dev->mtu + ETH_HLEN)) { | 1881 | if (skb->len > (dev->mtu + ETH_HLEN)) { |
1882 | mss = skb_shinfo(skb)->tso_size; | 1882 | mss = skb_shinfo(skb)->gso_size; |
1883 | if (mss != 0) | 1883 | if (mss != 0) |
1884 | max_segments = MYRI10GE_MAX_SEND_DESC_TSO; | 1884 | max_segments = MYRI10GE_MAX_SEND_DESC_TSO; |
1885 | } | 1885 | } |
@@ -2112,7 +2112,7 @@ abort_linearize: | |||
2112 | } | 2112 | } |
2113 | idx = (idx + 1) & tx->mask; | 2113 | idx = (idx + 1) & tx->mask; |
2114 | } while (idx != last_idx); | 2114 | } while (idx != last_idx); |
2115 | if (skb_shinfo(skb)->tso_size) { | 2115 | if (skb_shinfo(skb)->gso_size) { |
2116 | printk(KERN_ERR | 2116 | printk(KERN_ERR |
2117 | "myri10ge: %s: TSO but wanted to linearize?!?!?\n", | 2117 | "myri10ge: %s: TSO but wanted to linearize?!?!?\n", |
2118 | mgp->dev->name); | 2118 | mgp->dev->name); |
diff --git a/drivers/net/r8169.c b/drivers/net/r8169.c index 985afe0e6273..12d1cb289bb0 100644 --- a/drivers/net/r8169.c +++ b/drivers/net/r8169.c | |||
@@ -2172,7 +2172,7 @@ static int rtl8169_xmit_frags(struct rtl8169_private *tp, struct sk_buff *skb, | |||
2172 | static inline u32 rtl8169_tso_csum(struct sk_buff *skb, struct net_device *dev) | 2172 | static inline u32 rtl8169_tso_csum(struct sk_buff *skb, struct net_device *dev) |
2173 | { | 2173 | { |
2174 | if (dev->features & NETIF_F_TSO) { | 2174 | if (dev->features & NETIF_F_TSO) { |
2175 | u32 mss = skb_shinfo(skb)->tso_size; | 2175 | u32 mss = skb_shinfo(skb)->gso_size; |
2176 | 2176 | ||
2177 | if (mss) | 2177 | if (mss) |
2178 | return LargeSend | ((mss & MSSMask) << MSSShift); | 2178 | return LargeSend | ((mss & MSSMask) << MSSShift); |
diff --git a/drivers/net/s2io.c b/drivers/net/s2io.c index 11daed495b97..3defe5d4f7d3 100644 --- a/drivers/net/s2io.c +++ b/drivers/net/s2io.c | |||
@@ -3959,8 +3959,8 @@ static int s2io_xmit(struct sk_buff *skb, struct net_device *dev) | |||
3959 | txdp->Control_1 = 0; | 3959 | txdp->Control_1 = 0; |
3960 | txdp->Control_2 = 0; | 3960 | txdp->Control_2 = 0; |
3961 | #ifdef NETIF_F_TSO | 3961 | #ifdef NETIF_F_TSO |
3962 | mss = skb_shinfo(skb)->tso_size; | 3962 | mss = skb_shinfo(skb)->gso_size; |
3963 | if (mss) { | 3963 | if (skb_shinfo(skb)->gso_type == SKB_GSO_TCPV4) { |
3964 | txdp->Control_1 |= TXD_TCP_LSO_EN; | 3964 | txdp->Control_1 |= TXD_TCP_LSO_EN; |
3965 | txdp->Control_1 |= TXD_TCP_LSO_MSS(mss); | 3965 | txdp->Control_1 |= TXD_TCP_LSO_MSS(mss); |
3966 | } | 3966 | } |
@@ -3980,10 +3980,10 @@ static int s2io_xmit(struct sk_buff *skb, struct net_device *dev) | |||
3980 | } | 3980 | } |
3981 | 3981 | ||
3982 | frg_len = skb->len - skb->data_len; | 3982 | frg_len = skb->len - skb->data_len; |
3983 | if (skb_shinfo(skb)->ufo_size) { | 3983 | if (skb_shinfo(skb)->gso_type == SKB_GSO_UDPV4) { |
3984 | int ufo_size; | 3984 | int ufo_size; |
3985 | 3985 | ||
3986 | ufo_size = skb_shinfo(skb)->ufo_size; | 3986 | ufo_size = skb_shinfo(skb)->gso_size; |
3987 | ufo_size &= ~7; | 3987 | ufo_size &= ~7; |
3988 | txdp->Control_1 |= TXD_UFO_EN; | 3988 | txdp->Control_1 |= TXD_UFO_EN; |
3989 | txdp->Control_1 |= TXD_UFO_MSS(ufo_size); | 3989 | txdp->Control_1 |= TXD_UFO_MSS(ufo_size); |
@@ -4009,7 +4009,7 @@ static int s2io_xmit(struct sk_buff *skb, struct net_device *dev) | |||
4009 | txdp->Host_Control = (unsigned long) skb; | 4009 | txdp->Host_Control = (unsigned long) skb; |
4010 | txdp->Control_1 |= TXD_BUFFER0_SIZE(frg_len); | 4010 | txdp->Control_1 |= TXD_BUFFER0_SIZE(frg_len); |
4011 | 4011 | ||
4012 | if (skb_shinfo(skb)->ufo_size) | 4012 | if (skb_shinfo(skb)->gso_type == SKB_GSO_UDPV4) |
4013 | txdp->Control_1 |= TXD_UFO_EN; | 4013 | txdp->Control_1 |= TXD_UFO_EN; |
4014 | 4014 | ||
4015 | frg_cnt = skb_shinfo(skb)->nr_frags; | 4015 | frg_cnt = skb_shinfo(skb)->nr_frags; |
@@ -4024,12 +4024,12 @@ static int s2io_xmit(struct sk_buff *skb, struct net_device *dev) | |||
4024 | (sp->pdev, frag->page, frag->page_offset, | 4024 | (sp->pdev, frag->page, frag->page_offset, |
4025 | frag->size, PCI_DMA_TODEVICE); | 4025 | frag->size, PCI_DMA_TODEVICE); |
4026 | txdp->Control_1 = TXD_BUFFER0_SIZE(frag->size); | 4026 | txdp->Control_1 = TXD_BUFFER0_SIZE(frag->size); |
4027 | if (skb_shinfo(skb)->ufo_size) | 4027 | if (skb_shinfo(skb)->gso_type == SKB_GSO_UDPV4) |
4028 | txdp->Control_1 |= TXD_UFO_EN; | 4028 | txdp->Control_1 |= TXD_UFO_EN; |
4029 | } | 4029 | } |
4030 | txdp->Control_1 |= TXD_GATHER_CODE_LAST; | 4030 | txdp->Control_1 |= TXD_GATHER_CODE_LAST; |
4031 | 4031 | ||
4032 | if (skb_shinfo(skb)->ufo_size) | 4032 | if (skb_shinfo(skb)->gso_type == SKB_GSO_UDPV4) |
4033 | frg_cnt++; /* as Txd0 was used for inband header */ | 4033 | frg_cnt++; /* as Txd0 was used for inband header */ |
4034 | 4034 | ||
4035 | tx_fifo = mac_control->tx_FIFO_start[queue]; | 4035 | tx_fifo = mac_control->tx_FIFO_start[queue]; |
@@ -4043,7 +4043,7 @@ static int s2io_xmit(struct sk_buff *skb, struct net_device *dev) | |||
4043 | if (mss) | 4043 | if (mss) |
4044 | val64 |= TX_FIFO_SPECIAL_FUNC; | 4044 | val64 |= TX_FIFO_SPECIAL_FUNC; |
4045 | #endif | 4045 | #endif |
4046 | if (skb_shinfo(skb)->ufo_size) | 4046 | if (skb_shinfo(skb)->gso_type == SKB_GSO_UDPV4) |
4047 | val64 |= TX_FIFO_SPECIAL_FUNC; | 4047 | val64 |= TX_FIFO_SPECIAL_FUNC; |
4048 | writeq(val64, &tx_fifo->List_Control); | 4048 | writeq(val64, &tx_fifo->List_Control); |
4049 | 4049 | ||
diff --git a/drivers/net/sky2.c b/drivers/net/sky2.c index fba1e4d4d83d..d3577871be28 100644 --- a/drivers/net/sky2.c +++ b/drivers/net/sky2.c | |||
@@ -1160,7 +1160,7 @@ static unsigned tx_le_req(const struct sk_buff *skb) | |||
1160 | count = sizeof(dma_addr_t) / sizeof(u32); | 1160 | count = sizeof(dma_addr_t) / sizeof(u32); |
1161 | count += skb_shinfo(skb)->nr_frags * count; | 1161 | count += skb_shinfo(skb)->nr_frags * count; |
1162 | 1162 | ||
1163 | if (skb_shinfo(skb)->tso_size) | 1163 | if (skb_shinfo(skb)->gso_size) |
1164 | ++count; | 1164 | ++count; |
1165 | 1165 | ||
1166 | if (skb->ip_summed == CHECKSUM_HW) | 1166 | if (skb->ip_summed == CHECKSUM_HW) |
@@ -1232,7 +1232,7 @@ static int sky2_xmit_frame(struct sk_buff *skb, struct net_device *dev) | |||
1232 | } | 1232 | } |
1233 | 1233 | ||
1234 | /* Check for TCP Segmentation Offload */ | 1234 | /* Check for TCP Segmentation Offload */ |
1235 | mss = skb_shinfo(skb)->tso_size; | 1235 | mss = skb_shinfo(skb)->gso_size; |
1236 | if (mss != 0) { | 1236 | if (mss != 0) { |
1237 | /* just drop the packet if non-linear expansion fails */ | 1237 | /* just drop the packet if non-linear expansion fails */ |
1238 | if (skb_header_cloned(skb) && | 1238 | if (skb_header_cloned(skb) && |
diff --git a/drivers/net/tg3.c b/drivers/net/tg3.c index b2ddd4522a87..e3e380f90f86 100644 --- a/drivers/net/tg3.c +++ b/drivers/net/tg3.c | |||
@@ -3780,7 +3780,7 @@ static int tg3_start_xmit(struct sk_buff *skb, struct net_device *dev) | |||
3780 | #if TG3_TSO_SUPPORT != 0 | 3780 | #if TG3_TSO_SUPPORT != 0 |
3781 | mss = 0; | 3781 | mss = 0; |
3782 | if (skb->len > (tp->dev->mtu + ETH_HLEN) && | 3782 | if (skb->len > (tp->dev->mtu + ETH_HLEN) && |
3783 | (mss = skb_shinfo(skb)->tso_size) != 0) { | 3783 | (mss = skb_shinfo(skb)->gso_size) != 0) { |
3784 | int tcp_opt_len, ip_tcp_len; | 3784 | int tcp_opt_len, ip_tcp_len; |
3785 | 3785 | ||
3786 | if (skb_header_cloned(skb) && | 3786 | if (skb_header_cloned(skb) && |
@@ -3905,7 +3905,7 @@ static int tg3_start_xmit_dma_bug(struct sk_buff *skb, struct net_device *dev) | |||
3905 | #if TG3_TSO_SUPPORT != 0 | 3905 | #if TG3_TSO_SUPPORT != 0 |
3906 | mss = 0; | 3906 | mss = 0; |
3907 | if (skb->len > (tp->dev->mtu + ETH_HLEN) && | 3907 | if (skb->len > (tp->dev->mtu + ETH_HLEN) && |
3908 | (mss = skb_shinfo(skb)->tso_size) != 0) { | 3908 | (mss = skb_shinfo(skb)->gso_size) != 0) { |
3909 | int tcp_opt_len, ip_tcp_len; | 3909 | int tcp_opt_len, ip_tcp_len; |
3910 | 3910 | ||
3911 | if (skb_header_cloned(skb) && | 3911 | if (skb_header_cloned(skb) && |
diff --git a/drivers/net/typhoon.c b/drivers/net/typhoon.c index d9258d42090c..e49e8b520c28 100644 --- a/drivers/net/typhoon.c +++ b/drivers/net/typhoon.c | |||
@@ -340,7 +340,7 @@ enum state_values { | |||
340 | #endif | 340 | #endif |
341 | 341 | ||
342 | #if defined(NETIF_F_TSO) | 342 | #if defined(NETIF_F_TSO) |
343 | #define skb_tso_size(x) (skb_shinfo(x)->tso_size) | 343 | #define skb_tso_size(x) (skb_shinfo(x)->gso_size) |
344 | #define TSO_NUM_DESCRIPTORS 2 | 344 | #define TSO_NUM_DESCRIPTORS 2 |
345 | #define TSO_OFFLOAD_ON TYPHOON_OFFLOAD_TCP_SEGMENT | 345 | #define TSO_OFFLOAD_ON TYPHOON_OFFLOAD_TCP_SEGMENT |
346 | #else | 346 | #else |
diff --git a/drivers/s390/net/qeth_eddp.c b/drivers/s390/net/qeth_eddp.c index 0bab60a20309..38aad8321456 100644 --- a/drivers/s390/net/qeth_eddp.c +++ b/drivers/s390/net/qeth_eddp.c | |||
@@ -420,7 +420,7 @@ __qeth_eddp_fill_context_tcp(struct qeth_eddp_context *ctx, | |||
420 | } | 420 | } |
421 | tcph = eddp->skb->h.th; | 421 | tcph = eddp->skb->h.th; |
422 | while (eddp->skb_offset < eddp->skb->len) { | 422 | while (eddp->skb_offset < eddp->skb->len) { |
423 | data_len = min((int)skb_shinfo(eddp->skb)->tso_size, | 423 | data_len = min((int)skb_shinfo(eddp->skb)->gso_size, |
424 | (int)(eddp->skb->len - eddp->skb_offset)); | 424 | (int)(eddp->skb->len - eddp->skb_offset)); |
425 | /* prepare qdio hdr */ | 425 | /* prepare qdio hdr */ |
426 | if (eddp->qh.hdr.l2.id == QETH_HEADER_TYPE_LAYER2){ | 426 | if (eddp->qh.hdr.l2.id == QETH_HEADER_TYPE_LAYER2){ |
@@ -515,20 +515,20 @@ qeth_eddp_calc_num_pages(struct qeth_eddp_context *ctx, struct sk_buff *skb, | |||
515 | 515 | ||
516 | QETH_DBF_TEXT(trace, 5, "eddpcanp"); | 516 | QETH_DBF_TEXT(trace, 5, "eddpcanp"); |
517 | /* can we put multiple skbs in one page? */ | 517 | /* can we put multiple skbs in one page? */ |
518 | skbs_per_page = PAGE_SIZE / (skb_shinfo(skb)->tso_size + hdr_len); | 518 | skbs_per_page = PAGE_SIZE / (skb_shinfo(skb)->gso_size + hdr_len); |
519 | if (skbs_per_page > 1){ | 519 | if (skbs_per_page > 1){ |
520 | ctx->num_pages = (skb_shinfo(skb)->tso_segs + 1) / | 520 | ctx->num_pages = (skb_shinfo(skb)->gso_segs + 1) / |
521 | skbs_per_page + 1; | 521 | skbs_per_page + 1; |
522 | ctx->elements_per_skb = 1; | 522 | ctx->elements_per_skb = 1; |
523 | } else { | 523 | } else { |
524 | /* no -> how many elements per skb? */ | 524 | /* no -> how many elements per skb? */ |
525 | ctx->elements_per_skb = (skb_shinfo(skb)->tso_size + hdr_len + | 525 | ctx->elements_per_skb = (skb_shinfo(skb)->gso_size + hdr_len + |
526 | PAGE_SIZE) >> PAGE_SHIFT; | 526 | PAGE_SIZE) >> PAGE_SHIFT; |
527 | ctx->num_pages = ctx->elements_per_skb * | 527 | ctx->num_pages = ctx->elements_per_skb * |
528 | (skb_shinfo(skb)->tso_segs + 1); | 528 | (skb_shinfo(skb)->gso_segs + 1); |
529 | } | 529 | } |
530 | ctx->num_elements = ctx->elements_per_skb * | 530 | ctx->num_elements = ctx->elements_per_skb * |
531 | (skb_shinfo(skb)->tso_segs + 1); | 531 | (skb_shinfo(skb)->gso_segs + 1); |
532 | } | 532 | } |
533 | 533 | ||
534 | static inline struct qeth_eddp_context * | 534 | static inline struct qeth_eddp_context * |
diff --git a/drivers/s390/net/qeth_main.c b/drivers/s390/net/qeth_main.c index 9e671a48cd2f..56009d768326 100644 --- a/drivers/s390/net/qeth_main.c +++ b/drivers/s390/net/qeth_main.c | |||
@@ -4417,7 +4417,7 @@ qeth_send_packet(struct qeth_card *card, struct sk_buff *skb) | |||
4417 | struct qeth_eddp_context *ctx = NULL; | 4417 | struct qeth_eddp_context *ctx = NULL; |
4418 | int tx_bytes = skb->len; | 4418 | int tx_bytes = skb->len; |
4419 | unsigned short nr_frags = skb_shinfo(skb)->nr_frags; | 4419 | unsigned short nr_frags = skb_shinfo(skb)->nr_frags; |
4420 | unsigned short tso_size = skb_shinfo(skb)->tso_size; | 4420 | unsigned short tso_size = skb_shinfo(skb)->gso_size; |
4421 | int rc; | 4421 | int rc; |
4422 | 4422 | ||
4423 | QETH_DBF_TEXT(trace, 6, "sendpkt"); | 4423 | QETH_DBF_TEXT(trace, 6, "sendpkt"); |
@@ -4453,7 +4453,7 @@ qeth_send_packet(struct qeth_card *card, struct sk_buff *skb) | |||
4453 | queue = card->qdio.out_qs | 4453 | queue = card->qdio.out_qs |
4454 | [qeth_get_priority_queue(card, skb, ipv, cast_type)]; | 4454 | [qeth_get_priority_queue(card, skb, ipv, cast_type)]; |
4455 | 4455 | ||
4456 | if (skb_shinfo(skb)->tso_size) | 4456 | if (skb_shinfo(skb)->gso_size) |
4457 | large_send = card->options.large_send; | 4457 | large_send = card->options.large_send; |
4458 | 4458 | ||
4459 | /*are we able to do TSO ? If so ,prepare and send it from here */ | 4459 | /*are we able to do TSO ? If so ,prepare and send it from here */ |
diff --git a/drivers/s390/net/qeth_tso.h b/drivers/s390/net/qeth_tso.h index 24ef40ca9562..593f298142c1 100644 --- a/drivers/s390/net/qeth_tso.h +++ b/drivers/s390/net/qeth_tso.h | |||
@@ -51,7 +51,7 @@ qeth_tso_fill_header(struct qeth_card *card, struct sk_buff *skb) | |||
51 | hdr->ext.hdr_version = 1; | 51 | hdr->ext.hdr_version = 1; |
52 | hdr->ext.hdr_len = 28; | 52 | hdr->ext.hdr_len = 28; |
53 | /*insert non-fix values */ | 53 | /*insert non-fix values */ |
54 | hdr->ext.mss = skb_shinfo(skb)->tso_size; | 54 | hdr->ext.mss = skb_shinfo(skb)->gso_size; |
55 | hdr->ext.dg_hdr_len = (__u16)(iph->ihl*4 + tcph->doff*4); | 55 | hdr->ext.dg_hdr_len = (__u16)(iph->ihl*4 + tcph->doff*4); |
56 | hdr->ext.payload_len = (__u16)(skb->len - hdr->ext.dg_hdr_len - | 56 | hdr->ext.payload_len = (__u16)(skb->len - hdr->ext.dg_hdr_len - |
57 | sizeof(struct qeth_hdr_tso)); | 57 | sizeof(struct qeth_hdr_tso)); |