linux-next.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* linux-next: manual merge of the net-next tree with the net tree
@ 2015-03-23  3:08 Stephen Rothwell
  2015-03-23 12:47 ` Pablo Neira Ayuso
  0 siblings, 1 reply; 12+ messages in thread
From: Stephen Rothwell @ 2015-03-23  3:08 UTC (permalink / raw)
  To: David Miller, netdev
  Cc: linux-next, linux-kernel, Pablo Neira Ayuso, Patrick McHardy

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

Hi all,

Today's linux-next merge of the net-next tree got a conflict in
net/netfilter/nf_tables_core.c between commit 4017a7ee693d ("netfilter:
restore rule tracing via nfnetlink_log") from the net tree and commit
01ef16c2dd2e ("netfilter: nf_tables: minor tracing cleanups") from the
net-next tree.

I fixed it up (see below) and can carry the fix as necessary (no action
is required).

-- 
Cheers,
Stephen Rothwell                    sfr@canb.auug.org.au

diff --cc net/netfilter/nf_tables_core.c
index 2d298dccb6dd,77165bf023f3..000000000000
--- a/net/netfilter/nf_tables_core.c
+++ b/net/netfilter/nf_tables_core.c
@@@ -21,6 -21,48 +21,48 @@@
  #include <net/netfilter/nf_tables.h>
  #include <net/netfilter/nf_log.h>
  
+ enum nft_trace {
+ 	NFT_TRACE_RULE,
+ 	NFT_TRACE_RETURN,
+ 	NFT_TRACE_POLICY,
+ };
+ 
+ static const char *const comments[] = {
+ 	[NFT_TRACE_RULE]	= "rule",
+ 	[NFT_TRACE_RETURN]	= "return",
+ 	[NFT_TRACE_POLICY]	= "policy",
+ };
+ 
+ static struct nf_loginfo trace_loginfo = {
+ 	.type = NF_LOG_TYPE_LOG,
+ 	.u = {
+ 		.log = {
+ 			.level = 4,
+ 			.logflags = NF_LOG_MASK,
+ 	        },
+ 	},
+ };
+ 
+ static void __nft_trace_packet(const struct nft_pktinfo *pkt,
+ 			       const struct nft_chain *chain,
+ 			       int rulenum, enum nft_trace type)
+ {
+ 	struct net *net = dev_net(pkt->in ? pkt->in : pkt->out);
+ 
 -	nf_log_packet(net, pkt->xt.family, pkt->ops->hooknum, pkt->skb, pkt->in,
 -		      pkt->out, &trace_loginfo, "TRACE: %s:%s:%s:%u ",
 -		      chain->table->name, chain->name, comments[type],
 -		      rulenum);
++	nf_log_trace(net, pkt->xt.family, pkt->ops->hooknum, pkt->skb, pkt->in,
++		     pkt->out, &trace_loginfo, "TRACE: %s:%s:%s:%u ",
++		     chain->table->name, chain->name, comments[type],
++		     rulenum);
+ }
+ 
+ static inline void nft_trace_packet(const struct nft_pktinfo *pkt,
+ 				    const struct nft_chain *chain,
+ 				    int rulenum, enum nft_trace type)
+ {
+ 	if (unlikely(pkt->skb->nf_trace))
+ 		__nft_trace_packet(pkt, chain, rulenum, type);
+ }
+ 
  static void nft_cmp_fast_eval(const struct nft_expr *expr,
  			      struct nft_data data[NFT_REG_MAX + 1])
  {

[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 819 bytes --]

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

* Re: linux-next: manual merge of the net-next tree with the net tree
  2015-03-23  3:08 linux-next: manual merge of the net-next tree with the net tree Stephen Rothwell
@ 2015-03-23 12:47 ` Pablo Neira Ayuso
  2015-03-23 12:55   ` Joe Perches
  2015-03-24  2:29   ` linux-next: manual merge of the net-next tree with the net tree David Miller
  0 siblings, 2 replies; 12+ messages in thread
From: Pablo Neira Ayuso @ 2015-03-23 12:47 UTC (permalink / raw)
  To: Stephen Rothwell
  Cc: David Miller, netdev, linux-next, linux-kernel, Patrick McHardy

On Mon, Mar 23, 2015 at 02:08:41PM +1100, Stephen Rothwell wrote:
> Hi all,
> 
> Today's linux-next merge of the net-next tree got a conflict in
> net/netfilter/nf_tables_core.c between commit 4017a7ee693d ("netfilter:
> restore rule tracing via nfnetlink_log") from the net tree and commit
> 01ef16c2dd2e ("netfilter: nf_tables: minor tracing cleanups") from the
> net-next tree.
> 
> I fixed it up (see below) and can carry the fix as necessary (no action
> is required).

This looks good, thanks for adressing this conflict Stephen.

> -- 
> Cheers,
> Stephen Rothwell                    sfr@canb.auug.org.au
> 
> diff --cc net/netfilter/nf_tables_core.c
> index 2d298dccb6dd,77165bf023f3..000000000000
> --- a/net/netfilter/nf_tables_core.c
> +++ b/net/netfilter/nf_tables_core.c
> @@@ -21,6 -21,48 +21,48 @@@
>   #include <net/netfilter/nf_tables.h>
>   #include <net/netfilter/nf_log.h>
>   
> + enum nft_trace {
> + 	NFT_TRACE_RULE,
> + 	NFT_TRACE_RETURN,
> + 	NFT_TRACE_POLICY,
> + };
> + 
> + static const char *const comments[] = {
> + 	[NFT_TRACE_RULE]	= "rule",
> + 	[NFT_TRACE_RETURN]	= "return",
> + 	[NFT_TRACE_POLICY]	= "policy",
> + };
> + 
> + static struct nf_loginfo trace_loginfo = {
> + 	.type = NF_LOG_TYPE_LOG,
> + 	.u = {
> + 		.log = {
> + 			.level = 4,
> + 			.logflags = NF_LOG_MASK,
> + 	        },
> + 	},
> + };
> + 
> + static void __nft_trace_packet(const struct nft_pktinfo *pkt,
> + 			       const struct nft_chain *chain,
> + 			       int rulenum, enum nft_trace type)
> + {
> + 	struct net *net = dev_net(pkt->in ? pkt->in : pkt->out);
> + 
>  -	nf_log_packet(net, pkt->xt.family, pkt->ops->hooknum, pkt->skb, pkt->in,
>  -		      pkt->out, &trace_loginfo, "TRACE: %s:%s:%s:%u ",
>  -		      chain->table->name, chain->name, comments[type],
>  -		      rulenum);
> ++	nf_log_trace(net, pkt->xt.family, pkt->ops->hooknum, pkt->skb, pkt->in,
> ++		     pkt->out, &trace_loginfo, "TRACE: %s:%s:%s:%u ",
> ++		     chain->table->name, chain->name, comments[type],
> ++		     rulenum);
> + }
> + 
> + static inline void nft_trace_packet(const struct nft_pktinfo *pkt,
> + 				    const struct nft_chain *chain,
> + 				    int rulenum, enum nft_trace type)
> + {
> + 	if (unlikely(pkt->skb->nf_trace))
> + 		__nft_trace_packet(pkt, chain, rulenum, type);
> + }
> + 
>   static void nft_cmp_fast_eval(const struct nft_expr *expr,
>   			      struct nft_data data[NFT_REG_MAX + 1])
>   {

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

* Re: linux-next: manual merge of the net-next tree with the net tree
  2015-03-23 12:47 ` Pablo Neira Ayuso
@ 2015-03-23 12:55   ` Joe Perches
  2015-03-23 13:06     ` Pablo Neira Ayuso
  2015-03-24  2:29   ` linux-next: manual merge of the net-next tree with the net tree David Miller
  1 sibling, 1 reply; 12+ messages in thread
From: Joe Perches @ 2015-03-23 12:55 UTC (permalink / raw)
  To: Pablo Neira Ayuso
  Cc: Stephen Rothwell, David Miller, netdev, linux-next, linux-kernel,
	Patrick McHardy

On Mon, 2015-03-23 at 13:47 +0100, Pablo Neira Ayuso wrote:
> On Mon, Mar 23, 2015 at 02:08:41PM +1100, Stephen Rothwell wrote:
> > Today's linux-next merge of the net-next tree got a conflict in
> > net/netfilter/nf_tables_core.c between commit 4017a7ee693d ("netfilter:
> > restore rule tracing via nfnetlink_log") from the net tree and commit
> > 01ef16c2dd2e ("netfilter: nf_tables: minor tracing cleanups") from the
> > net-next tree.
> > 
> > I fixed it up (see below) and can carry the fix as necessary (no action
> > is required).
> "
> This looks good, thanks for adressing this conflict Stephen.

trivia:

> > diff --cc net/netfilter/nf_tables_core.c
[]
> > + static struct nf_loginfo trace_loginfo = {
> > + 	.type = NF_LOG_TYPE_LOG,
> > + 	.u = {
> > + 		.log = {
> > + 			.level = 4,

Perhaps all the .level = 4 uses should be LOGLEVEL_WARNING
and .level = 5 should be LOGLEVEL_NOTICE

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

* Re: linux-next: manual merge of the net-next tree with the net tree
  2015-03-23 12:55   ` Joe Perches
@ 2015-03-23 13:06     ` Pablo Neira Ayuso
  2015-03-23 13:23       ` [PATCH -next] netfilter: Use LOGLEVEL_<FOO> defines Joe Perches
  0 siblings, 1 reply; 12+ messages in thread
From: Pablo Neira Ayuso @ 2015-03-23 13:06 UTC (permalink / raw)
  To: Joe Perches
  Cc: Stephen Rothwell, David Miller, netdev, linux-next, linux-kernel,
	Patrick McHardy

On Mon, Mar 23, 2015 at 05:55:31AM -0700, Joe Perches wrote:
> On Mon, 2015-03-23 at 13:47 +0100, Pablo Neira Ayuso wrote:
> > On Mon, Mar 23, 2015 at 02:08:41PM +1100, Stephen Rothwell wrote:
> > > Today's linux-next merge of the net-next tree got a conflict in
> > > net/netfilter/nf_tables_core.c between commit 4017a7ee693d ("netfilter:
> > > restore rule tracing via nfnetlink_log") from the net tree and commit
> > > 01ef16c2dd2e ("netfilter: nf_tables: minor tracing cleanups") from the
> > > net-next tree.
> > > 
> > > I fixed it up (see below) and can carry the fix as necessary (no action
> > > is required).
> > "
> > This looks good, thanks for adressing this conflict Stephen.
> 
> trivia:
> 
> > > diff --cc net/netfilter/nf_tables_core.c
> []
> > > + static struct nf_loginfo trace_loginfo = {
> > > + 	.type = NF_LOG_TYPE_LOG,
> > > + 	.u = {
> > > + 		.log = {
> > > + 			.level = 4,
> 
> Perhaps all the .level = 4 uses should be LOGLEVEL_WARNING
> and .level = 5 should be LOGLEVEL_NOTICE

Yes, we can push a follow up patch to net-next changing all these
spots in the netfilter tree. Would you send a patch for this?

Thanks.

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

* [PATCH -next] netfilter: Use LOGLEVEL_<FOO> defines
  2015-03-23 13:06     ` Pablo Neira Ayuso
@ 2015-03-23 13:23       ` Joe Perches
  2015-03-23 13:38         ` Stephen Rothwell
  0 siblings, 1 reply; 12+ messages in thread
From: Joe Perches @ 2015-03-23 13:23 UTC (permalink / raw)
  To: Pablo Neira Ayuso
  Cc: Stephen Rothwell, David Miller, netdev, linux-next, linux-kernel,
	Patrick McHardy

Use the #defines where appropriate.

Signed-off-by: Joe Perches <joe@perches.com>
---
> > Perhaps all the .level = 4 uses should be LOGLEVEL_WARNING
> > and .level = 5 should be LOGLEVEL_NOTICE
> 
> Yes, we can push a follow up patch to net-next changing all these
> spots in the netfilter tree. Would you send a patch for this?

There are indirect includes of kern_levels.h but there are a
lot of indirect includes of kernel.h in netfilter

 net/ipv4/netfilter/nf_log_arp.c  | 2 +-
 net/ipv4/netfilter/nf_log_ipv4.c | 2 +-
 net/ipv6/netfilter/ip6_tables.c  | 2 +-
 net/ipv6/netfilter/nf_log_ipv6.c | 2 +-
 net/netfilter/nf_tables_core.c   | 2 +-
 net/netfilter/nft_log.c          | 2 +-
 6 files changed, 6 insertions(+), 6 deletions(-)

diff --git a/net/ipv4/netfilter/nf_log_arp.c b/net/ipv4/netfilter/nf_log_arp.c
index d059182..1fe8d62 100644
--- a/net/ipv4/netfilter/nf_log_arp.c
+++ b/net/ipv4/netfilter/nf_log_arp.c
@@ -27,7 +27,7 @@ static struct nf_loginfo default_loginfo = {
 	.type	= NF_LOG_TYPE_LOG,
 	.u = {
 		.log = {
-			.level	  = 5,
+			.level	  = LOGLEVEL_NOTICE,
 			.logflags = NF_LOG_MASK,
 		},
 	},
diff --git a/net/ipv4/netfilter/nf_log_ipv4.c b/net/ipv4/netfilter/nf_log_ipv4.c
index 7510198..1e0ad92 100644
--- a/net/ipv4/netfilter/nf_log_ipv4.c
+++ b/net/ipv4/netfilter/nf_log_ipv4.c
@@ -26,7 +26,7 @@ static struct nf_loginfo default_loginfo = {
 	.type	= NF_LOG_TYPE_LOG,
 	.u = {
 		.log = {
-			.level	  = 5,
+			.level	  = LOGLEVEL_NOTICE,
 			.logflags = NF_LOG_MASK,
 		},
 	},
diff --git a/net/ipv6/netfilter/ip6_tables.c b/net/ipv6/netfilter/ip6_tables.c
index bb00c6f..0784cec 100644
--- a/net/ipv6/netfilter/ip6_tables.c
+++ b/net/ipv6/netfilter/ip6_tables.c
@@ -234,7 +234,7 @@ static struct nf_loginfo trace_loginfo = {
 	.type = NF_LOG_TYPE_LOG,
 	.u = {
 		.log = {
-			.level = 4,
+			.level = LOGLEVEL_WARNING,
 			.logflags = NF_LOG_MASK,
 		},
 	},
diff --git a/net/ipv6/netfilter/nf_log_ipv6.c b/net/ipv6/netfilter/nf_log_ipv6.c
index ddf07e6..b57a784 100644
--- a/net/ipv6/netfilter/nf_log_ipv6.c
+++ b/net/ipv6/netfilter/nf_log_ipv6.c
@@ -27,7 +27,7 @@ static struct nf_loginfo default_loginfo = {
 	.type	= NF_LOG_TYPE_LOG,
 	.u = {
 		.log = {
-			.level	  = 5,
+			.level	  = LOGLEVEL_NOTICE,
 			.logflags = NF_LOG_MASK,
 		},
 	},
diff --git a/net/netfilter/nf_tables_core.c b/net/netfilter/nf_tables_core.c
index 9a9e874..0a45e6b 100644
--- a/net/netfilter/nf_tables_core.c
+++ b/net/netfilter/nf_tables_core.c
@@ -37,7 +37,7 @@ static struct nf_loginfo trace_loginfo = {
 	.type = NF_LOG_TYPE_LOG,
 	.u = {
 		.log = {
-			.level = 4,
+			.level = LOGLEVEL_WARNING,
 			.logflags = NF_LOG_MASK,
 	        },
 	},
diff --git a/net/netfilter/nft_log.c b/net/netfilter/nft_log.c
index bde05f28..e18af9db 100644
--- a/net/netfilter/nft_log.c
+++ b/net/netfilter/nft_log.c
@@ -78,7 +78,7 @@ static int nft_log_init(const struct nft_ctx *ctx,
 			li->u.log.level =
 				ntohl(nla_get_be32(tb[NFTA_LOG_LEVEL]));
 		} else {
-			li->u.log.level = 4;
+			li->u.log.level = LOGLEVEL_WARNING;
 		}
 		if (tb[NFTA_LOG_FLAGS] != NULL) {
 			li->u.log.logflags =

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

* Re: [PATCH -next] netfilter: Use LOGLEVEL_<FOO> defines
  2015-03-23 13:23       ` [PATCH -next] netfilter: Use LOGLEVEL_<FOO> defines Joe Perches
@ 2015-03-23 13:38         ` Stephen Rothwell
  2015-03-23 13:52           ` Pablo Neira Ayuso
  2015-03-23 15:36           ` [PATCH " Joe Perches
  0 siblings, 2 replies; 12+ messages in thread
From: Stephen Rothwell @ 2015-03-23 13:38 UTC (permalink / raw)
  To: Joe Perches
  Cc: Pablo Neira Ayuso, David Miller, netdev, linux-next,
	linux-kernel, Patrick McHardy

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

Hi Joe,

On Mon, 23 Mar 2015 06:23:51 -0700 Joe Perches <joe@perches.com> wrote:
>
> Use the #defines where appropriate.
> 
> Signed-off-by: Joe Perches <joe@perches.com>
> ---
> > > Perhaps all the .level = 4 uses should be LOGLEVEL_WARNING
> > > and .level = 5 should be LOGLEVEL_NOTICE
> > 
> > Yes, we can push a follow up patch to net-next changing all these
> > spots in the netfilter tree. Would you send a patch for this?
> 
> There are indirect includes of kern_levels.h but there are a
> lot of indirect includes of kernel.h in netfilter

I am not sure what you are getting at here.  kernel.h does not include
kern_levels.h (but printk.h does).  I, for one, am always happier when
necessary include files are explicitly included.

-- 
Cheers,
Stephen Rothwell                    sfr@canb.auug.org.au

[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 819 bytes --]

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

* Re: [PATCH -next] netfilter: Use LOGLEVEL_<FOO> defines
  2015-03-23 13:38         ` Stephen Rothwell
@ 2015-03-23 13:52           ` Pablo Neira Ayuso
  2015-03-23 15:43             ` Joe Perches
  2015-03-23 18:50             ` [PATCH V2 " Joe Perches
  2015-03-23 15:36           ` [PATCH " Joe Perches
  1 sibling, 2 replies; 12+ messages in thread
From: Pablo Neira Ayuso @ 2015-03-23 13:52 UTC (permalink / raw)
  To: Stephen Rothwell
  Cc: Joe Perches, David Miller, netdev, linux-next, linux-kernel,
	Patrick McHardy

On Tue, Mar 24, 2015 at 12:38:28AM +1100, Stephen Rothwell wrote:
> Hi Joe,
> 
> On Mon, 23 Mar 2015 06:23:51 -0700 Joe Perches <joe@perches.com> wrote:
> >
> > Use the #defines where appropriate.
> > 
> > Signed-off-by: Joe Perches <joe@perches.com>
> > ---
> > > > Perhaps all the .level = 4 uses should be LOGLEVEL_WARNING
> > > > and .level = 5 should be LOGLEVEL_NOTICE
> > > 
> > > Yes, we can push a follow up patch to net-next changing all these
> > > spots in the netfilter tree. Would you send a patch for this?
> > 
> > There are indirect includes of kern_levels.h but there are a
> > lot of indirect includes of kernel.h in netfilter
> 
> I am not sure what you are getting at here.  kernel.h does not include
> kern_levels.h (but printk.h does).  I, for one, am always happier when
> necessary include files are explicitly included.

I would also prefer if you include the explicit header files in that
patch too. Could you send us a v2? Please, Cc:
netfilter-devel@vger.kernel.org

Thanks.

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

* Re: [PATCH -next] netfilter: Use LOGLEVEL_<FOO> defines
  2015-03-23 13:38         ` Stephen Rothwell
  2015-03-23 13:52           ` Pablo Neira Ayuso
@ 2015-03-23 15:36           ` Joe Perches
  1 sibling, 0 replies; 12+ messages in thread
From: Joe Perches @ 2015-03-23 15:36 UTC (permalink / raw)
  To: Stephen Rothwell
  Cc: Pablo Neira Ayuso, David Miller, netdev, linux-next,
	linux-kernel, Patrick McHardy

On Tue, 2015-03-24 at 00:38 +1100, Stephen Rothwell wrote:
> Hi Joe,

Hi Stephen.

> I am not sure what you are getting at here.  kernel.h does not include
> kern_levels.h (but printk.h does).  I, for one, am always happier when
> necessary include files are explicitly included.

kernel.h -> printk.h -> kern_levels.h

No .c file in the tree does a specific #include
of kern_levels.h, only a couple of .S files.

Adding printk.h might be useful, but I think
that kernel.h is probably better.

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

* Re: [PATCH -next] netfilter: Use LOGLEVEL_<FOO> defines
  2015-03-23 13:52           ` Pablo Neira Ayuso
@ 2015-03-23 15:43             ` Joe Perches
  2015-03-23 18:50             ` [PATCH V2 " Joe Perches
  1 sibling, 0 replies; 12+ messages in thread
From: Joe Perches @ 2015-03-23 15:43 UTC (permalink / raw)
  To: Pablo Neira Ayuso
  Cc: Stephen Rothwell, David Miller, netdev, linux-next, linux-kernel,
	Patrick McHardy

On Mon, 2015-03-23 at 14:52 +0100, Pablo Neira Ayuso wrote:
> I would also prefer if you include the explicit header files in that
> patch too. Could you send us a v2? Please, Cc:
> netfilter-devel@vger.kernel.org

As I wrote to Stephen, I'd prefer to #include
kernel.h where it's not already specified.

net/netfilter/nft_log.c does, every other
modified file doesn't.

Is that OK with you?

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

* [PATCH V2 -next] netfilter: Use LOGLEVEL_<FOO> defines
  2015-03-23 13:52           ` Pablo Neira Ayuso
  2015-03-23 15:43             ` Joe Perches
@ 2015-03-23 18:50             ` Joe Perches
  2015-03-25 11:19               ` Pablo Neira Ayuso
  1 sibling, 1 reply; 12+ messages in thread
From: Joe Perches @ 2015-03-23 18:50 UTC (permalink / raw)
  To: Pablo Neira Ayuso
  Cc: Stephen Rothwell, David Miller, netdev, linux-next, linux-kernel,
	Patrick McHardy, netfilter-devel

Use the #defines where appropriate.

Miscellanea:

Add explicit #include <linux/kernel.h> where it was not
previously used so that these #defines are a bit more
explicitly defined instead of indirectly included via:
	module.h->moduleparam.h->kernel.h

Signed-off-by: Joe Perches <joe@perches.com>
---

I really don't want to get into unwinding all the
various #include dependencies.  kernel.h is pretty
generic and effectively used throughout the tree
to centralize various #includes.

 net/ipv4/netfilter/nf_log_arp.c  | 4 +++-
 net/ipv4/netfilter/nf_log_ipv4.c | 4 +++-
 net/ipv6/netfilter/ip6_tables.c  | 5 ++++-
 net/ipv6/netfilter/nf_log_ipv6.c | 4 +++-
 net/netfilter/nf_tables_core.c   | 3 ++-
 net/netfilter/nft_log.c          | 2 +-
 6 files changed, 16 insertions(+), 6 deletions(-)

diff --git a/net/ipv4/netfilter/nf_log_arp.c b/net/ipv4/netfilter/nf_log_arp.c
index d059182..e7ad950 100644
--- a/net/ipv4/netfilter/nf_log_arp.c
+++ b/net/ipv4/netfilter/nf_log_arp.c
@@ -10,8 +10,10 @@
  * it under the terms of the GNU General Public License version 2 as
  * published by the Free Software Foundation.
  */
+
 #define pr_fmt(fmt) KBUILD_MODNAME ": " fmt
 
+#include <linux/kernel.h>
 #include <linux/module.h>
 #include <linux/spinlock.h>
 #include <linux/skbuff.h>
@@ -27,7 +29,7 @@ static struct nf_loginfo default_loginfo = {
 	.type	= NF_LOG_TYPE_LOG,
 	.u = {
 		.log = {
-			.level	  = 5,
+			.level	  = LOGLEVEL_NOTICE,
 			.logflags = NF_LOG_MASK,
 		},
 	},
diff --git a/net/ipv4/netfilter/nf_log_ipv4.c b/net/ipv4/netfilter/nf_log_ipv4.c
index 7510198..076aadd 100644
--- a/net/ipv4/netfilter/nf_log_ipv4.c
+++ b/net/ipv4/netfilter/nf_log_ipv4.c
@@ -5,8 +5,10 @@
  * it under the terms of the GNU General Public License version 2 as
  * published by the Free Software Foundation.
  */
+
 #define pr_fmt(fmt) KBUILD_MODNAME ": " fmt
 
+#include <linux/kernel.h>
 #include <linux/module.h>
 #include <linux/spinlock.h>
 #include <linux/skbuff.h>
@@ -26,7 +28,7 @@ static struct nf_loginfo default_loginfo = {
 	.type	= NF_LOG_TYPE_LOG,
 	.u = {
 		.log = {
-			.level	  = 5,
+			.level	  = LOGLEVEL_NOTICE,
 			.logflags = NF_LOG_MASK,
 		},
 	},
diff --git a/net/ipv6/netfilter/ip6_tables.c b/net/ipv6/netfilter/ip6_tables.c
index bb00c6f..83f59dc 100644
--- a/net/ipv6/netfilter/ip6_tables.c
+++ b/net/ipv6/netfilter/ip6_tables.c
@@ -9,7 +9,10 @@
  * it under the terms of the GNU General Public License version 2 as
  * published by the Free Software Foundation.
  */
+
 #define pr_fmt(fmt) KBUILD_MODNAME ": " fmt
+
+#include <linux/kernel.h>
 #include <linux/capability.h>
 #include <linux/in.h>
 #include <linux/skbuff.h>
@@ -234,7 +237,7 @@ static struct nf_loginfo trace_loginfo = {
 	.type = NF_LOG_TYPE_LOG,
 	.u = {
 		.log = {
-			.level = 4,
+			.level = LOGLEVEL_WARNING,
 			.logflags = NF_LOG_MASK,
 		},
 	},
diff --git a/net/ipv6/netfilter/nf_log_ipv6.c b/net/ipv6/netfilter/nf_log_ipv6.c
index ddf07e6..8dd8696 100644
--- a/net/ipv6/netfilter/nf_log_ipv6.c
+++ b/net/ipv6/netfilter/nf_log_ipv6.c
@@ -5,8 +5,10 @@
  * it under the terms of the GNU General Public License version 2 as
  * published by the Free Software Foundation.
  */
+
 #define pr_fmt(fmt) KBUILD_MODNAME ": " fmt
 
+#include <linux/kernel.h>
 #include <linux/module.h>
 #include <linux/spinlock.h>
 #include <linux/skbuff.h>
@@ -27,7 +29,7 @@ static struct nf_loginfo default_loginfo = {
 	.type	= NF_LOG_TYPE_LOG,
 	.u = {
 		.log = {
-			.level	  = 5,
+			.level	  = LOGLEVEL_NOTICE,
 			.logflags = NF_LOG_MASK,
 		},
 	},
diff --git a/net/netfilter/nf_tables_core.c b/net/netfilter/nf_tables_core.c
index 9a9e874..174e1f5 100644
--- a/net/netfilter/nf_tables_core.c
+++ b/net/netfilter/nf_tables_core.c
@@ -8,6 +8,7 @@
  * Development of this code funded by Astaro AG (http://www.astaro.com/)
  */
 
+#include <linux/kernel.h>
 #include <linux/module.h>
 #include <linux/init.h>
 #include <linux/list.h>
@@ -37,7 +38,7 @@ static struct nf_loginfo trace_loginfo = {
 	.type = NF_LOG_TYPE_LOG,
 	.u = {
 		.log = {
-			.level = 4,
+			.level = LOGLEVEL_WARNING,
 			.logflags = NF_LOG_MASK,
 	        },
 	},
diff --git a/net/netfilter/nft_log.c b/net/netfilter/nft_log.c
index bde05f28..e18af9db 100644
--- a/net/netfilter/nft_log.c
+++ b/net/netfilter/nft_log.c
@@ -78,7 +78,7 @@ static int nft_log_init(const struct nft_ctx *ctx,
 			li->u.log.level =
 				ntohl(nla_get_be32(tb[NFTA_LOG_LEVEL]));
 		} else {
-			li->u.log.level = 4;
+			li->u.log.level = LOGLEVEL_WARNING;
 		}
 		if (tb[NFTA_LOG_FLAGS] != NULL) {
 			li->u.log.logflags =

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

* Re: linux-next: manual merge of the net-next tree with the net tree
  2015-03-23 12:47 ` Pablo Neira Ayuso
  2015-03-23 12:55   ` Joe Perches
@ 2015-03-24  2:29   ` David Miller
  1 sibling, 0 replies; 12+ messages in thread
From: David Miller @ 2015-03-24  2:29 UTC (permalink / raw)
  To: pablo; +Cc: sfr, netdev, linux-next, linux-kernel, kaber

From: Pablo Neira Ayuso <pablo@netfilter.org>
Date: Mon, 23 Mar 2015 13:47:23 +0100

> On Mon, Mar 23, 2015 at 02:08:41PM +1100, Stephen Rothwell wrote:
>> Hi all,
>> 
>> Today's linux-next merge of the net-next tree got a conflict in
>> net/netfilter/nf_tables_core.c between commit 4017a7ee693d ("netfilter:
>> restore rule tracing via nfnetlink_log") from the net tree and commit
>> 01ef16c2dd2e ("netfilter: nf_tables: minor tracing cleanups") from the
>> net-next tree.
>> 
>> I fixed it up (see below) and can carry the fix as necessary (no action
>> is required).
> 
> This looks good, thanks for adressing this conflict Stephen.

Pablo, I just pushed out a merge of net into net-next, please double
check that I handled this conflict correctly.

Thanks!

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

* Re: [PATCH V2 -next] netfilter: Use LOGLEVEL_<FOO> defines
  2015-03-23 18:50             ` [PATCH V2 " Joe Perches
@ 2015-03-25 11:19               ` Pablo Neira Ayuso
  0 siblings, 0 replies; 12+ messages in thread
From: Pablo Neira Ayuso @ 2015-03-25 11:19 UTC (permalink / raw)
  To: Joe Perches
  Cc: Stephen Rothwell, David Miller, netdev, linux-next, linux-kernel,
	Patrick McHardy, netfilter-devel

On Mon, Mar 23, 2015 at 11:50:10AM -0700, Joe Perches wrote:
> Use the #defines where appropriate.
> 
> Miscellanea:
> 
> Add explicit #include <linux/kernel.h> where it was not
> previously used so that these #defines are a bit more
> explicitly defined instead of indirectly included via:
> 	module.h->moduleparam.h->kernel.h

Applied, thanks.

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

end of thread, other threads:[~2015-03-25 11:19 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-03-23  3:08 linux-next: manual merge of the net-next tree with the net tree Stephen Rothwell
2015-03-23 12:47 ` Pablo Neira Ayuso
2015-03-23 12:55   ` Joe Perches
2015-03-23 13:06     ` Pablo Neira Ayuso
2015-03-23 13:23       ` [PATCH -next] netfilter: Use LOGLEVEL_<FOO> defines Joe Perches
2015-03-23 13:38         ` Stephen Rothwell
2015-03-23 13:52           ` Pablo Neira Ayuso
2015-03-23 15:43             ` Joe Perches
2015-03-23 18:50             ` [PATCH V2 " Joe Perches
2015-03-25 11:19               ` Pablo Neira Ayuso
2015-03-23 15:36           ` [PATCH " Joe Perches
2015-03-24  2:29   ` linux-next: manual merge of the net-next tree with the net tree David Miller

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).