All of lore.kernel.org
 help / color / mirror / Atom feed
* [TRIVIAL PATCH] gcc4 / kill `extern inline` in nf_conntrack.h
@ 2005-08-01 10:08 Pawel Sikora
  2005-08-03 13:00 ` Samir Bellabes
  0 siblings, 1 reply; 4+ messages in thread
From: Pawel Sikora @ 2005-08-01 10:08 UTC (permalink / raw)
  To: Netfilter Development Mailinglist, Patrick McHardy

[-- Attachment #1: Type: text/plain, Size: 1 bytes --]



[-- Attachment #2: nf_ct.diff --]
[-- Type: text/x-diff, Size: 531 bytes --]

Index: linux-2.6/include/linux/netfilter/nf_conntrack.h
===================================================================
--- linux-2.6/include/linux/netfilter/nf_conntrack.h	(revision 4208)
+++ linux-2.6/include/linux/netfilter/nf_conntrack.h	(working copy)
@@ -218,7 +218,7 @@
 }
 
 /* decrement reference count on a conntrack */
-extern inline void nf_ct_put(struct nf_conn *ct);
+extern void nf_ct_put(struct nf_conn *ct);
 
 /* call to create an explicit dependency on nf_conntrack. */
 extern void need_nf_conntrack(void);

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

* Re: [TRIVIAL PATCH] gcc4 / kill `extern inline` in nf_conntrack.h
  2005-08-01 10:08 [TRIVIAL PATCH] gcc4 / kill `extern inline` in nf_conntrack.h Pawel Sikora
@ 2005-08-03 13:00 ` Samir Bellabes
  2005-10-31  4:00   ` Yasuyuki KOZAKAI
  0 siblings, 1 reply; 4+ messages in thread
From: Samir Bellabes @ 2005-08-03 13:00 UTC (permalink / raw)
  To: Pawel Sikora; +Cc: Netfilter Development Mailinglist, Patrick McHardy

Pawel Sikora <pluto@agmk.net> writes:

> Index: linux-2.6/include/linux/netfilter/nf_conntrack.h
> ===================================================================
> --- linux-2.6/include/linux/netfilter/nf_conntrack.h	(revision 4208)
> +++ linux-2.6/include/linux/netfilter/nf_conntrack.h	(working copy)
> @@ -218,7 +218,7 @@
>  }
>  
>  /* decrement reference count on a conntrack */
> -extern inline void nf_ct_put(struct nf_conn *ct);
> +extern void nf_ct_put(struct nf_conn *ct);
>  
>  /* call to create an explicit dependency on nf_conntrack. */
>  extern void need_nf_conntrack(void);

Why not keeping inline attribut for nf_ct_put ?

diff --git a/include/linux/netfilter/nf_conntrack.h b/include/linux/netfilter/nf_conntrack.h
--- a/include/linux/netfilter/nf_conntrack.h
+++ b/include/linux/netfilter/nf_conntrack.h
@@ -218,7 +218,10 @@ nf_ct_get(struct sk_buff *skb, enum nf_c
 }
 
 /* decrement reference count on a conntrack */
-extern inline void nf_ct_put(struct nf_conn *ct);
+extern inline void nf_ct_put(struct nf_conn *ct) {
+       NF_CT_ASSERT(ct);
+       nf_conntrack_put(&ct->ct_general);
+};
 
 /* call to create an explicit dependency on nf_conntrack. */
 extern void need_nf_conntrack(void);
diff --git a/net/netfilter/nf_conntrack_core.c b/net/netfilter/nf_conntrack_core.c
--- a/net/netfilter/nf_conntrack_core.c
+++ b/net/netfilter/nf_conntrack_core.c
@@ -125,13 +125,6 @@ nf_ct_find_proto(u_int16_t l3proto, u_in
        return nf_ct_protos[l3proto][protocol];
 }
 
-void 
-nf_ct_put(struct nf_conn *ct)
-{
-       NF_CT_ASSERT(ct);
-       nf_conntrack_put(&ct->ct_general);
-}
-
 static int nf_conntrack_hash_rnd_initted;
 static unsigned int nf_conntrack_hash_rnd;

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

* Re: [TRIVIAL PATCH] gcc4 / kill `extern inline` in nf_conntrack.h
  2005-08-03 13:00 ` Samir Bellabes
@ 2005-10-31  4:00   ` Yasuyuki KOZAKAI
  2005-11-03 18:13     ` Harald Welte
  0 siblings, 1 reply; 4+ messages in thread
From: Yasuyuki KOZAKAI @ 2005-10-31  4:00 UTC (permalink / raw)
  To: sbellabes; +Cc: netfilter-devel, kaber

[-- Attachment #1: Type: Text/Plain, Size: 870 bytes --]


Hi, Samir, sorry for huge latency of replying. I found this at
patchwork.netfilter.org now.

From: Samir Bellabes <sbellabes@mandriva.com>
Date: Wed, 03 Aug 2005 15:00:48 +0200

> >  /* decrement reference count on a conntrack */
> > -extern inline void nf_ct_put(struct nf_conn *ct);
> > +extern void nf_ct_put(struct nf_conn *ct);
> >  
> >  /* call to create an explicit dependency on nf_conntrack. */
> >  extern void need_nf_conntrack(void);
> 
> Why not keeping inline attribut for nf_ct_put ?

Now there is no reason. Maybe it was restriction in old code.

Thank you for patch. but currently, the path of this header was changed to
include/net/netfilter. And I found one more 'extern inline'. Then I've written
new patch.

Harald, could you apply attached patch ?

Signed-off-by: Yasuyuki Kozakai <yasuyuki.kozakai@toshiba.co.jp>

Regards,

--- Yasuyuki Kozakai

[-- Attachment #2: nfct-inline.patch --]
[-- Type: Text/Plain, Size: 2558 bytes --]

[NETFILTER] use 'static inline' in nf_conntrack

No reason to use inline function for nf_ct_put() as Samir Bellabes pointed
out. And this patch also kills 'extern inline'.

Signed-off-by: Yasuyuki Kozakai <yasuyuki.kozakai@toshiba.co.jp>

---
commit 296d553d2cf7856d37e613ab20b4290dbfe38afa
tree 0143797293aec567d1ae58731e363316feb50e86
parent fd915a969648f21b5690097f130e47826cd9fb9e
author Yasuyuki Kozakai <yasuyuki.kozakai@toshiba.co.jp> Mon, 31 Oct 2005 00:05:39 +0900
committer Yasuyuki Kozakai <yasuyuki.kozakai@toshiba.co.jp> Mon, 31 Oct 2005 00:05:39 +0900

 include/net/netfilter/nf_conntrack.h    |    8 ++++++--
 net/netfilter/nf_conntrack_core.c       |    7 -------
 net/netfilter/nf_conntrack_standalone.c |    1 -
 3 files changed, 6 insertions(+), 10 deletions(-)

diff --git a/include/net/netfilter/nf_conntrack.h b/include/net/netfilter/nf_conntrack.h
--- a/include/net/netfilter/nf_conntrack.h
+++ b/include/net/netfilter/nf_conntrack.h
@@ -184,7 +184,11 @@ nf_ct_get(const struct sk_buff *skb, enu
 }
 
 /* decrement reference count on a conntrack */
-extern void nf_ct_put(struct nf_conn *ct);
+static inline void nf_ct_put(struct nf_conn *ct)
+{
+	NF_CT_ASSERT(ct);
+	nf_conntrack_put(&ct->ct_general);
+}
 
 /* call to create an explicit dependency on nf_conntrack. */
 extern void need_nf_conntrack(void);
@@ -208,7 +212,7 @@ static inline void nf_ct_refresh_acct(st
 }
 
 /* Refresh conntrack for this many jiffies */
-extern inline void nf_ct_refresh(struct nf_conn *ct,
+static inline void nf_ct_refresh(struct nf_conn *ct,
 				 const struct sk_buff *skb,
 				 unsigned long extra_jiffies)
 {
diff --git a/net/netfilter/nf_conntrack_core.c b/net/netfilter/nf_conntrack_core.c
--- a/net/netfilter/nf_conntrack_core.c
+++ b/net/netfilter/nf_conntrack_core.c
@@ -192,13 +192,6 @@ nf_ct_find_proto(u_int16_t l3proto, u_in
 	return nf_ct_protos[l3proto][protocol];
 }
 
-void 
-nf_ct_put(struct nf_conn *ct)
-{
-	NF_CT_ASSERT(ct);
-	nf_conntrack_put(&ct->ct_general);
-}
-
 static int nf_conntrack_hash_rnd_initted;
 static unsigned int nf_conntrack_hash_rnd;
 
diff --git a/net/netfilter/nf_conntrack_standalone.c b/net/netfilter/nf_conntrack_standalone.c
--- a/net/netfilter/nf_conntrack_standalone.c
+++ b/net/netfilter/nf_conntrack_standalone.c
@@ -859,7 +859,6 @@ EXPORT_SYMBOL(nf_conntrack_lock);
 EXPORT_SYMBOL(nf_conntrack_hash);
 EXPORT_SYMBOL(nf_conntrack_untracked);
 EXPORT_SYMBOL_GPL(nf_conntrack_find_get);
-EXPORT_SYMBOL_GPL(nf_ct_put);
 #ifdef CONFIG_IP_NF_NAT_NEEDED
 EXPORT_SYMBOL(nf_conntrack_tcp_update);
 #endif

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

* Re: [TRIVIAL PATCH] gcc4 / kill `extern inline` in nf_conntrack.h
  2005-10-31  4:00   ` Yasuyuki KOZAKAI
@ 2005-11-03 18:13     ` Harald Welte
  0 siblings, 0 replies; 4+ messages in thread
From: Harald Welte @ 2005-11-03 18:13 UTC (permalink / raw)
  To: Yasuyuki KOZAKAI; +Cc: netfilter-devel, sbellabes, kaber

[-- Attachment #1: Type: text/plain, Size: 583 bytes --]

On Mon, Oct 31, 2005 at 01:00:38PM +0900, Yasuyuki KOZAKAI wrote:
> 
> Hi, Samir, sorry for huge latency of replying. I found this at
> patchwork.netfilter.org now.

thanks, merging it to my tree right now
-- 
- Harald Welte <laforge@netfilter.org>                 http://netfilter.org/
============================================================================
  "Fragmentation is like classful addressing -- an interesting early
   architectural error that shows how much experimentation was going
   on while IP was being designed."                    -- Paul Vixie

[-- Attachment #2: Type: application/pgp-signature, Size: 189 bytes --]

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

end of thread, other threads:[~2005-11-03 18:13 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2005-08-01 10:08 [TRIVIAL PATCH] gcc4 / kill `extern inline` in nf_conntrack.h Pawel Sikora
2005-08-03 13:00 ` Samir Bellabes
2005-10-31  4:00   ` Yasuyuki KOZAKAI
2005-11-03 18:13     ` Harald Welte

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.