aboutsummaryrefslogtreecommitdiffstats
path: root/net/ipv6
diff options
context:
space:
mode:
authorSridhar Samudrala <sri@us.ibm.com>2009-07-09 04:10:01 -0400
committerDavid S. Miller <davem@davemloft.net>2009-07-12 17:29:28 -0400
commit7ea2f2c5a66e4e9a8d96296ac47ad895c467ee1d (patch)
tree3375f979fd62839465b8538fe658ab4f31b6e0f8 /net/ipv6
parentc31d5326902cebffcd83b1aede67a0e0ac923090 (diff)
udpv6: Remove unused skb argument of ipv6_select_ident()
- move ipv6_select_ident() inline function to ipv6.h and remove the unused skb argument Signed-off-by: Sridhar Samudrala <sri@us.ibm.com> Acked-by: Herbert Xu <herbert@gondor.apana.org.au> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/ipv6')
-rw-r--r--net/ipv6/ip6_output.c18
1 files changed, 3 insertions, 15 deletions
diff --git a/net/ipv6/ip6_output.c b/net/ipv6/ip6_output.c
index 1c6f0fc43690..dd1a980b8ac9 100644
--- a/net/ipv6/ip6_output.c
+++ b/net/ipv6/ip6_output.c
@@ -57,18 +57,6 @@
57 57
58static int ip6_fragment(struct sk_buff *skb, int (*output)(struct sk_buff *)); 58static int ip6_fragment(struct sk_buff *skb, int (*output)(struct sk_buff *));
59 59
60static __inline__ void ipv6_select_ident(struct sk_buff *skb, struct frag_hdr *fhdr)
61{
62 static u32 ipv6_fragmentation_id = 1;
63 static DEFINE_SPINLOCK(ip6_id_lock);
64
65 spin_lock_bh(&ip6_id_lock);
66 fhdr->identification = htonl(ipv6_fragmentation_id);
67 if (++ipv6_fragmentation_id == 0)
68 ipv6_fragmentation_id = 1;
69 spin_unlock_bh(&ip6_id_lock);
70}
71
72int __ip6_local_out(struct sk_buff *skb) 60int __ip6_local_out(struct sk_buff *skb)
73{ 61{
74 int len; 62 int len;
@@ -706,7 +694,7 @@ static int ip6_fragment(struct sk_buff *skb, int (*output)(struct sk_buff *))
706 skb_reset_network_header(skb); 694 skb_reset_network_header(skb);
707 memcpy(skb_network_header(skb), tmp_hdr, hlen); 695 memcpy(skb_network_header(skb), tmp_hdr, hlen);
708 696
709 ipv6_select_ident(skb, fh); 697 ipv6_select_ident(fh);
710 fh->nexthdr = nexthdr; 698 fh->nexthdr = nexthdr;
711 fh->reserved = 0; 699 fh->reserved = 0;
712 fh->frag_off = htons(IP6_MF); 700 fh->frag_off = htons(IP6_MF);
@@ -844,7 +832,7 @@ slow_path:
844 fh->nexthdr = nexthdr; 832 fh->nexthdr = nexthdr;
845 fh->reserved = 0; 833 fh->reserved = 0;
846 if (!frag_id) { 834 if (!frag_id) {
847 ipv6_select_ident(skb, fh); 835 ipv6_select_ident(fh);
848 frag_id = fh->identification; 836 frag_id = fh->identification;
849 } else 837 } else
850 fh->identification = frag_id; 838 fh->identification = frag_id;
@@ -1093,7 +1081,7 @@ static inline int ip6_ufo_append_data(struct sock *sk,
1093 skb_shinfo(skb)->gso_size = (mtu - fragheaderlen - 1081 skb_shinfo(skb)->gso_size = (mtu - fragheaderlen -
1094 sizeof(struct frag_hdr)) & ~7; 1082 sizeof(struct frag_hdr)) & ~7;
1095 skb_shinfo(skb)->gso_type = SKB_GSO_UDP; 1083 skb_shinfo(skb)->gso_type = SKB_GSO_UDP;
1096 ipv6_select_ident(skb, &fhdr); 1084 ipv6_select_ident(&fhdr);
1097 skb_shinfo(skb)->ip6_frag_id = fhdr.identification; 1085 skb_shinfo(skb)->ip6_frag_id = fhdr.identification;
1098 __skb_queue_tail(&sk->sk_write_queue, skb); 1086 __skb_queue_tail(&sk->sk_write_queue, skb);
1099 1087