diff options
author | Arnaldo Carvalho de Melo <acme@redhat.com> | 2007-04-11 00:21:55 -0400 |
---|---|---|
committer | David S. Miller <davem@sunset.davemloft.net> | 2007-04-26 01:26:20 -0400 |
commit | b0e380b1d8a8e0aca215df97702f99815f05c094 (patch) | |
tree | 95f402ca155f5211150178811669ebf0a88e8e00 /net/core | |
parent | cfe1fc7759fdacb0c650b575daed1692bf3eaece (diff) |
[SK_BUFF]: unions of just one member don't get anything done, kill them
Renaming skb->h to skb->transport_header, skb->nh to skb->network_header and
skb->mac to skb->mac_header, to match the names of the associated helpers
(skb[_[re]set]_{transport,network,mac}_header).
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/core')
-rw-r--r-- | net/core/dev.c | 6 | ||||
-rw-r--r-- | net/core/pktgen.c | 16 | ||||
-rw-r--r-- | net/core/skbuff.c | 21 |
3 files changed, 22 insertions, 21 deletions
diff --git a/net/core/dev.c b/net/core/dev.c index 30fcc7f9d4e..6562e5736e2 100644 --- a/net/core/dev.c +++ b/net/core/dev.c | |||
@@ -1077,7 +1077,7 @@ static void dev_queue_xmit_nit(struct sk_buff *skb, struct net_device *dev) | |||
1077 | skb_reset_network_header(skb2); | 1077 | skb_reset_network_header(skb2); |
1078 | } | 1078 | } |
1079 | 1079 | ||
1080 | skb2->h.raw = skb2->nh.raw; | 1080 | skb2->transport_header = skb2->network_header; |
1081 | skb2->pkt_type = PACKET_OUTGOING; | 1081 | skb2->pkt_type = PACKET_OUTGOING; |
1082 | ptype->func(skb2, skb->dev, ptype, skb->dev); | 1082 | ptype->func(skb2, skb->dev, ptype, skb->dev); |
1083 | } | 1083 | } |
@@ -1207,7 +1207,7 @@ struct sk_buff *skb_gso_segment(struct sk_buff *skb, int features) | |||
1207 | BUG_ON(skb_shinfo(skb)->frag_list); | 1207 | BUG_ON(skb_shinfo(skb)->frag_list); |
1208 | 1208 | ||
1209 | skb_reset_mac_header(skb); | 1209 | skb_reset_mac_header(skb); |
1210 | skb->mac_len = skb->nh.raw - skb->mac.raw; | 1210 | skb->mac_len = skb->network_header - skb->mac_header; |
1211 | __skb_pull(skb, skb->mac_len); | 1211 | __skb_pull(skb, skb->mac_len); |
1212 | 1212 | ||
1213 | if (unlikely(skb->ip_summed != CHECKSUM_PARTIAL)) { | 1213 | if (unlikely(skb->ip_summed != CHECKSUM_PARTIAL)) { |
@@ -1774,7 +1774,7 @@ int netif_receive_skb(struct sk_buff *skb) | |||
1774 | 1774 | ||
1775 | skb_reset_network_header(skb); | 1775 | skb_reset_network_header(skb); |
1776 | skb_reset_transport_header(skb); | 1776 | skb_reset_transport_header(skb); |
1777 | skb->mac_len = skb->nh.raw - skb->mac.raw; | 1777 | skb->mac_len = skb->network_header - skb->mac_header; |
1778 | 1778 | ||
1779 | pt_prev = NULL; | 1779 | pt_prev = NULL; |
1780 | 1780 | ||
diff --git a/net/core/pktgen.c b/net/core/pktgen.c index ae8cf9a285f..9da8357addc 100644 --- a/net/core/pktgen.c +++ b/net/core/pktgen.c | |||
@@ -2358,7 +2358,7 @@ static struct sk_buff *fill_packet_ipv4(struct net_device *odev, | |||
2358 | } | 2358 | } |
2359 | 2359 | ||
2360 | skb_set_network_header(skb, skb->tail - skb->data); | 2360 | skb_set_network_header(skb, skb->tail - skb->data); |
2361 | skb->h.raw = skb->nh.raw + sizeof(struct iphdr); | 2361 | skb->transport_header = skb->network_header + sizeof(struct iphdr); |
2362 | skb_put(skb, sizeof(struct iphdr) + sizeof(struct udphdr)); | 2362 | skb_put(skb, sizeof(struct iphdr) + sizeof(struct udphdr)); |
2363 | 2363 | ||
2364 | iph = ip_hdr(skb); | 2364 | iph = ip_hdr(skb); |
@@ -2391,9 +2391,9 @@ static struct sk_buff *fill_packet_ipv4(struct net_device *odev, | |||
2391 | iph->check = 0; | 2391 | iph->check = 0; |
2392 | iph->check = ip_fast_csum((void *)iph, iph->ihl); | 2392 | iph->check = ip_fast_csum((void *)iph, iph->ihl); |
2393 | skb->protocol = protocol; | 2393 | skb->protocol = protocol; |
2394 | skb->mac.raw = (skb->nh.raw - ETH_HLEN - | 2394 | skb->mac_header = (skb->network_header - ETH_HLEN - |
2395 | pkt_dev->nr_labels * sizeof(u32) - | 2395 | pkt_dev->nr_labels * sizeof(u32) - |
2396 | VLAN_TAG_SIZE(pkt_dev) - SVLAN_TAG_SIZE(pkt_dev)); | 2396 | VLAN_TAG_SIZE(pkt_dev) - SVLAN_TAG_SIZE(pkt_dev)); |
2397 | skb->dev = odev; | 2397 | skb->dev = odev; |
2398 | skb->pkt_type = PACKET_HOST; | 2398 | skb->pkt_type = PACKET_HOST; |
2399 | 2399 | ||
@@ -2697,7 +2697,7 @@ static struct sk_buff *fill_packet_ipv6(struct net_device *odev, | |||
2697 | } | 2697 | } |
2698 | 2698 | ||
2699 | skb_set_network_header(skb, skb->tail - skb->data); | 2699 | skb_set_network_header(skb, skb->tail - skb->data); |
2700 | skb->h.raw = skb->nh.raw + sizeof(struct ipv6hdr); | 2700 | skb->transport_header = skb->network_header + sizeof(struct ipv6hdr); |
2701 | skb_put(skb, sizeof(struct ipv6hdr) + sizeof(struct udphdr)); | 2701 | skb_put(skb, sizeof(struct ipv6hdr) + sizeof(struct udphdr)); |
2702 | 2702 | ||
2703 | iph = ipv6_hdr(skb); | 2703 | iph = ipv6_hdr(skb); |
@@ -2738,9 +2738,9 @@ static struct sk_buff *fill_packet_ipv6(struct net_device *odev, | |||
2738 | ipv6_addr_copy(&iph->daddr, &pkt_dev->cur_in6_daddr); | 2738 | ipv6_addr_copy(&iph->daddr, &pkt_dev->cur_in6_daddr); |
2739 | ipv6_addr_copy(&iph->saddr, &pkt_dev->cur_in6_saddr); | 2739 | ipv6_addr_copy(&iph->saddr, &pkt_dev->cur_in6_saddr); |
2740 | 2740 | ||
2741 | skb->mac.raw = (skb->nh.raw - ETH_HLEN - | 2741 | skb->mac_header = (skb->network_header - ETH_HLEN - |
2742 | pkt_dev->nr_labels * sizeof(u32) - | 2742 | pkt_dev->nr_labels * sizeof(u32) - |
2743 | VLAN_TAG_SIZE(pkt_dev) - SVLAN_TAG_SIZE(pkt_dev)); | 2743 | VLAN_TAG_SIZE(pkt_dev) - SVLAN_TAG_SIZE(pkt_dev)); |
2744 | skb->protocol = protocol; | 2744 | skb->protocol = protocol; |
2745 | skb->dev = odev; | 2745 | skb->dev = odev; |
2746 | skb->pkt_type = PACKET_HOST; | 2746 | skb->pkt_type = PACKET_HOST; |
diff --git a/net/core/skbuff.c b/net/core/skbuff.c index f38af6c01b1..1e71764be4a 100644 --- a/net/core/skbuff.c +++ b/net/core/skbuff.c | |||
@@ -396,9 +396,9 @@ struct sk_buff *skb_clone(struct sk_buff *skb, gfp_t gfp_mask) | |||
396 | n->sk = NULL; | 396 | n->sk = NULL; |
397 | C(tstamp); | 397 | C(tstamp); |
398 | C(dev); | 398 | C(dev); |
399 | C(h); | 399 | C(transport_header); |
400 | C(nh); | 400 | C(network_header); |
401 | C(mac); | 401 | C(mac_header); |
402 | C(dst); | 402 | C(dst); |
403 | dst_clone(skb->dst); | 403 | dst_clone(skb->dst); |
404 | C(sp); | 404 | C(sp); |
@@ -461,9 +461,9 @@ static void copy_skb_header(struct sk_buff *new, const struct sk_buff *old) | |||
461 | #ifdef CONFIG_INET | 461 | #ifdef CONFIG_INET |
462 | new->sp = secpath_get(old->sp); | 462 | new->sp = secpath_get(old->sp); |
463 | #endif | 463 | #endif |
464 | new->h.raw = old->h.raw + offset; | 464 | new->transport_header = old->transport_header + offset; |
465 | new->nh.raw = old->nh.raw + offset; | 465 | new->network_header = old->network_header + offset; |
466 | new->mac.raw = old->mac.raw + offset; | 466 | new->mac_header = old->mac_header + offset; |
467 | memcpy(new->cb, old->cb, sizeof(old->cb)); | 467 | memcpy(new->cb, old->cb, sizeof(old->cb)); |
468 | new->local_df = old->local_df; | 468 | new->local_df = old->local_df; |
469 | new->fclone = SKB_FCLONE_UNAVAILABLE; | 469 | new->fclone = SKB_FCLONE_UNAVAILABLE; |
@@ -639,9 +639,9 @@ int pskb_expand_head(struct sk_buff *skb, int nhead, int ntail, | |||
639 | skb->end = data + size; | 639 | skb->end = data + size; |
640 | skb->data += off; | 640 | skb->data += off; |
641 | skb->tail += off; | 641 | skb->tail += off; |
642 | skb->mac.raw += off; | 642 | skb->transport_header += off; |
643 | skb->h.raw += off; | 643 | skb->network_header += off; |
644 | skb->nh.raw += off; | 644 | skb->mac_header += off; |
645 | skb->cloned = 0; | 645 | skb->cloned = 0; |
646 | skb->nohdr = 0; | 646 | skb->nohdr = 0; |
647 | atomic_set(&skb_shinfo(skb)->dataref, 1); | 647 | atomic_set(&skb_shinfo(skb)->dataref, 1); |
@@ -1906,7 +1906,8 @@ struct sk_buff *skb_segment(struct sk_buff *skb, int features) | |||
1906 | skb_reserve(nskb, headroom); | 1906 | skb_reserve(nskb, headroom); |
1907 | skb_reset_mac_header(nskb); | 1907 | skb_reset_mac_header(nskb); |
1908 | skb_set_network_header(nskb, skb->mac_len); | 1908 | skb_set_network_header(nskb, skb->mac_len); |
1909 | nskb->h.raw = nskb->nh.raw + skb_network_header_len(skb); | 1909 | nskb->transport_header = (nskb->network_header + |
1910 | skb_network_header_len(skb)); | ||
1910 | memcpy(skb_put(nskb, doffset), skb->data, doffset); | 1911 | memcpy(skb_put(nskb, doffset), skb->data, doffset); |
1911 | 1912 | ||
1912 | if (!sg) { | 1913 | if (!sg) { |