diff options
author | Arnaldo Carvalho de Melo <acme@redhat.com> | 2007-04-25 20:55:53 -0400 |
---|---|---|
committer | David S. Miller <davem@sunset.davemloft.net> | 2007-04-26 01:25:16 -0400 |
commit | ea2ae17d6443abddc79480dc9f7af8feacabddc4 (patch) | |
tree | 2d6f48a5e4a40f761b5b510af9aac1fca55004cb /drivers/net/ixgb | |
parent | badff6d01a8589a1c828b0bf118903ca38627f4e (diff) |
[SK_BUFF]: Introduce skb_transport_offset()
For the quite common 'skb->h.raw - skb->data' sequence.
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/ixgb')
-rw-r--r-- | drivers/net/ixgb/ixgb_main.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/drivers/net/ixgb/ixgb_main.c b/drivers/net/ixgb/ixgb_main.c index bba4dcaf92e9..ceea6e45792d 100644 --- a/drivers/net/ixgb/ixgb_main.c +++ b/drivers/net/ixgb/ixgb_main.c | |||
@@ -1190,7 +1190,7 @@ ixgb_tso(struct ixgb_adapter *adapter, struct sk_buff *skb) | |||
1190 | return err; | 1190 | return err; |
1191 | } | 1191 | } |
1192 | 1192 | ||
1193 | hdr_len = ((skb->h.raw - skb->data) + (skb->h.th->doff << 2)); | 1193 | hdr_len = (skb_transport_offset(skb) + (skb->h.th->doff << 2)); |
1194 | mss = skb_shinfo(skb)->gso_size; | 1194 | mss = skb_shinfo(skb)->gso_size; |
1195 | iph = ip_hdr(skb); | 1195 | iph = ip_hdr(skb); |
1196 | iph->tot_len = 0; | 1196 | iph->tot_len = 0; |
@@ -1199,8 +1199,8 @@ ixgb_tso(struct ixgb_adapter *adapter, struct sk_buff *skb) | |||
1199 | 0, IPPROTO_TCP, 0); | 1199 | 0, IPPROTO_TCP, 0); |
1200 | ipcss = skb_network_offset(skb); | 1200 | ipcss = skb_network_offset(skb); |
1201 | ipcso = (void *)&(iph->check) - (void *)skb->data; | 1201 | ipcso = (void *)&(iph->check) - (void *)skb->data; |
1202 | ipcse = skb->h.raw - skb->data - 1; | 1202 | ipcse = skb_transport_offset(skb) - 1; |
1203 | tucss = skb->h.raw - skb->data; | 1203 | tucss = skb_transport_offset(skb); |
1204 | tucso = (void *)&(skb->h.th->check) - (void *)skb->data; | 1204 | tucso = (void *)&(skb->h.th->check) - (void *)skb->data; |
1205 | tucse = 0; | 1205 | tucse = 0; |
1206 | 1206 | ||
@@ -1245,7 +1245,7 @@ ixgb_tx_csum(struct ixgb_adapter *adapter, struct sk_buff *skb) | |||
1245 | 1245 | ||
1246 | if(likely(skb->ip_summed == CHECKSUM_PARTIAL)) { | 1246 | if(likely(skb->ip_summed == CHECKSUM_PARTIAL)) { |
1247 | struct ixgb_buffer *buffer_info; | 1247 | struct ixgb_buffer *buffer_info; |
1248 | css = skb->h.raw - skb->data; | 1248 | css = skb_transport_offset(skb); |
1249 | cso = css + skb->csum_offset; | 1249 | cso = css + skb->csum_offset; |
1250 | 1250 | ||
1251 | i = adapter->tx_ring.next_to_use; | 1251 | i = adapter->tx_ring.next_to_use; |