[PATCH 3/3] [IPV6]: Replace sk_buff ** with sk_buff * in input handlers

2007-10-14 Thread Herbert Xu
[IPV6]: Replace sk_buff ** with sk_buff * in input handlers

With all the users of the double pointers removed from the IPv6 input path,
this patch converts all occurances of sk_buff ** to sk_buff * in IPv6 input
handlers.

Signed-off-by: Herbert Xu <[EMAIL PROTECTED]>
---

 include/net/ipv6.h |2 +-
 include/net/protocol.h |2 +-
 include/net/xfrm.h |2 +-
 net/dccp/ipv6.c|3 +--
 net/ipv6/exthdrs.c |   41 ++---
 net/ipv6/icmp.c|5 ++---
 net/ipv6/ip6_input.c   |4 ++--
 net/ipv6/reassembly.c  |3 +--
 net/ipv6/tcp_ipv6.c|3 +--
 net/ipv6/tunnel6.c |6 ++
 net/ipv6/udp.c |7 +++
 net/ipv6/udp_impl.h|2 +-
 net/ipv6/udplite.c |4 ++--
 net/ipv6/xfrm6_input.c |4 ++--
 net/sctp/ipv6.c|4 ++--
 15 files changed, 36 insertions(+), 56 deletions(-)

diff --git a/include/net/ipv6.h b/include/net/ipv6.h
index 31b3f1b..abd8584 100644
--- a/include/net/ipv6.h
+++ b/include/net/ipv6.h
@@ -240,7 +240,7 @@ extern int  ip6_ra_control(struct sock *sk, 
int sel,
   void (*destructor)(struct sock 
*));
 
 
-extern int ipv6_parse_hopopts(struct sk_buff **skbp);
+extern int ipv6_parse_hopopts(struct sk_buff *skb);
 
 extern struct ipv6_txoptions *  ipv6_dup_options(struct sock *sk, struct 
ipv6_txoptions *opt);
 extern struct ipv6_txoptions * ipv6_renew_options(struct sock *sk, struct 
ipv6_txoptions *opt,
diff --git a/include/net/protocol.h b/include/net/protocol.h
index 105bf12..1166ffb 100644
--- a/include/net/protocol.h
+++ b/include/net/protocol.h
@@ -45,7 +45,7 @@ struct net_protocol {
 #if defined(CONFIG_IPV6) || defined (CONFIG_IPV6_MODULE)
 struct inet6_protocol 
 {
-   int (*handler)(struct sk_buff **skb);
+   int (*handler)(struct sk_buff *skb);
 
void(*err_handler)(struct sk_buff *skb,
   struct inet6_skb_parm *opt,
diff --git a/include/net/xfrm.h b/include/net/xfrm.h
index 77be396..0e84484 100644
--- a/include/net/xfrm.h
+++ b/include/net/xfrm.h
@@ -1051,7 +1051,7 @@ extern int xfrm4_output(struct sk_buff *skb);
 extern int xfrm4_tunnel_register(struct xfrm_tunnel *handler, unsigned short 
family);
 extern int xfrm4_tunnel_deregister(struct xfrm_tunnel *handler, unsigned short 
family);
 extern int xfrm6_rcv_spi(struct sk_buff *skb, __be32 spi);
-extern int xfrm6_rcv(struct sk_buff **pskb);
+extern int xfrm6_rcv(struct sk_buff *skb);
 extern int xfrm6_input_addr(struct sk_buff *skb, xfrm_address_t *daddr,
xfrm_address_t *saddr, u8 proto);
 extern int xfrm6_tunnel_register(struct xfrm6_tunnel *handler, unsigned short 
family);
diff --git a/net/dccp/ipv6.c b/net/dccp/ipv6.c
index 006a383..cac5354 100644
--- a/net/dccp/ipv6.c
+++ b/net/dccp/ipv6.c
@@ -767,10 +767,9 @@ discard:
return 0;
 }
 
-static int dccp_v6_rcv(struct sk_buff **pskb)
+static int dccp_v6_rcv(struct sk_buff *skb)
 {
const struct dccp_hdr *dh;
-   struct sk_buff *skb = *pskb;
struct sock *sk;
int min_cov;
 
diff --git a/net/ipv6/exthdrs.c b/net/ipv6/exthdrs.c
index 0ff2bf1..1e89efd 100644
--- a/net/ipv6/exthdrs.c
+++ b/net/ipv6/exthdrs.c
@@ -102,7 +102,7 @@ EXPORT_SYMBOL_GPL(ipv6_find_tlv);
 
 struct tlvtype_proc {
int type;
-   int (*func)(struct sk_buff **skbp, int offset);
+   int (*func)(struct sk_buff *skb, int offset);
 };
 
 /*
@@ -111,10 +111,8 @@ struct tlvtype_proc {
 
 /* An unknown option is detected, decide what to do */
 
-static int ip6_tlvopt_unknown(struct sk_buff **skbp, int optoff)
+static int ip6_tlvopt_unknown(struct sk_buff *skb, int optoff)
 {
-   struct sk_buff *skb = *skbp;
-
switch ((skb_network_header(skb)[optoff] & 0xC0) >> 6) {
case 0: /* ignore */
return 1;
@@ -139,9 +137,8 @@ static int ip6_tlvopt_unknown(struct sk_buff **skbp, int 
optoff)
 
 /* Parse tlv encoded option header (hop-by-hop or destination) */
 
-static int ip6_parse_tlv(struct tlvtype_proc *procs, struct sk_buff **skbp)
+static int ip6_parse_tlv(struct tlvtype_proc *procs, struct sk_buff *skb)
 {
-   struct sk_buff *skb = *skbp;
struct tlvtype_proc *curr;
const unsigned char *nh = skb_network_header(skb);
int off = skb_network_header_len(skb);
@@ -172,13 +169,13 @@ static int ip6_parse_tlv(struct tlvtype_proc *procs, 
struct sk_buff **skbp)
/* type specific length/alignment
   checks will be performed in the
   func(). */
-   if (curr->func(skbp, off) == 0)
+   if (curr->func(skb, off) == 0)
return 0;
break

Re: [PATCH 3/3] [IPV6]: Replace sk_buff ** with sk_buff * in input handlers

2007-10-14 Thread YOSHIFUJI Hideaki / 吉藤英明
Herbert,

I really appreciate this work.
Thank you!

--yoshfuji

In article <[EMAIL PROTECTED]> (at Sun, 14 Oct 2007 22:49:05 +0800), Herbert Xu 
<[EMAIL PROTECTED]> says:

> [IPV6]: Replace sk_buff ** with sk_buff * in input handlers
> 
> With all the users of the double pointers removed from the IPv6 input path,
> this patch converts all occurances of sk_buff ** to sk_buff * in IPv6 input
> handlers.
> 
> Signed-off-by: Herbert Xu <[EMAIL PROTECTED]>
> ---
> 
>  include/net/ipv6.h |2 +-
>  include/net/protocol.h |2 +-
>  include/net/xfrm.h |2 +-
>  net/dccp/ipv6.c|3 +--
>  net/ipv6/exthdrs.c |   41 ++---
>  net/ipv6/icmp.c|5 ++---
>  net/ipv6/ip6_input.c   |4 ++--
>  net/ipv6/reassembly.c  |3 +--
>  net/ipv6/tcp_ipv6.c|3 +--
>  net/ipv6/tunnel6.c |6 ++
>  net/ipv6/udp.c |7 +++
>  net/ipv6/udp_impl.h|2 +-
>  net/ipv6/udplite.c |4 ++--
>  net/ipv6/xfrm6_input.c |4 ++--
>  net/sctp/ipv6.c|4 ++--
>  15 files changed, 36 insertions(+), 56 deletions(-)
> 
> diff --git a/include/net/ipv6.h b/include/net/ipv6.h
> index 31b3f1b..abd8584 100644
> --- a/include/net/ipv6.h
> +++ b/include/net/ipv6.h
> @@ -240,7 +240,7 @@ extern intip6_ra_control(struct 
> sock *sk, int sel,
>  void (*destructor)(struct sock 
> *));
>  
>  
> -extern int   ipv6_parse_hopopts(struct sk_buff **skbp);
> +extern int   ipv6_parse_hopopts(struct sk_buff *skb);
>  
>  extern struct ipv6_txoptions *  ipv6_dup_options(struct sock *sk, struct 
> ipv6_txoptions *opt);
>  extern struct ipv6_txoptions *   ipv6_renew_options(struct sock *sk, 
> struct ipv6_txoptions *opt,
> diff --git a/include/net/protocol.h b/include/net/protocol.h
> index 105bf12..1166ffb 100644
> --- a/include/net/protocol.h
> +++ b/include/net/protocol.h
> @@ -45,7 +45,7 @@ struct net_protocol {
>  #if defined(CONFIG_IPV6) || defined (CONFIG_IPV6_MODULE)
>  struct inet6_protocol 
>  {
> - int (*handler)(struct sk_buff **skb);
> + int (*handler)(struct sk_buff *skb);
>  
>   void(*err_handler)(struct sk_buff *skb,
>  struct inet6_skb_parm *opt,
> diff --git a/include/net/xfrm.h b/include/net/xfrm.h
> index 77be396..0e84484 100644
> --- a/include/net/xfrm.h
> +++ b/include/net/xfrm.h
> @@ -1051,7 +1051,7 @@ extern int xfrm4_output(struct sk_buff *skb);
>  extern int xfrm4_tunnel_register(struct xfrm_tunnel *handler, unsigned short 
> family);
>  extern int xfrm4_tunnel_deregister(struct xfrm_tunnel *handler, unsigned 
> short family);
>  extern int xfrm6_rcv_spi(struct sk_buff *skb, __be32 spi);
> -extern int xfrm6_rcv(struct sk_buff **pskb);
> +extern int xfrm6_rcv(struct sk_buff *skb);
>  extern int xfrm6_input_addr(struct sk_buff *skb, xfrm_address_t *daddr,
>   xfrm_address_t *saddr, u8 proto);
>  extern int xfrm6_tunnel_register(struct xfrm6_tunnel *handler, unsigned 
> short family);
> diff --git a/net/dccp/ipv6.c b/net/dccp/ipv6.c
> index 006a383..cac5354 100644
> --- a/net/dccp/ipv6.c
> +++ b/net/dccp/ipv6.c
> @@ -767,10 +767,9 @@ discard:
>   return 0;
>  }
>  
> -static int dccp_v6_rcv(struct sk_buff **pskb)
> +static int dccp_v6_rcv(struct sk_buff *skb)
>  {
>   const struct dccp_hdr *dh;
> - struct sk_buff *skb = *pskb;
>   struct sock *sk;
>   int min_cov;
>  
> diff --git a/net/ipv6/exthdrs.c b/net/ipv6/exthdrs.c
> index 0ff2bf1..1e89efd 100644
> --- a/net/ipv6/exthdrs.c
> +++ b/net/ipv6/exthdrs.c
> @@ -102,7 +102,7 @@ EXPORT_SYMBOL_GPL(ipv6_find_tlv);
>  
>  struct tlvtype_proc {
>   int type;
> - int (*func)(struct sk_buff **skbp, int offset);
> + int (*func)(struct sk_buff *skb, int offset);
>  };
>  
>  /*
> @@ -111,10 +111,8 @@ struct tlvtype_proc {
>  
>  /* An unknown option is detected, decide what to do */
>  
> -static int ip6_tlvopt_unknown(struct sk_buff **skbp, int optoff)
> +static int ip6_tlvopt_unknown(struct sk_buff *skb, int optoff)
>  {
> - struct sk_buff *skb = *skbp;
> -
>   switch ((skb_network_header(skb)[optoff] & 0xC0) >> 6) {
>   case 0: /* ignore */
>   return 1;
> @@ -139,9 +137,8 @@ static int ip6_tlvopt_unknown(struct sk_buff **skbp, int 
> optoff)
>  
>  /* Parse tlv encoded option header (hop-by-hop or destination) */
>  
> -static int ip6_parse_tlv(struct tlvtype_proc *procs, struct sk_buff **skbp)
> +static int ip6_parse_tlv(struct tlvtype_proc *procs, struct sk_buff *skb)
>  {
> - struct sk_buff *skb = *skbp;
>   struct tlvtype_proc *curr;
>   const unsigned char *nh = skb_network_header(skb);
>   int off = skb_network_header_len(skb);
> @@ -172,13 +169,13 @@ static int ip6_parse_tlv(struct tlvtype_proc *procs, 
> struct sk_buff **skbp)
>   /* type specific l

Re: [PATCH 3/3] [IPV6]: Replace sk_buff ** with sk_buff * in input handlers

2007-10-15 Thread David Miller
From: Herbert Xu <[EMAIL PROTECTED]>
Date: Sun, 14 Oct 2007 22:49:05 +0800

> [IPV6]: Replace sk_buff ** with sk_buff * in input handlers
> 
> With all the users of the double pointers removed from the IPv6 input path,
> this patch converts all occurances of sk_buff ** to sk_buff * in IPv6 input
> handlers.
> 
> Signed-off-by: Herbert Xu <[EMAIL PROTECTED]>

Also applied, thanks Herbert.
-
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [PATCH 3/3] [IPV6]: Replace sk_buff ** with sk_buff * in input handlers

2007-10-15 Thread David Miller
From: YOSHIFUJI Hideaki / 吉藤英明 <[EMAIL PROTECTED]>
Date: Mon, 15 Oct 2007 00:43:03 +0900 (JST)

> Herbert,
> 
> I really appreciate this work.
> Thank you!

Indeed, I do too.

Thanks again Herbert!
-
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [PATCH 3/3] [IPV6]: Replace sk_buff ** with sk_buff * in input handlers

2007-10-15 Thread Herbert Xu
On Mon, Oct 15, 2007 at 01:29:39AM -0700, David Miller wrote:
> From: Herbert Xu <[EMAIL PROTECTED]>
> Date: Sun, 14 Oct 2007 22:49:05 +0800
> 
> > [IPV6]: Replace sk_buff ** with sk_buff * in input handlers
> > 
> > With all the users of the double pointers removed from the IPv6 input path,
> > this patch converts all occurances of sk_buff ** to sk_buff * in IPv6 input
> > handlers.
> > 
> > Signed-off-by: Herbert Xu <[EMAIL PROTECTED]>
> 
> Also applied, thanks Herbert.

I just pulled your tree and this patch seems to be missing.
Everything else seems to be there though.

Thanks,
-- 
Visit Openswan at http://www.openswan.org/
Email: Herbert Xu ~{PmV>HI~} <[EMAIL PROTECTED]>
Home Page: http://gondor.apana.org.au/~herbert/
PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt
-
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html