gcc4 / kill `extern inline` in nf_conntrack.h
Subsystems (2)
PATCH 1/1 gcc4 / kill `extern inline` in nf_conntrack.h
include/linux/netfilter/nf_conntrack.h +1 -1
@@ -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 );
include/linux/netfilter/nf_conntrack.h line 224
Quoted 13 lines · Pawel Sikora
Index:
linux-2.6/include/linux/netfilter/nf_conntrack.h
===================================================================include/linux/netfilter/nf_conntrack.h +1
-1@@ -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 ?
include/linux/netfilter/nf_conntrack.h +4 -1
@@ -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 );
net/netfilter/nf_conntrack_core.c +0 -7
@@ -125,13 +125,6 @@ nf_ct_find_proto(u_int16_t l3proto, u_inreturn 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;
Hi, Samir, sorry for huge latency of replying. I found this at patchwork.netfilter.org now.
From: Samir Bellabes <[email protected]>
Date: Wed, 03 Aug 2005 15:00:48 +0200
Quoted 8 lines
Review
Quoted 6 lines
/* decrement reference count on a conntrack */
(quoted diff) +1
-1-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 ?
Regards,
--- Yasuyuki Kozakai
[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'.
---
commit 296d553d2cf7856d37e613ab20b4290dbfe38afa
tree 0143797293aec567d1ae58731e363316feb50e86
parent fd915a969648f21b5690097f130e47826cd9fb9e
author Yasuyuki Kozakai <[email protected]> Mon, 31 Oct 2005 00:05:39 +0900 committer Yasuyuki Kozakai <[email protected]> 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(-)
include/net/netfilter/nf_conntrack.h +6 -2
@@ -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) {
net/netfilter/nf_conntrack_core.c +0 -7
@@ -192,13 +192,6 @@ nf_ct_find_proto(u_int16_t l3proto, u_inreturn 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;
net/netfilter/nf_conntrack_standalone.c +0 -1
@@ -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
Quoted 3 lines · Yasuyuki KOZAKAI
Hi, Samir, sorry for huge latency of replying. I found this at patchwork.netfilter.org now.
thanks, merging it to my tree right now
Signature · 5 lines
- Harald Welte <[email protected]> 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