diff mbox

[net-next] netfilter: conntrack: Fix UP builds

Message ID 1395088673.9668.65.camel@edumazet-glaptop2.roam.corp.google.com
State Changes Requested, archived
Delegated to: David Miller
Headers show

Commit Message

Eric Dumazet March 17, 2014, 8:37 p.m. UTC
From: Eric Dumazet <edumazet@google.com>

ARRAY_SIZE(nf_conntrack_locks) is undefined if spinlock_t is an
empty structure. Replace it by CONNTRACK_LOCKS

Fixes: 93bb0ceb75be ("netfilter: conntrack: remove central spinlock nf_conntrack_lock")
Reported-by: kbuild test robot <fengguang.wu@intel.com>
Signed-off-by: Eric Dumazet <edumazet@google.com>
Cc: Jesper Dangaard Brouer <brouer@redhat.com>
Cc: Pablo Neira Ayuso <pablo@netfilter.org>
---
David, you might merge this asap instead of going through Pablo queue ?

 net/netfilter/nf_conntrack_core.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)



--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Comments

David Miller March 17, 2014, 9:15 p.m. UTC | #1
From: Eric Dumazet <eric.dumazet@gmail.com>
Date: Mon, 17 Mar 2014 13:37:53 -0700

> From: Eric Dumazet <edumazet@google.com>
> 
> ARRAY_SIZE(nf_conntrack_locks) is undefined if spinlock_t is an
> empty structure. Replace it by CONNTRACK_LOCKS
> 
> Fixes: 93bb0ceb75be ("netfilter: conntrack: remove central spinlock nf_conntrack_lock")
> Reported-by: kbuild test robot <fengguang.wu@intel.com>
> Signed-off-by: Eric Dumazet <edumazet@google.com>
> Cc: Jesper Dangaard Brouer <brouer@redhat.com>
> Cc: Pablo Neira Ayuso <pablo@netfilter.org>
> ---
> David, you might merge this asap instead of going through Pablo queue ?

Sure, applied, thanks Eric.
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Jesper Dangaard Brouer March 18, 2014, 7:15 a.m. UTC | #2
On Mon, 17 Mar 2014 17:15:07 -0400 (EDT)
David Miller <davem@davemloft.net> wrote:

> From: Eric Dumazet <eric.dumazet@gmail.com>
> Date: Mon, 17 Mar 2014 13:37:53 -0700
> 
> > From: Eric Dumazet <edumazet@google.com>
> > 
> > ARRAY_SIZE(nf_conntrack_locks) is undefined if spinlock_t is an
> > empty structure. Replace it by CONNTRACK_LOCKS
> > 
> > Fixes: 93bb0ceb75be ("netfilter: conntrack: remove central spinlock nf_conntrack_lock")
> > Reported-by: kbuild test robot <fengguang.wu@intel.com>
> > Signed-off-by: Eric Dumazet <edumazet@google.com>
> > Cc: Jesper Dangaard Brouer <brouer@redhat.com>
> > Cc: Pablo Neira Ayuso <pablo@netfilter.org>
> > ---
> > David, you might merge this asap instead of going through Pablo queue ?
> 
> Sure, applied, thanks Eric.

Thanks for fixing this Eric :-)
diff mbox

Patch

diff --git a/net/netfilter/nf_conntrack_core.c b/net/netfilter/nf_conntrack_core.c
index 5d1e7d126ebd..6dba48efe01e 100644
--- a/net/netfilter/nf_conntrack_core.c
+++ b/net/netfilter/nf_conntrack_core.c
@@ -1674,7 +1674,7 @@  int nf_conntrack_init_start(void)
 	int max_factor = 8;
 	int i, ret, cpu;
 
-	for (i = 0; i < ARRAY_SIZE(nf_conntrack_locks); i++)
+	for (i = 0; i < CONNTRACK_LOCKS; i++)
 		spin_lock_init(&nf_conntrack_locks[i]);
 
 	/* Idea from tcp.c: use 1/16384 of memory.  On i386: 32MB