All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH net-next-2.6] ipfrag : frag_kfree_skb() cleanup
@ 2010-06-14  9:22 Eric Dumazet
  2010-06-14 14:01 ` Shan Wei
  2010-06-16  1:13 ` David Miller
  0 siblings, 2 replies; 5+ messages in thread
From: Eric Dumazet @ 2010-06-14  9:22 UTC (permalink / raw)
  To: David Miller; +Cc: netdev

Third param (work) is unused, remove it.

Remove __inline__ and inline qualifiers.

Signed-off-by: Eric Dumazet <eric.dumazet@gmail.com>
---
 net/ipv4/ip_fragment.c |    9 +++------
 net/ipv6/reassembly.c  |    7 ++-----
 2 files changed, 5 insertions(+), 11 deletions(-)

diff --git a/net/ipv4/ip_fragment.c b/net/ipv4/ip_fragment.c
index 75347ea..7e660dd 100644
--- a/net/ipv4/ip_fragment.c
+++ b/net/ipv4/ip_fragment.c
@@ -124,11 +124,8 @@ static int ip4_frag_match(struct inet_frag_queue *q, void *a)
 }
 
 /* Memory Tracking Functions. */
-static __inline__ void frag_kfree_skb(struct netns_frags *nf,
-		struct sk_buff *skb, int *work)
+static void frag_kfree_skb(struct netns_frags *nf, struct sk_buff *skb)
 {
-	if (work)
-		*work -= skb->truesize;
 	atomic_sub(skb->truesize, &nf->mem);
 	kfree_skb(skb);
 }
@@ -309,7 +306,7 @@ static int ip_frag_reinit(struct ipq *qp)
 	fp = qp->q.fragments;
 	do {
 		struct sk_buff *xp = fp->next;
-		frag_kfree_skb(qp->q.net, fp, NULL);
+		frag_kfree_skb(qp->q.net, fp);
 		fp = xp;
 	} while (fp);
 
@@ -446,7 +443,7 @@ static int ip_frag_queue(struct ipq *qp, struct sk_buff *skb)
 				qp->q.fragments = next;
 
 			qp->q.meat -= free_it->len;
-			frag_kfree_skb(qp->q.net, free_it, NULL);
+			frag_kfree_skb(qp->q.net, free_it);
 		}
 	}
 
diff --git a/net/ipv6/reassembly.c b/net/ipv6/reassembly.c
index 6d4292f..f967978 100644
--- a/net/ipv6/reassembly.c
+++ b/net/ipv6/reassembly.c
@@ -150,11 +150,8 @@ int ip6_frag_match(struct inet_frag_queue *q, void *a)
 EXPORT_SYMBOL(ip6_frag_match);
 
 /* Memory Tracking Functions. */
-static inline void frag_kfree_skb(struct netns_frags *nf,
-		struct sk_buff *skb, int *work)
+static void frag_kfree_skb(struct netns_frags *nf, struct sk_buff *skb)
 {
-	if (work)
-		*work -= skb->truesize;
 	atomic_sub(skb->truesize, &nf->mem);
 	kfree_skb(skb);
 }
@@ -392,7 +389,7 @@ static int ip6_frag_queue(struct frag_queue *fq, struct sk_buff *skb,
 				fq->q.fragments = next;
 
 			fq->q.meat -= free_it->len;
-			frag_kfree_skb(fq->q.net, free_it, NULL);
+			frag_kfree_skb(fq->q.net, free_it);
 		}
 	}
 



^ permalink raw reply related	[flat|nested] 5+ messages in thread

* Re: [PATCH net-next-2.6] ipfrag : frag_kfree_skb() cleanup
  2010-06-14  9:22 [PATCH net-next-2.6] ipfrag : frag_kfree_skb() cleanup Eric Dumazet
@ 2010-06-14 14:01 ` Shan Wei
  2010-06-14 14:20   ` Eric Dumazet
  2010-06-16  1:13 ` David Miller
  1 sibling, 1 reply; 5+ messages in thread
From: Shan Wei @ 2010-06-14 14:01 UTC (permalink / raw)
  To: Eric Dumazet; +Cc: David Miller, netdev, Patrick McHardy, netfilter-devel

Eric Dumazet wrote, at 06/14/2010 05:22 PM:
> Third param (work) is unused, remove it.
> 
> Remove __inline__ and inline qualifiers.
> 
> Signed-off-by: Eric Dumazet <eric.dumazet@gmail.com>

we also need to fix IPv6 netfilter.

[PATCH 2/2] netfilter: defrag: kill unused work parameter of frag_kfree_skb()

The parameter (work) is unused, remove it.
Reported from Eric Dumazet.

Signed-off-by: Shan Wei <shanwei@cn.fujitsu.com>
---
 net/ipv6/netfilter/nf_conntrack_reasm.c |    6 ++----
 1 files changed, 2 insertions(+), 4 deletions(-)

diff --git a/net/ipv6/netfilter/nf_conntrack_reasm.c b/net/ipv6/netfilter/nf_conntrack_reasm.c
index bc5b86d..9254008 100644
--- a/net/ipv6/netfilter/nf_conntrack_reasm.c
+++ b/net/ipv6/netfilter/nf_conntrack_reasm.c
@@ -114,10 +114,8 @@ static void nf_skb_free(struct sk_buff *skb)
 }
 
 /* Memory Tracking Functions. */
-static inline void frag_kfree_skb(struct sk_buff *skb, unsigned int *work)
+static void frag_kfree_skb(struct sk_buff *skb)
 {
-	if (work)
-		*work -= skb->truesize;
 	atomic_sub(skb->truesize, &nf_init_frags.mem);
 	nf_skb_free(skb);
 	kfree_skb(skb);
@@ -335,7 +333,7 @@ static int nf_ct_frag6_queue(struct nf_ct_frag6_queue *fq, struct sk_buff *skb,
 				fq->q.fragments = next;
 
 			fq->q.meat -= free_it->len;
-			frag_kfree_skb(free_it, NULL);
+			frag_kfree_skb(free_it);
 		}
 	}
 
-- 
1.6.3.3

^ permalink raw reply related	[flat|nested] 5+ messages in thread

* Re: [PATCH net-next-2.6] ipfrag : frag_kfree_skb() cleanup
  2010-06-14 14:01 ` Shan Wei
@ 2010-06-14 14:20   ` Eric Dumazet
  2010-06-14 14:32     ` Patrick McHardy
  0 siblings, 1 reply; 5+ messages in thread
From: Eric Dumazet @ 2010-06-14 14:20 UTC (permalink / raw)
  To: Shan Wei; +Cc: David Miller, netdev, Patrick McHardy, netfilter-devel

Le lundi 14 juin 2010 à 22:01 +0800, Shan Wei a écrit :
> Eric Dumazet wrote, at 06/14/2010 05:22 PM:
> > Third param (work) is unused, remove it.
> > 
> > Remove __inline__ and inline qualifiers.
> > 
> > Signed-off-by: Eric Dumazet <eric.dumazet@gmail.com>
> 
> we also need to fix IPv6 netfilter.
> 

well, 'fix' is not appropriate, there is no bug ;)

> [PATCH 2/2] netfilter: defrag: kill unused work parameter of frag_kfree_skb()
> 
> The parameter (work) is unused, remove it.
> Reported from Eric Dumazet.
> 
> Signed-off-by: Shan Wei <shanwei@cn.fujitsu.com>

Acked-by: Eric Dumazet <eric.dumazet@gmail.com>

> ---
>  net/ipv6/netfilter/nf_conntrack_reasm.c |    6 ++----
>  1 files changed, 2 insertions(+), 4 deletions(-)
> 
> diff --git a/net/ipv6/netfilter/nf_conntrack_reasm.c b/net/ipv6/netfilter/nf_conntrack_reasm.c
> index bc5b86d..9254008 100644
> --- a/net/ipv6/netfilter/nf_conntrack_reasm.c
> +++ b/net/ipv6/netfilter/nf_conntrack_reasm.c
> @@ -114,10 +114,8 @@ static void nf_skb_free(struct sk_buff *skb)
>  }
>  
>  /* Memory Tracking Functions. */
> -static inline void frag_kfree_skb(struct sk_buff *skb, unsigned int *work)
> +static void frag_kfree_skb(struct sk_buff *skb)
>  {
> -	if (work)
> -		*work -= skb->truesize;
>  	atomic_sub(skb->truesize, &nf_init_frags.mem);
>  	nf_skb_free(skb);
>  	kfree_skb(skb);
> @@ -335,7 +333,7 @@ static int nf_ct_frag6_queue(struct nf_ct_frag6_queue *fq, struct sk_buff *skb,
>  				fq->q.fragments = next;
>  
>  			fq->q.meat -= free_it->len;
> -			frag_kfree_skb(free_it, NULL);
> +			frag_kfree_skb(free_it);
>  		}
>  	}
>  



^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH net-next-2.6] ipfrag : frag_kfree_skb() cleanup
  2010-06-14 14:20   ` Eric Dumazet
@ 2010-06-14 14:32     ` Patrick McHardy
  0 siblings, 0 replies; 5+ messages in thread
From: Patrick McHardy @ 2010-06-14 14:32 UTC (permalink / raw)
  To: Eric Dumazet; +Cc: Shan Wei, David Miller, netdev, netfilter-devel

Eric Dumazet wrote:
> Le lundi 14 juin 2010 à 22:01 +0800, Shan Wei a écrit :
>   
>> [PATCH 2/2] netfilter: defrag: kill unused work parameter of frag_kfree_skb()
>>
>> The parameter (work) is unused, remove it.
>> Reported from Eric Dumazet.
>>
>> Signed-off-by: Shan Wei <shanwei@cn.fujitsu.com>
>>     
>
> Acked-by: Eric Dumazet <eric.dumazet@gmail.com>
>
>   
Also applied, thanks.
--
To unsubscribe from this list: send the line "unsubscribe netfilter-devel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH net-next-2.6] ipfrag : frag_kfree_skb() cleanup
  2010-06-14  9:22 [PATCH net-next-2.6] ipfrag : frag_kfree_skb() cleanup Eric Dumazet
  2010-06-14 14:01 ` Shan Wei
@ 2010-06-16  1:13 ` David Miller
  1 sibling, 0 replies; 5+ messages in thread
From: David Miller @ 2010-06-16  1:13 UTC (permalink / raw)
  To: eric.dumazet; +Cc: netdev

From: Eric Dumazet <eric.dumazet@gmail.com>
Date: Mon, 14 Jun 2010 11:22:43 +0200

> Third param (work) is unused, remove it.
> 
> Remove __inline__ and inline qualifiers.
> 
> Signed-off-by: Eric Dumazet <eric.dumazet@gmail.com>

Applied.

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2010-06-16  1:12 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-06-14  9:22 [PATCH net-next-2.6] ipfrag : frag_kfree_skb() cleanup Eric Dumazet
2010-06-14 14:01 ` Shan Wei
2010-06-14 14:20   ` Eric Dumazet
2010-06-14 14:32     ` Patrick McHardy
2010-06-16  1:13 ` David Miller

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.