ipv6: remove dependency of nf_defrag_ipv6 on ipv6 module
Subsystems (6)
Florian Westphal
maintainerPATCH v2 1/2 ipv6: remove dependency of nf_defrag_ipv6 on ipv6 module
IPV6=m
DEFRAG_IPV6=m
CONNTRACK=y yields:
net/netfilter/nf_conntrack_proto.o: In function `nf_ct_netns_do_get':net/netfilter/nf_conntrack_proto.c:802: undefined reference to nf_defrag_ipv6_enable' net/netfilter/nf_conntrack_proto.o:(.rodata+0x640): undefined reference to nf_conntrack_l4proto_icmpv6'
Setting DEFRAG_IPV6=y causes undefined references to ip6_rhash_params ip6_frag_init and ip6_expire_frag_queue so it would be needed to force IPV6=y too.
This patch gets rid of the 'followup linker error' by removing the dependency of ipv6.ko symbols from netfilter ipv6 defrag.
Shared code is placed into a header, then used from both.
---
v2: fix build failure with 6lowpan (missing include)
include/net/ipv6.h | 28 -------- include/net/ipv6_frag.h | 102 ++++++++++++++++++++++++++++++ net/ieee802154/6lowpan/reassembly.c | 2 +- net/ipv6/netfilter/nf_conntrack_reasm.c | 17 +++-- net/ipv6/netfilter/nf_defrag_ipv6_hooks.c | 3 +- net/ipv6/reassembly.c | 92 ++------------------------- net/openvswitch/conntrack.c | 1 + 7 files changed, 124 insertions(+), 121 deletions(-) create mode 100644 include/net/ipv6_frag.h
include/net/ipv6.h +0 -28
@@ -561,34 +561,6 @@ static inline bool ipv6_prefix_equal(const struct in6_addr *addr1, }#endif -struct inet_frag_queue ; - -enum ip6_defrag_users { -IP6_DEFRAG_LOCAL_DELIVER , -IP6_DEFRAG_CONNTRACK_IN , - __IP6_DEFRAG_CONNTRACK_IN =IP6_DEFRAG_CONNTRACK_IN +USHRT_MAX , -IP6_DEFRAG_CONNTRACK_OUT , - __IP6_DEFRAG_CONNTRACK_OUT =IP6_DEFRAG_CONNTRACK_OUT +USHRT_MAX , -IP6_DEFRAG_CONNTRACK_BRIDGE_IN , - __IP6_DEFRAG_CONNTRACK_BRIDGE_IN =IP6_DEFRAG_CONNTRACK_BRIDGE_IN +USHRT_MAX , -}; - -void ip6_frag_init (struct inet_frag_queue *q,const void *a); -extern const struct rhashtable_params ip6_rhash_params; - -/* -* Equivalent of ipv4 struct ip -*/ -struct frag_queue { -struct inet_frag_queue q; - -int iif; -__u16 nhoffset; -u8 ecn; -}; - -void ip6_expire_frag_queue (struct net *net,struct frag_queue *fq); -static inline bool ipv6_addr_any (const struct in6_addr *a) {#if defined(CONFIG_HAVE_EFFICIENT_UNALIGNED_ACCESS ) &&BITS_PER_LONG ==64
include/net/ipv6_frag.h new file +102 -0
102 lines not on this page · raw message
net/ieee802154/6lowpan/reassembly.c +1 -1
@@ -25,7 +25,7 @@#include <net/ieee802154_netdev.h> #include <net/6lowpan.h> -#include <net/ipv6.h> +#include <net/ipv6_frag.h> #include <net/inet_frag.h> #include "6lowpan_i.h"
net/ipv6/netfilter/nf_conntrack_reasm.c +12 -5
@@ -33,9 +33,8 @@#include <net/sock.h> #include <net/snmp.h> -#include <net/inet_frag.h> +#include <net/ipv6_frag.h> -#include <net/ipv6.h> #include <net/protocol.h> #include <net/transp_v6.h> #include <net/rawv6.h>
@@ -151,7 +150,7 @@ static void nf_ct_frag6_expire(struct timer_list *t) fq = container_of(frag, struct frag_queue, q); net = container_of(fq->q.net, struct net, nf_frag.frags); -ip6_expire_frag_queue (net, fq); +ip6frag_expire_frag_queue (net, fq); }/* Creation primitives. */
@@ -622,16 +621,24 @@ static struct pernet_operations nf_ct_net_ops = { .exit = nf_ct_net_exit, }; +static const struct rhashtable_params nfct_rhash_params = { + .head_offset = offsetof(struct inet_frag_queue , node), + .hashfn = ip6frag_key_hashfn, + .obj_hashfn = ip6frag_obj_hashfn, + .obj_cmpfn = ip6frag_obj_cmpfn, + .automatic_shrinking = true, +}; +int nf_ct_frag6_init (void ) {int ret =0 ; - nf_frags.constructor = ip6_frag_init; + nf_frags.constructor = ip6frag_init; nf_frags.destructor =NULL ; nf_frags.qsize =sizeof (struct frag_queue ); nf_frags.frag_expire = nf_ct_frag6_expire; nf_frags.frags_cache_name = nf_frags_cache_name; - nf_frags.rhash_params = ip6_rhash_params; + nf_frags.rhash_params = nfct_rhash_params; ret =inet_frags_init (&nf_frags);if (ret) goto out;
net/ipv6/netfilter/nf_defrag_ipv6_hooks.c +1 -2
@@ -14,8 +14,7 @@#include <linux/skbuff.h> #include <linux/icmp.h> #include <linux/sysctl.h> -#include <net/ipv6.h> -#include <net/inet_frag.h> +#include <net/ipv6_frag.h> #include <linux/netfilter_ipv6.h> #include <linux/netfilter_bridge.h>
net/ipv6/reassembly.c +7 -85
124 lines not on this page · raw message
net/openvswitch/conntrack.c +1 -0
@@ -26,6 +26,7 @@#include <net/netfilter/nf_conntrack_seqadj.h> #include <net/netfilter/nf_conntrack_zones.h> #include <net/netfilter/ipv6/nf_defrag_ipv6.h> +#include <net/ipv6_frag.h> #ifdef CONFIG_NF_NAT_NEEDED #include <linux/netfilter/nf_nat.h>
Signature · 1 line
2.16.4
Florian Westphal
maintainerPATCH v2 2/2 netfilter: fix IPV6=m CONNTRACK=y link failure
IPV6=m
DEFRAG_IPV6=m
CONNTRACK=y yields:
net/netfilter/nf_conntrack_proto.o: In function `nf_ct_netns_do_get':net/netfilter/nf_conntrack_proto.c:802: undefined reference to nf_defrag_ipv6_enable' net/netfilter/nf_conntrack_proto.o:(.rodata+0x640): undefined reference to nf_conntrack_l4proto_icmpv6'
After previous patch, DEFRAG_IPV6 and IPV6 are no longer retain any dependencies, so we can tell Kconfig DEFRAG_IPV6 needs to be built-in as well, this resolves missing nf_defrag_ipv6_enable.
Second error can be fixed via makefile, just make sure conntrack_proto_ipv6 is part of conntrack module.
based on earlier patch from Arnd Bergmann.
---
no changes.
net/ipv6/netfilter/Kconfig | 7 ++----- net/netfilter/Kconfig | 2 +- net/netfilter/Makefile | 2 +- 3 files changed, 4 insertions(+), 7 deletions(-)
net/ipv6/netfilter/Kconfig +2 -5
@@ -5,10 +5,6 @@ menu "IPv6: Netfilter Configuration" depends on INET && IPV6 && NETFILTER -config NF_DEFRAG_IPV6 - tristate - default n - config NF_SOCKET_IPV6 tristate "IPv6 socket lookup support" help
@@ -349,6 +345,7 @@ config IP6_NF_TARGET_NPT endif # IP6_NF_NAT endif # IP6_NF_IPTABLES - endmenu +config NF_DEFRAG_IPV6 + tristate
net/netfilter/Kconfig +1 -1
@@ -50,7 +50,7 @@ config NF_CONNTRACK tristate "Netfilter connection tracking support" default m if NETFILTER_ADVANCED=n select NF_DEFRAG_IPV4 - select NF_DEFRAG_IPV6 if IPV6 + select NF_DEFRAG_IPV6 if IPV6 != n help Connection tracking keeps a record of what packets have passed through your machine, in order to figure out how they are related
net/netfilter/Makefile +1 -1
@@ -6,7 +6,7 @@ nf_conntrack-y := nf_conntrack_core.o nf_conntrack_standalone.o nf_conntrack_exp nf_conntrack_proto_icmp.o \ nf_conntrack_extend.o nf_conntrack_acct.o nf_conntrack_seqadj.o -nf_conntrack-$(CONFIG_IPV6) += nf_conntrack_proto_icmpv6.o +nf_conntrack-$(subst m,y,$(CONFIG_IPV6)) += nf_conntrack_proto_icmpv6.o nf_conntrack-$(CONFIG_NF_CONNTRACK_TIMEOUT) += nf_conntrack_timeout.o nf_conntrack-$(CONFIG_NF_CONNTRACK_TIMESTAMP) += nf_conntrack_timestamp.o nf_conntrack-$(CONFIG_NF_CONNTRACK_EVENTS) += nf_conntrack_ecache.o
Signature · 1 line
2.16.4
Pablo Neira Ayuso
maintainerRe: [PATCH v2 nf-next 2/2] netfilter: fix IPV6=m CONNTRACK=y link failure
Quoted 12 lines · Florian Westphal
IPV6=m
DEFRAG_IPV6=m
CONNTRACK=y yields:
net/netfilter/nf_conntrack_proto.o: In function `nf_ct_netns_do_get':net/netfilter/nf_conntrack_proto.c:802: undefined reference tonf_defrag_ipv6_enable' net/netfilter/nf_conntrack_proto.o:(.rodata+0x640): undefined reference tonf_conntrack_l4proto_icmpv6'After previous patch,
DEFRAG_IPV6and IPV6 are no longer retain any dependencies, so we can tellKconfigDEFRAG_IPV6needs to be built-in as well, this resolves missingnf_defrag_ipv6_enable.
Quoted 6 lines
Second error can be fixed via makefile, just make sure
conntrack_proto_ipv6is part of conntrack module.based on earlier patch from Arnd Bergmann.
Fixes 66c524acfb5186 ("netfilter: conntrack: remove l3proto abstraction")
Squashed into this original patch.
kbuild test robot
build botI love your patch! Yet something to improve:
Hi Florian,
I love your patch! Yet something to improve:
[auto build test ERROR on nf-next/master]
url: https://github.com/0day-ci/linux/commits/Florian-Westphal/ipv6-remove-dependency-of-nf_defrag_ipv6-on-ipv6-module/20180714-051523 base: https://git.kernel.org/pub/scm/linux/kernel/git/pablo/nf-next.git master config: i386-randconfig-x015-201827 (attached as .config) compiler: gcc-7 (Debian 7.3.0-16) 7.3.0 reproduce: # save the attached .config to linux build tree make ARCH=i386
All error/warnings (new ones prefixed by >>):
In file included from include/net/netns/mib.h:5:0,
from include/net/net_namespace.h:16,
from include/linux/netdevice.h:42,
from include/net/sock.h:51,
from include/linux/tcp.h:23,
from net//openvswitch/conntrack.c:16:
include/net/ipv6_frag.h: In function 'ip6frag_expire_frag_queue':
include/net/ipv6.h:213:16: error: 'struct netns_mib' has no member named 'ipv6_statistics'; did you mean 'ip_statistics'?
_DEVINC(net, ipv6, __, idev, field)
^
include/net/snmp.h:161:15: note: in definition of macro '__SNMP_ADD_STATS64'
__typeof__(*mib) *ptr = raw_cpu_ptr(mib); \
^~~
>> include/net/snmp.h:174:40: note: in expansion of macro 'SNMP_ADD_STATS64'
#define __SNMP_INC_STATS64(mib, field) SNMP_ADD_STATS64(mib, field, 1)
^~~~~~~~~~~~~~~~
include/net/ipv6.h:171:2: note: in expansion of macro '__SNMP_INC_STATS64'
mod##SNMP_INC_STATS64((net)->mib.statname##_statistics, (field));\
^~~
include/net/ipv6.h:213:3: note: in expansion of macro '_DEVINC'
_DEVINC(net, ipv6, __, idev, field)
^~~~~~~
include/net/ipv6_frag.h:80:2: note: in expansion of macro '__IP6_INC_STATS'
__IP6_INC_STATS(net, __in6_dev_get(dev), IPSTATS_MIB_REASMFAILS);
^~~~~~~~~~~~~~~
In file included from include/asm-generic/percpu.h:7:0,
from arch/x86/include/asm/percpu.h:543,
from arch/x86/include/asm/preempt.h:6,
from include/linux/preempt.h:81,
from include/linux/spinlock.h:51,
from include/linux/seqlock.h:36,
from include/linux/time.h:6,
from include/linux/stat.h:19,
from include/linux/module.h:10,
from net//openvswitch/conntrack.c:14:
include/net/ipv6.h:213:16: error: 'struct netns_mib' has no member named 'ipv6_statistics'; did you mean 'ip_statistics'?
_DEVINC(net, ipv6, __, idev, field)
^
include/linux/percpu-defs.h:221:47: note: in definition of macro '__verify_pcpu_ptr'
const void __percpu *__vpp_verify = (typeof((ptr) + 0))NULL; \
^~~
>> include/linux/percpu-defs.h:265:47: note: in expansion of macro 'VERIFY_PERCPU_PTR'
#define per_cpu_ptr(ptr, cpu) ({ (void)(cpu); VERIFY_PERCPU_PTR(ptr); })
^~~~~~~~~~~~~~~~~
>> include/linux/percpu-defs.h:266:26: note: in expansion of macro 'per_cpu_ptr'
#define raw_cpu_ptr(ptr) per_cpu_ptr(ptr, 0)
^~~~~~~~~~~
>> include/net/snmp.h:161:27: note: in expansion of macro 'raw_cpu_ptr'
__typeof__(*mib) *ptr = raw_cpu_ptr(mib); \
^~~~~~~~~~~
>> include/net/snmp.h:170:3: note: in expansion of macro '__SNMP_ADD_STATS64'
__SNMP_ADD_STATS64(mib, field, addend); \
^~~~~~~~~~~~~~~~~~
>> include/net/snmp.h:174:40: note: in expansion of macro 'SNMP_ADD_STATS64'
#define __SNMP_INC_STATS64(mib, field) SNMP_ADD_STATS64(mib, field, 1)
^~~~~~~~~~~~~~~~
include/net/ipv6.h:171:2: note: in expansion of macro '__SNMP_INC_STATS64'
mod##SNMP_INC_STATS64((net)->mib.statname##_statistics, (field));\
^~~
include/net/ipv6.h:213:3: note: in expansion of macro '_DEVINC'
_DEVINC(net, ipv6, __, idev, field)
^~~~~~~
include/net/ipv6_frag.h:80:2: note: in expansion of macro '__IP6_INC_STATS'
__IP6_INC_STATS(net, __in6_dev_get(dev), IPSTATS_MIB_REASMFAILS);
^~~~~~~~~~~~~~~
include/net/ipv6.h:213:16: error: 'struct netns_mib' has no member named 'ipv6_statistics'; did you mean 'ip_statistics'?
_DEVINC(net, ipv6, __, idev, field)
^
include/linux/percpu-defs.h:262:12: note: in definition of macro 'VERIFY_PERCPU_PTR'
(typeof(*(__p)) __kernel __force *)(__p); \
^~~
>> include/linux/percpu-defs.h:266:26: note: in expansion of macro 'per_cpu_ptr'
#define raw_cpu_ptr(ptr) per_cpu_ptr(ptr, 0)
^~~~~~~~~~~
>> include/net/snmp.h:161:27: note: in expansion of macro 'raw_cpu_ptr'
__typeof__(*mib) *ptr = raw_cpu_ptr(mib); \
^~~~~~~~~~~
>> include/net/snmp.h:170:3: note: in expansion of macro '__SNMP_ADD_STATS64'
__SNMP_ADD_STATS64(mib, field, addend); \
^~~~~~~~~~~~~~~~~~
>> include/net/snmp.h:174:40: note: in expansion of macro 'SNMP_ADD_STATS64'
#define __SNMP_INC_STATS64(mib, field) SNMP_ADD_STATS64(mib, field, 1)
^~~~~~~~~~~~~~~~
include/net/ipv6.h:171:2: note: in expansion of macro '__SNMP_INC_STATS64'
mod##SNMP_INC_STATS64((net)->mib.statname##_statistics, (field));\
^~~
include/net/ipv6.h:213:3: note: in expansion of macro '_DEVINC'
_DEVINC(net, ipv6, __, idev, field)
^~~~~~~
include/net/ipv6_frag.h:80:2: note: in expansion of macro '__IP6_INC_STATS'
__IP6_INC_STATS(net, __in6_dev_get(dev), IPSTATS_MIB_REASMFAILS);
^~~~~~~~~~~~~~~
include/net/ipv6.h:213:16: error: 'struct netns_mib' has no member named 'ipv6_statistics'; did you mean 'ip_statistics'?
_DEVINC(net, ipv6, __, idev, field)
^
include/linux/percpu-defs.h:262:38: note: in definition of macro 'VERIFY_PERCPU_PTR'
(typeof(*(__p)) __kernel __force *)(__p); \
^~~
>> include/linux/percpu-defs.h:266:26: note: in expansion of macro 'per_cpu_ptr'
#define raw_cpu_ptr(ptr) per_cpu_ptr(ptr, 0)
^~~~~~~~~~~
>> include/net/snmp.h:161:27: note: in expansion of macro 'raw_cpu_ptr'
__typeof__(*mib) *ptr = raw_cpu_ptr(mib); \
^~~~~~~~~~~
>> include/net/snmp.h:170:3: note: in expansion of macro '__SNMP_ADD_STATS64'
__SNMP_ADD_STATS64(mib, field, addend); \
^~~~~~~~~~~~~~~~~~
>> include/net/snmp.h:174:40: note: in expansion of macro 'SNMP_ADD_STATS64'
#define __SNMP_INC_STATS64(mib, field) SNMP_ADD_STATS64(mib, field, 1)
^~~~~~~~~~~~~~~~
include/net/ipv6.h:171:2: note: in expansion of macro '__SNMP_INC_STATS64'
mod##SNMP_INC_STATS64((net)->mib.statname##_statistics, (field));\
^~~
include/net/ipv6.h:213:3: note: in expansion of macro '_DEVINC'
_DEVINC(net, ipv6, __, idev, field)
^~~~~~~
include/net/ipv6_frag.h:80:2: note: in expansion of macro '__IP6_INC_STATS'
__IP6_INC_STATS(net, __in6_dev_get(dev), IPSTATS_MIB_REASMFAILS);
^~~~~~~~~~~~~~~
In file included from include/net/netns/mib.h:5:0,
from include/net/net_namespace.h:16,
from include/linux/netdevice.h:42,
from include/net/sock.h:51,
from include/linux/tcp.h:23,
from net//openvswitch/conntrack.c:16:
>> include/net/snmp.h:162:30: error: request for member 'syncp' in something not a structure or union
u64_stats_update_begin(&ptr->syncp); \
^
>> include/net/snmp.h:170:3: note: in expansion of macro '__SNMP_ADD_STATS64'
__SNMP_ADD_STATS64(mib, field, addend); \
^~~~~~~~~~~~~~~~~~
>> include/net/snmp.h:174:40: note: in expansion of macro 'SNMP_ADD_STATS64'
#define __SNMP_INC_STATS64(mib, field) SNMP_ADD_STATS64(mib, field, 1)
^~~~~~~~~~~~~~~~
include/net/ipv6.h:171:2: note: in expansion of macro '__SNMP_INC_STATS64'
mod##SNMP_INC_STATS64((net)->mib.statname##_statistics, (field));\
^~~
include/net/ipv6.h:213:3: note: in expansion of macro '_DEVINC'
_DEVINC(net, ipv6, __, idev, field)
^~~~~~~
include/net/ipv6_frag.h:80:2: note: in expansion of macro '__IP6_INC_STATS'
__IP6_INC_STATS(net, __in6_dev_get(dev), IPSTATS_MIB_REASMFAILS);
^~~~~~~~~~~~~~~
>> include/net/snmp.h:163:6: error: request for member 'mibs' in something not a structure or union
ptr->mibs[field] += addend; \
^
>> include/net/snmp.h:170:3: note: in expansion of macro '__SNMP_ADD_STATS64'
__SNMP_ADD_STATS64(mib, field, addend); \
^~~~~~~~~~~~~~~~~~
>> include/net/snmp.h:174:40: note: in expansion of macro 'SNMP_ADD_STATS64'
#define __SNMP_INC_STATS64(mib, field) SNMP_ADD_STATS64(mib, field, 1)
^~~~~~~~~~~~~~~~
include/net/ipv6.h:171:2: note: in expansion of macro '__SNMP_INC_STATS64'
mod##SNMP_INC_STATS64((net)->mib.statname##_statistics, (field));\
^~~
include/net/ipv6.h:213:3: note: in expansion of macro '_DEVINC'
_DEVINC(net, ipv6, __, idev, field)
^~~~~~~
include/net/ipv6_frag.h:80:2: note: in expansion of macro '__IP6_INC_STATS'
__IP6_INC_STATS(net, __in6_dev_get(dev), IPSTATS_MIB_REASMFAILS);
^~~~~~~~~~~~~~~
include/net/snmp.h:164:28: error: request for member 'syncp' in something not a structure or union
u64_stats_update_end(&ptr->syncp); \
^vim +/syncp +162 include/net/snmp.h
4ce3c183f Eric Dumazet 2010-06-30 158
13415e46c Eric Dumazet 2016-04-27 159 #define __SNMP_ADD_STATS64(mib, field, addend) \
4ce3c183f Eric Dumazet 2010-06-30 160 do { \
903ceff7c Christoph Lameter 2014-08-17 @161 __typeof__(*mib) *ptr = raw_cpu_ptr(mib); \
4ce3c183f Eric Dumazet 2010-06-30 @162 u64_stats_update_begin(&ptr->syncp); \
4ce3c183f Eric Dumazet 2010-06-30 @163 ptr->mibs[field] += addend; \
4ce3c183f Eric Dumazet 2010-06-30 164 u64_stats_update_end(&ptr->syncp); \
4ce3c183f Eric Dumazet 2010-06-30 165 } while (0)
8f0ea0fe3 Eric Dumazet 2011-06-10 166
6aef70a85 Eric Dumazet 2016-04-27 167 #define SNMP_ADD_STATS64(mib, field, addend) \
4ce3c183f Eric Dumazet 2010-06-30 168 do { \
ba7863f4d Eric Dumazet 2016-04-28 169 local_bh_disable(); \
13415e46c Eric Dumazet 2016-04-27 @170 __SNMP_ADD_STATS64(mib, field, addend); \
ba7863f4d Eric Dumazet 2016-04-28 171 local_bh_enable(); \
4ce3c183f Eric Dumazet 2010-06-30 172 } while (0)
8f0ea0fe3 Eric Dumazet 2011-06-10 173
13415e46c Eric Dumazet 2016-04-27 @174 #define __SNMP_INC_STATS64(mib, field) SNMP_ADD_STATS64(mib, field, 1)
4ce3c183f Eric Dumazet 2010-06-30 175 #define SNMP_INC_STATS64(mib, field) SNMP_ADD_STATS64(mib, field, 1)
13415e46c Eric Dumazet 2016-04-27 176 #define __SNMP_UPD_PO_STATS64(mib, basefield, addend) \
4ce3c183f Eric Dumazet 2010-06-30 177 do { \
698365fa1 WANG Cong 2014-05-05 178 __typeof__(*mib) *ptr; \
903ceff7c Christoph Lameter 2014-08-17 179 ptr = raw_cpu_ptr((mib)); \
4ce3c183f Eric Dumazet 2010-06-30 180 u64_stats_update_begin(&ptr->syncp); \
4ce3c183f Eric Dumazet 2010-06-30 181 ptr->mibs[basefield##PKTS]++; \
4ce3c183f Eric Dumazet 2010-06-30 182 ptr->mibs[basefield##OCTETS] += addend; \
4ce3c183f Eric Dumazet 2010-06-30 183 u64_stats_update_end(&ptr->syncp); \
4ce3c183f Eric Dumazet 2010-06-30 184 } while (0)
8f0ea0fe3 Eric Dumazet 2011-06-10 185 #define SNMP_UPD_PO_STATS64(mib, basefield, addend) \
8f0ea0fe3 Eric Dumazet 2011-06-10 186 do { \
ba7863f4d Eric Dumazet 2016-04-28 187 local_bh_disable(); \
13415e46c Eric Dumazet 2016-04-27 188 __SNMP_UPD_PO_STATS64(mib, basefield, addend); \
ba7863f4d Eric Dumazet 2016-04-28 189 local_bh_enable(); \
8f0ea0fe3 Eric Dumazet 2011-06-10 190 } while (0)
4ce3c183f Eric Dumazet 2010-06-30 191 #else
13415e46c Eric Dumazet 2016-04-27 192 #define __SNMP_INC_STATS64(mib, field) __SNMP_INC_STATS(mib, field)
4ce3c183f Eric Dumazet 2010-06-30 193 #define SNMP_INC_STATS64(mib, field) SNMP_INC_STATS(mib, field)
4ce3c183f Eric Dumazet 2010-06-30 194 #define SNMP_DEC_STATS64(mib, field) SNMP_DEC_STATS(mib, field)
13415e46c Eric Dumazet 2016-04-27 195 #define __SNMP_ADD_STATS64(mib, field, addend) __SNMP_ADD_STATS(mib, field, addend)
4ce3c183f Eric Dumazet 2010-06-30 196 #define SNMP_ADD_STATS64(mib, field, addend) SNMP_ADD_STATS(mib, field, addend)
4ce3c183f Eric Dumazet 2010-06-30 197 #define SNMP_UPD_PO_STATS64(mib, basefield, addend) SNMP_UPD_PO_STATS(mib, basefield, addend)
13415e46c Eric Dumazet 2016-04-27 198 #define __SNMP_UPD_PO_STATS64(mib, basefield, addend) __SNMP_UPD_PO_STATS(mib, basefield, addend)
4ce3c183f Eric Dumazet 2010-06-30 199 #endif
4ce3c183f Eric Dumazet 2010-06-30 200 :::::: The code at line 162 was first introduced by commit
:::::: 4ce3c183fcade7f4b30a33dae90cd774c3d9e094 snmp: 64bit ipstats_mib for all arches
:::::: TO: Eric Dumazet <[email protected]>
:::::: CC: David S. Miller <[email protected]>
---
0-DAY kernel test infrastructure Open Source Technology Center
https://lists.01.org/pipermail/kbuild-all Intel Corporation
kbuild test robot
build botI love your patch! Yet something to improve:
Hi Florian,
I love your patch! Yet something to improve:
[auto build test ERROR on nf-next/master]
url: https://github.com/0day-ci/linux/commits/Florian-Westphal/ipv6-remove-dependency-of-nf_defrag_ipv6-on-ipv6-module/20180714-051523 base: https://git.kernel.org/pub/scm/linux/kernel/git/pablo/nf-next.git master config: x86_64-randconfig-u0-07140609 (attached as .config) compiler: gcc-5 (Debian 5.5.0-3) 5.4.1 20171010 reproduce: # save the attached .config to linux build tree make ARCH=x86_64
All errors (new ones prefixed by >>):
In file included from include/asm-generic/percpu.h:7:0,
from arch/x86/include/asm/percpu.h:543,
from arch/x86/include/asm/preempt.h:6,
from include/linux/preempt.h:81,
from include/linux/spinlock.h:51,
from include/linux/seqlock.h:36,
from include/linux/time.h:6,
from include/linux/stat.h:19,
from include/linux/module.h:10,
from net//openvswitch/conntrack.c:14:
include/net/ipv6_frag.h: In function 'ip6frag_expire_frag_queue':
>> include/net/ipv6.h:171:34: error: 'struct netns_mib' has no member named 'ipv6_statistics'
mod##SNMP_INC_STATS64((net)->mib.statname##_statistics, (field));\
^
include/linux/percpu-defs.h:221:47: note: in definition of macro '__verify_pcpu_ptr'
const void __percpu *__vpp_verify = (typeof((ptr) + 0))NULL; \
^
include/linux/percpu-defs.h:424:32: note: in expansion of macro '__pcpu_size_call'
#define raw_cpu_add(pcp, val) __pcpu_size_call(raw_cpu_add_, pcp, val)
^
include/linux/percpu-defs.h:460:2: note: in expansion of macro 'raw_cpu_add'
raw_cpu_add(pcp, val); \
^
include/linux/percpu-defs.h:499:30: note: in expansion of macro '__this_cpu_add'
#define __this_cpu_inc(pcp) __this_cpu_add(pcp, 1)
^
include/net/snmp.h:127:4: note: in expansion of macro '__this_cpu_inc'
__this_cpu_inc(mib->mibs[field])
^
include/net/snmp.h:192:41: note: in expansion of macro '__SNMP_INC_STATS'
#define __SNMP_INC_STATS64(mib, field) __SNMP_INC_STATS(mib, field)
^
include/net/ipv6.h:171:2: note: in expansion of macro '__SNMP_INC_STATS64'
mod##SNMP_INC_STATS64((net)->mib.statname##_statistics, (field));\
^
include/net/ipv6.h:213:3: note: in expansion of macro '_DEVINC'
_DEVINC(net, ipv6, __, idev, field)
^
include/net/ipv6_frag.h:80:2: note: in expansion of macro '__IP6_INC_STATS'
__IP6_INC_STATS(net, __in6_dev_get(dev), IPSTATS_MIB_REASMFAILS);
^
>> include/net/ipv6.h:171:34: error: 'struct netns_mib' has no member named 'ipv6_statistics'
mod##SNMP_INC_STATS64((net)->mib.statname##_statistics, (field));\
^
include/linux/percpu-defs.h:378:16: note: in definition of macro '__pcpu_size_call'
switch(sizeof(variable)) { \
^
include/linux/percpu-defs.h:460:2: note: in expansion of macro 'raw_cpu_add'
raw_cpu_add(pcp, val); \
^
include/linux/percpu-defs.h:499:30: note: in expansion of macro '__this_cpu_add'
#define __this_cpu_inc(pcp) __this_cpu_add(pcp, 1)
^
include/net/snmp.h:127:4: note: in expansion of macro '__this_cpu_inc'
__this_cpu_inc(mib->mibs[field])
^
include/net/snmp.h:192:41: note: in expansion of macro '__SNMP_INC_STATS'
#define __SNMP_INC_STATS64(mib, field) __SNMP_INC_STATS(mib, field)
^
include/net/ipv6.h:171:2: note: in expansion of macro '__SNMP_INC_STATS64'
mod##SNMP_INC_STATS64((net)->mib.statname##_statistics, (field));\
^
include/net/ipv6.h:213:3: note: in expansion of macro '_DEVINC'
_DEVINC(net, ipv6, __, idev, field)
^
include/net/ipv6_frag.h:80:2: note: in expansion of macro '__IP6_INC_STATS'
__IP6_INC_STATS(net, __in6_dev_get(dev), IPSTATS_MIB_REASMFAILS);
^
In file included from arch/x86/include/asm/preempt.h:6:0,
from include/linux/preempt.h:81,
from include/linux/spinlock.h:51,
from include/linux/seqlock.h:36,
from include/linux/time.h:6,
from include/linux/stat.h:19,
from include/linux/module.h:10,
from net//openvswitch/conntrack.c:14:
>> include/net/ipv6.h:171:34: error: 'struct netns_mib' has no member named 'ipv6_statistics'
mod##SNMP_INC_STATS64((net)->mib.statname##_statistics, (field));\
^
arch/x86/include/asm/percpu.h:129:17: note: in definition of macro 'percpu_add_op'
typedef typeof(var) pao_T__; \
^
include/linux/percpu-defs.h:379:11: note: in expansion of macro 'raw_cpu_add_1'
case 1: stem##1(variable, __VA_ARGS__);break; \
^
include/linux/percpu-defs.h:424:32: note: in expansion of macro '__pcpu_size_call'
#define raw_cpu_add(pcp, val) __pcpu_size_call(raw_cpu_add_, pcp, val)
^
include/linux/percpu-defs.h:460:2: note: in expansion of macro 'raw_cpu_add'
raw_cpu_add(pcp, val); \
^
include/linux/percpu-defs.h:499:30: note: in expansion of macro '__this_cpu_add'
#define __this_cpu_inc(pcp) __this_cpu_add(pcp, 1)
^
include/net/snmp.h:127:4: note: in expansion of macro '__this_cpu_inc'
__this_cpu_inc(mib->mibs[field])
^
include/net/snmp.h:192:41: note: in expansion of macro '__SNMP_INC_STATS'
#define __SNMP_INC_STATS64(mib, field) __SNMP_INC_STATS(mib, field)
^
include/net/ipv6.h:171:2: note: in expansion of macro '__SNMP_INC_STATS64'
mod##SNMP_INC_STATS64((net)->mib.statname##_statistics, (field));\
^
include/net/ipv6.h:213:3: note: in expansion of macro '_DEVINC'
_DEVINC(net, ipv6, __, idev, field)
^
include/net/ipv6_frag.h:80:2: note: in expansion of macro '__IP6_INC_STATS'
__IP6_INC_STATS(net, __in6_dev_get(dev), IPSTATS_MIB_REASMFAILS);
^
>> include/net/ipv6.h:171:34: error: 'struct netns_mib' has no member named 'ipv6_statistics'
mod##SNMP_INC_STATS64((net)->mib.statname##_statistics, (field));\
^
arch/x86/include/asm/percpu.h:138:17: note: in definition of macro 'percpu_add_op'
switch (sizeof(var)) { \
^
include/linux/percpu-defs.h:379:11: note: in expansion of macro 'raw_cpu_add_1'
case 1: stem##1(variable, __VA_ARGS__);break; \
^
include/linux/percpu-defs.h:424:32: note: in expansion of macro '__pcpu_size_call'
#define raw_cpu_add(pcp, val) __pcpu_size_call(raw_cpu_add_, pcp, val)
^
include/linux/percpu-defs.h:460:2: note: in expansion of macro 'raw_cpu_add'
raw_cpu_add(pcp, val); \
^
include/linux/percpu-defs.h:499:30: note: in expansion of macro '__this_cpu_add'
#define __this_cpu_inc(pcp) __this_cpu_add(pcp, 1)
^
include/net/snmp.h:127:4: note: in expansion of macro '__this_cpu_inc'
__this_cpu_inc(mib->mibs[field])
^
include/net/snmp.h:192:41: note: in expansion of macro '__SNMP_INC_STATS'
#define __SNMP_INC_STATS64(mib, field) __SNMP_INC_STATS(mib, field)
^
include/net/ipv6.h:171:2: note: in expansion of macro '__SNMP_INC_STATS64'
mod##SNMP_INC_STATS64((net)->mib.statname##_statistics, (field));\
^
include/net/ipv6.h:213:3: note: in expansion of macro '_DEVINC'
_DEVINC(net, ipv6, __, idev, field)
^
include/net/ipv6_frag.h:80:2: note: in expansion of macro '__IP6_INC_STATS'
__IP6_INC_STATS(net, __in6_dev_get(dev), IPSTATS_MIB_REASMFAILS);
^
>> include/net/ipv6.h:171:34: error: 'struct netns_mib' has no member named 'ipv6_statistics'
mod##SNMP_INC_STATS64((net)->mib.statname##_statistics, (field));\
^
arch/x86/include/asm/percpu.h:141:39: note: in definition of macro 'percpu_add_op'
asm("incb "__percpu_arg(0) : "+m" (var)); \
^
include/linux/percpu-defs.h:379:11: note: in expansion of macro 'raw_cpu_add_1'
case 1: stem##1(variable, __VA_ARGS__);break; \
^
include/linux/percpu-defs.h:424:32: note: in expansion of macro '__pcpu_size_call'
#define raw_cpu_add(pcp, val) __pcpu_size_call(raw_cpu_add_, pcp, val)
^
include/linux/percpu-defs.h:460:2: note: in expansion of macro 'raw_cpu_add'
raw_cpu_add(pcp, val); \
^
include/linux/percpu-defs.h:499:30: note: in expansion of macro '__this_cpu_add'
#define __this_cpu_inc(pcp) __this_cpu_add(pcp, 1)
^
include/net/snmp.h:127:4: note: in expansion of macro '__this_cpu_inc'
__this_cpu_inc(mib->mibs[field])
^
include/net/snmp.h:192:41: note: in expansion of macro '__SNMP_INC_STATS'
#define __SNMP_INC_STATS64(mib, field) __SNMP_INC_STATS(mib, field)
^
include/net/ipv6.h:171:2: note: in expansion of macro '__SNMP_INC_STATS64'
mod##SNMP_INC_STATS64((net)->mib.statname##_statistics, (field));\
^
include/net/ipv6.h:213:3: note: in expansion of macro '_DEVINC'
_DEVINC(net, ipv6, __, idev, field)
^
include/net/ipv6_frag.h:80:2: note: in expansion of macro '__IP6_INC_STATS'
__IP6_INC_STATS(net, __in6_dev_get(dev), IPSTATS_MIB_REASMFAILS);
^
>> include/net/ipv6.h:171:34: error: 'struct netns_mib' has no member named 'ipv6_statistics'
mod##SNMP_INC_STATS64((net)->mib.statname##_statistics, (field));\
^
arch/x86/include/asm/percpu.h:143:39: note: in definition of macro 'percpu_add_op'
asm("decb "__percpu_arg(0) : "+m" (var)); \
^
include/linux/percpu-defs.h:379:11: note: in expansion of macro 'raw_cpu_add_1'
case 1: stem##1(variable, __VA_ARGS__);break; \
^
include/linux/percpu-defs.h:424:32: note: in expansion of macro '__pcpu_size_call'
#define raw_cpu_add(pcp, val) __pcpu_size_call(raw_cpu_add_, pcp, val)
^
include/linux/percpu-defs.h:460:2: note: in expansion of macro 'raw_cpu_add'
raw_cpu_add(pcp, val); \
^
include/linux/percpu-defs.h:499:30: note: in expansion of macro '__this_cpu_add'
#define __this_cpu_inc(pcp) __this_cpu_add(pcp, 1)
^
include/net/snmp.h:127:4: note: in expansion of macro '__this_cpu_inc'
__this_cpu_inc(mib->mibs[field])
^
include/net/snmp.h:192:41: note: in expansion of macro '__SNMP_INC_STATS'
#define __SNMP_INC_STATS64(mib, field) __SNMP_INC_STATS(mib, field)
^
include/net/ipv6.h:171:2: note: in expansion of macro '__SNMP_INC_STATS64'
mod##SNMP_INC_STATS64((net)->mib.statname##_statistics, (field));\
^
include/net/ipv6.h:213:3: note: in expansion of macro '_DEVINC'
_DEVINC(net, ipv6, __, idev, field)
^
include/net/ipv6_frag.h:80:2: note: in expansion of macro '__IP6_INC_STATS'
__IP6_INC_STATS(net, __in6_dev_get(dev), IPSTATS_MIB_REASMFAILS);
^
>> include/net/ipv6.h:171:34: error: 'struct netns_mib' has no member named 'ipv6_statistics'
mod##SNMP_INC_STATS64((net)->mib.statname##_statistics, (field));\
^
arch/x86/include/asm/percpu.h:146:16: note: in definition of macro 'percpu_add_op'
: "+m" (var) \
^
include/linux/percpu-defs.h:379:11: note: in expansion of macro 'raw_cpu_add_1'
case 1: stem##1(variable, __VA_ARGS__);break; \
^
include/linux/percpu-defs.h:424:32: note: in expansion of macro '__pcpu_size_call'
#define raw_cpu_add(pcp, val) __pcpu_size_call(raw_cpu_add_, pcp, val)
^
include/linux/percpu-defs.h:460:2: note: in expansion of macro 'raw_cpu_add'
raw_cpu_add(pcp, val); \
^
include/linux/percpu-defs.h:499:30: note: in expansion of macro '__this_cpu_add'
#define __this_cpu_inc(pcp) __this_cpu_add(pcp, 1)
^
include/net/snmp.h:127:4: note: in expansion of macro '__this_cpu_inc'
__this_cpu_inc(mib->mibs[field])
^
include/net/snmp.h:192:41: note: in expansion of macro '__SNMP_INC_STATS'
#define __SNMP_INC_STATS64(mib, field) __SNMP_INC_STATS(mib, field)
^
include/net/ipv6.h:171:2: note: in expansion of macro '__SNMP_INC_STATS64'
mod##SNMP_INC_STATS64((net)->mib.statname##_statistics, (field));\
^
include/net/ipv6.h:213:3: note: in expansion of macro '_DEVINC'
_DEVINC(net, ipv6, __, idev, field)
^
include/net/ipv6_frag.h:80:2: note: in expansion of macro '__IP6_INC_STATS'
__IP6_INC_STATS(net, __in6_dev_get(dev), IPSTATS_MIB_REASMFAILS);
^
>> include/net/ipv6.h:171:34: error: 'struct netns_mib' has no member named 'ipv6_statistics'
mod##SNMP_INC_STATS64((net)->mib.statname##_statistics, (field));\
^
arch/x86/include/asm/percpu.h:151:39: note: in definition of macro 'percpu_add_op'
asm("incw "__percpu_arg(0) : "+m" (var)); \
^
include/linux/percpu-defs.h:379:11: note: in expansion of macro 'raw_cpu_add_1'
case 1: stem##1(variable, __VA_ARGS__);break; \
^
include/linux/percpu-defs.h:424:32: note: in expansion of macro '__pcpu_size_call'
#define raw_cpu_add(pcp, val) __pcpu_size_call(raw_cpu_add_, pcp, val)
^
include/linux/percpu-defs.h:460:2: note: in expansion of macro 'raw_cpu_add'
raw_cpu_add(pcp, val); \
^
include/linux/percpu-defs.h:499:30: note: in expansion of macro '__this_cpu_add'
#define __this_cpu_inc(pcp) __this_cpu_add(pcp, 1)
^
include/net/snmp.h:127:4: note: in expansion of macro '__this_cpu_inc'
__this_cpu_inc(mib->mibs[field])
^
include/net/snmp.h:192:41: note: in expansion of macro '__SNMP_INC_STATS'
#define __SNMP_INC_STATS64(mib, field) __SNMP_INC_STATS(mib, field)
^
include/net/ipv6.h:171:2: note: in expansion of macro '__SNMP_INC_STATS64'
mod##SNMP_INC_STATS64((net)->mib.statname##_statistics, (field));\
^
include/net/ipv6.h:213:3: note: in expansion of macro '_DEVINC'
_DEVINC(net, ipv6, __, idev, field)
^
include/net/ipv6_frag.h:80:2: note: in expansion of macro '__IP6_INC_STATS'
__IP6_INC_STATS(net, __in6_dev_get(dev), IPSTATS_MIB_REASMFAILS);
^
>> include/net/ipv6.h:171:34: error: 'struct netns_mib' has no member named 'ipv6_statistics'
mod##SNMP_INC_STATS64((net)->mib.statname##_statistics, (field));\
^
arch/x86/include/asm/percpu.h:153:39: note: in definition of macro 'percpu_add_op'
asm("decw "__percpu_arg(0) : "+m" (var)); \
^
include/linux/percpu-defs.h:379:11: note: in expansion of macro 'raw_cpu_add_1'
case 1: stem##1(variable, __VA_ARGS__);break; \
^
include/linux/percpu-defs.h:424:32: note: in expansion of macro '__pcpu_size_call'
#define raw_cpu_add(pcp, val) __pcpu_size_call(raw_cpu_add_, pcp, val)
^
include/linux/percpu-defs.h:460:2: note: in expansion of macro 'raw_cpu_add'
raw_cpu_add(pcp, val); \
^
include/linux/percpu-defs.h:499:30: note: in expansion of macro '__this_cpu_add'
#define __this_cpu_inc(pcp) __this_cpu_add(pcp, 1)
^
include/net/snmp.h:127:4: note: in expansion of macro '__this_cpu_inc'
__this_cpu_inc(mib->mibs[field])
^
include/net/snmp.h:192:41: note: in expansion of macro '__SNMP_INC_STATS'
#define __SNMP_INC_STATS64(mib, field) __SNMP_INC_STATS(mib, field)
^
include/net/ipv6.h:171:2: note: in expansion of macro '__SNMP_INC_STATS64'
mod##SNMP_INC_STATS64((net)->mib.statname##_statistics, (field));\
^
include/net/ipv6.h:213:3: note: in expansion of macro '_DEVINC'
_DEVINC(net, ipv6, __, idev, field)
^
include/net/ipv6_frag.h:80:2: note: in expansion of macro '__IP6_INC_STATS'
__IP6_INC_STATS(net, __in6_dev_get(dev), IPSTATS_MIB_REASMFAILS);
^
>> include/net/ipv6.h:171:34: error: 'struct netns_mib' has no member named 'ipv6_statistics'
mod##SNMP_INC_STATS64((net)->mib.statname##_statistics, (field));\
^
arch/x86/include/asm/percpu.h:156:16: note: in definition of macro 'percpu_add_op'
: "+m" (var) \
^
include/linux/percpu-defs.h:379:11: note: in expansion of macro 'raw_cpu_add_1'
case 1: stem##1(variable, __VA_ARGS__);break; \
^
include/linux/percpu-defs.h:424:32: note: in expansion of macro '__pcpu_size_call'
#define raw_cpu_add(pcp, val) __pcpu_size_call(raw_cpu_add_, pcp, val)
^
include/linux/percpu-defs.h:460:2: note: in expansion of macro 'raw_cpu_add'
raw_cpu_add(pcp, val); \
^
include/linux/percpu-defs.h:499:30: note: in expansion of macro '__this_cpu_add'
#define __this_cpu_inc(pcp) __this_cpu_add(pcp, 1)
^
include/net/snmp.h:127:4: note: in expansion of macro '__this_cpu_inc'
__this_cpu_inc(mib->mibs[field])
^
include/net/snmp.h:192:41: note: in expansion of macro '__SNMP_INC_STATS'
#define __SNMP_INC_STATS64(mib, field) __SNMP_INC_STATS(mib, field)
^
include/net/ipv6.h:171:2: note: in expansion of macro '__SNMP_INC_STATS64'
mod##SNMP_INC_STATS64((net)->mib.statname##_statistics, (field));\
^
include/net/ipv6.h:213:3: note: in expansion of macro '_DEVINC'
_DEVINC(net, ipv6, __, idev, field)
^
include/net/ipv6_frag.h:80:2: note: in expansion of macro '__IP6_INC_STATS'
__IP6_INC_STATS(net, __in6_dev_get(dev), IPSTATS_MIB_REASMFAILS);
^
>> include/net/ipv6.h:171:34: error: 'struct netns_mib' has no member named 'ipv6_statistics'
mod##SNMP_INC_STATS64((net)->mib.statname##_statistics, (field));\
^
arch/x86/include/asm/percpu.h:161:39: note: in definition of macro 'percpu_add_op'
asm("incl "__percpu_arg(0) : "+m" (var)); \
^
include/linux/percpu-defs.h:379:11: note: in expansion of macro 'raw_cpu_add_1'
case 1: stem##1(variable, __VA_ARGS__);break; \
^
include/linux/percpu-defs.h:424:32: note: in expansion of macro '__pcpu_size_call'
#define raw_cpu_add(pcp, val) __pcpu_size_call(raw_cpu_add_, pcp, val)
^
include/linux/percpu-defs.h:460:2: note: in expansion of macro 'raw_cpu_add'
raw_cpu_add(pcp, val); \
^
include/linux/percpu-defs.h:499:30: note: in expansion of macro '__this_cpu_add'
#define __this_cpu_inc(pcp) __this_cpu_add(pcp, 1)
^
include/net/snmp.h:127:4: note: in expansion of macro '__this_cpu_inc'
__this_cpu_inc(mib->mibs[field])
^
include/net/snmp.h:192:41: note: in expansion of macro '__SNMP_INC_STATS'
#define __SNMP_INC_STATS64(mib, field) __SNMP_INC_STATS(mib, field)
^
include/net/ipv6.h:171:2: note: in expansion of macro '__SNMP_INC_STATS64'
mod##SNMP_INC_STATS64((net)->mib.statname##_statistics, (field));\
^
include/net/ipv6.h:213:3: note: in expansion of macro '_DEVINC'
_DEVINC(net, ipv6, __, idev, field)
^
include/net/ipv6_frag.h:80:2: note: in expansion of macro '__IP6_INC_STATS'
__IP6_INC_STATS(net, __in6_dev_get(dev), IPSTATS_MIB_REASMFAILS);
^
>> include/net/ipv6.h:171:34: error: 'struct netns_mib' has no member named 'ipv6_statistics'
mod##SNMP_INC_STATS64((net)->mib.statname##_statistics, (field));\
^
arch/x86/include/asm/percpu.h:163:39: note: in definition of macro 'percpu_add_op'
asm("decl "__percpu_arg(0) : "+m" (var)); \
^
include/linux/percpu-defs.h:379:11: note: in expansion of macro 'raw_cpu_add_1'
case 1: stem##1(variable, __VA_ARGS__);break; \
^
include/linux/percpu-defs.h:424:32: note: in expansion of macro '__pcpu_size_call'
#define raw_cpu_add(pcp, val) __pcpu_size_call(raw_cpu_add_, pcp, val)
^
include/linux/percpu-defs.h:460:2: note: in expansion of macro 'raw_cpu_add'
raw_cpu_add(pcp, val); \
^
include/linux/percpu-defs.h:499:30: note: in expansion of macro '__this_cpu_add'
#define __this_cpu_inc(pcp) __this_cpu_add(pcp, 1)
^
include/net/snmp.h:127:4: note: in expansion of macro '__this_cpu_inc'
__this_cpu_inc(mib->mibs[field])
^
include/net/snmp.h:192:41: note: in expansion of macro '__SNMP_INC_STATS'
#define __SNMP_INC_STATS64(mib, field) __SNMP_INC_STATS(mib, field)
^
include/net/ipv6.h:171:2: note: in expansion of macro '__SNMP_INC_STATS64'
mod##SNMP_INC_STATS64((net)->mib.statname##_statistics, (field));\
^
include/net/ipv6.h:213:3: note: in expansion of macro '_DEVINC'
_DEVINC(net, ipv6, __, idev, field)
^
include/net/ipv6_frag.h:80:2: note: in expansion of macro '__IP6_INC_STATS'
__IP6_INC_STATS(net, __in6_dev_get(dev), IPSTATS_MIB_REASMFAILS);
^
>> include/net/ipv6.h:171:34: error: 'struct netns_mib' has no member named 'ipv6_statistics'
mod##SNMP_INC_STATS64((net)->mib.statname##_statistics, (field));\
^
arch/x86/include/asm/percpu.h:166:16: note: in definition of macro 'percpu_add_op'
: "+m" (var) \
^
include/linux/percpu-defs.h:379:11: note: in expansion of macro 'raw_cpu_add_1'
case 1: stem##1(variable, __VA_ARGS__);break; \
^
include/linux/percpu-defs.h:424:32: note: in expansion of macro '__pcpu_size_call'
#define raw_cpu_add(pcp, val) __pcpu_size_call(raw_cpu_add_, pcp, val)
^
include/linux/percpu-defs.h:460:2: note: in expansion of macro 'raw_cpu_add'
raw_cpu_add(pcp, val); \
^
include/linux/percpu-defs.h:499:30: note: in expansion of macro '__this_cpu_add'
#define __this_cpu_inc(pcp) __this_cpu_add(pcp, 1)
^
include/net/snmp.h:127:4: note: in expansion of macro '__this_cpu_inc'
__this_cpu_inc(mib->mibs[field])
^
include/net/snmp.h:192:41: note: in expansion of macro '__SNMP_INC_STATS'
#define __SNMP_INC_STATS64(mib, field) __SNMP_INC_STATS(mib, field)
^
include/net/ipv6.h:171:2: note: in expansion of macro '__SNMP_INC_STATS64'
mod##SNMP_INC_STATS64((net)->mib.statname##_statistics, (field));\
^
include/net/ipv6.h:213:3: note: in expansion of macro '_DEVINC'
_DEVINC(net, ipv6, __, idev, field)
^
include/net/ipv6_frag.h:80:2: note: in expansion of macro '__IP6_INC_STATS'
__IP6_INC_STATS(net, __in6_dev_get(dev), IPSTATS_MIB_REASMFAILS);
^
>> include/net/ipv6.h:171:34: error: 'struct netns_mib' has no member named 'ipv6_statistics'
mod##SNMP_INC_STATS64((net)->mib.statname##_statistics, (field));\
^
arch/x86/include/asm/percpu.h:401:34: note: in expansion of macro 'percpu_add_op'
#define raw_cpu_add_1(pcp, val) percpu_add_op((pcp), val)
^
include/linux/percpu-defs.h:379:11: note: in expansion of macro 'raw_cpu_add_1'
case 1: stem##1(variable, __VA_ARGS__);break; \
^
include/linux/percpu-defs.h:424:32: note: in expansion of macro '__pcpu_size_call'
#define raw_cpu_add(pcp, val) __pcpu_size_call(raw_cpu_add_, pcp, val)
^
include/linux/percpu-defs.h:460:2: note: in expansion of macro 'raw_cpu_add'
raw_cpu_add(pcp, val); \
^
include/linux/percpu-defs.h:499:30: note: in expansion of macro '__this_cpu_add'
#define __this_cpu_inc(pcp) __this_cpu_add(pcp, 1)
^
include/net/snmp.h:127:4: note: in expansion of macro '__this_cpu_inc'
__this_cpu_inc(mib->mibs[field])
^
include/net/snmp.h:192:41: note: in expansion of macro '__SNMP_INC_STATS'
#define __SNMP_INC_STATS64(mib, field) __SNMP_INC_STATS(mib, field)
^
include/net/ipv6.h:171:2: note: in expansion of macro '__SNMP_INC_STATS64'
mod##SNMP_INC_STATS64((net)->mib.statname##_statistics, (field));\
^
include/net/ipv6.h:213:3: note: in expansion of macro '_DEVINC'
_DEVINC(net, ipv6, __, idev, field)
^
include/net/ipv6_frag.h:80:2: note: in expansion of macro '__IP6_INC_STATS'
__IP6_INC_STATS(net, __in6_dev_get(dev), IPSTATS_MIB_REASMFAILS);
^
>> include/net/ipv6.h:171:34: error: 'struct netns_mib' has no member named 'ipv6_statistics'
mod##SNMP_INC_STATS64((net)->mib.statname##_statistics, (field));\
^
arch/x86/include/asm/percpu.h:173:39: note: in definition of macro 'percpu_add_op'
asm("decq "__percpu_arg(0) : "+m" (var)); \
^
include/linux/percpu-defs.h:379:11: note: in expansion of macro 'raw_cpu_add_1'
case 1: stem##1(variable, __VA_ARGS__);break; \
^
include/linux/percpu-defs.h:424:32: note: in expansion of macro '__pcpu_size_call'
#define raw_cpu_add(pcp, val) __pcpu_size_call(raw_cpu_add_, pcp, val)
^
include/linux/percpu-defs.h:460:2: note: in expansion of macro 'raw_cpu_add'
raw_cpu_add(pcp, val); \
^
include/linux/percpu-defs.h:499:30: note: in expansion of macro '__this_cpu_add'
#define __this_cpu_inc(pcp) __this_cpu_add(pcp, 1)
^
include/net/snmp.h:127:4: note: in expansion of macro '__this_cpu_inc'
__this_cpu_inc(mib->mibs[field])
^
include/net/snmp.h:192:41: note: in expansion of macro '__SNMP_INC_STATS'
#define __SNMP_INC_STATS64(mib, field) __SNMP_INC_STATS(mib, field)
^
include/net/ipv6.h:171:2: note: in expansion of macro '__SNMP_INC_STATS64'
mod##SNMP_INC_STATS64((net)->mib.statname##_statistics, (field));\
^
include/net/ipv6.h:213:3: note: in expansion of macro '_DEVINC'
_DEVINC(net, ipv6, __, idev, field)
^
include/net/ipv6_frag.h:80:2: note: in expansion of macro '__IP6_INC_STATS'
__IP6_INC_STATS(net, __in6_dev_get(dev), IPSTATS_MIB_REASMFAILS);
^
>> include/net/ipv6.h:171:34: error: 'struct netns_mib' has no member named 'ipv6_statistics'
mod##SNMP_INC_STATS64((net)->mib.statname##_statistics, (field));\
^
arch/x86/include/asm/percpu.h:176:16: note: in definition of macro 'percpu_add_op'
: "+m" (var) \
^
include/linux/percpu-defs.h:379:11: note: in expansion of macro 'raw_cpu_add_1'
case 1: stem##1(variable, __VA_ARGS__);break; \
^
include/linux/percpu-defs.h:424:32: note: in expansion of macro '__pcpu_size_call'
#define raw_cpu_add(pcp, val) __pcpu_size_call(raw_cpu_add_, pcp, val)
^
include/linux/percpu-defs.h:460:2: note: in expansion of macro 'raw_cpu_add'
raw_cpu_add(pcp, val); \
^
include/linux/percpu-defs.h:499:30: note: in expansion of macro '__this_cpu_add'
#define __this_cpu_inc(pcp) __this_cpu_add(pcp, 1)
^
include/net/snmp.h:127:4: note: in expansion of macro '__this_cpu_inc'
__this_cpu_inc(mib->mibs[field])
^
include/net/snmp.h:192:41: note: in expansion of macro '__SNMP_INC_STATS'
#define __SNMP_INC_STATS64(mib, field) __SNMP_INC_STATS(mib, field)
^
include/net/ipv6.h:171:2: note: in expansion of macro '__SNMP_INC_STATS64'
mod##SNMP_INC_STATS64((net)->mib.statname##_statistics, (field));\
^
include/net/ipv6.h:213:3: note: in expansion of macro '_DEVINC'
_DEVINC(net, ipv6, __, idev, field)
^
include/net/ipv6_frag.h:80:2: note: in expansion of macro '__IP6_INC_STATS'
__IP6_INC_STATS(net, __in6_dev_get(dev), IPSTATS_MIB_REASMFAILS);
^
>> include/net/ipv6.h:171:34: error: 'struct netns_mib' has no member named 'ipv6_statistics'
mod##SNMP_INC_STATS64((net)->mib.statname##_statistics, (field));\
^
arch/x86/include/asm/percpu.h:129:17: note: in definition of macro 'percpu_add_op'
typedef typeof(var) pao_T__; \
^
include/linux/percpu-defs.h:380:11: note: in expansion of macro 'raw_cpu_add_2'
case 2: stem##2(variable, __VA_ARGS__);break; \
^
include/linux/percpu-defs.h:424:32: note: in expansion of macro '__pcpu_size_call'
#define raw_cpu_add(pcp, val) __pcpu_size_call(raw_cpu_add_, pcp, val)
^
include/linux/percpu-defs.h:460:2: note: in expansion of macro 'raw_cpu_add'
raw_cpu_add(pcp, val); \
^
include/linux/percpu-defs.h:499:30: note: in expansion of macro '__this_cpu_add'
#define __this_cpu_inc(pcp) __this_cpu_add(pcp, 1)
^
include/net/snmp.h:127:4: note: in expansion of macro '__this_cpu_inc'
__this_cpu_inc(mib->mibs[field])
^
include/net/snmp.h:192:41: note: in expansion of macro '__SNMP_INC_STATS'
#define __SNMP_INC_STATS64(mib, field) __SNMP_INC_STATS(mib, field)
^
include/net/ipv6.h:171:2: note: in expansion of macro '__SNMP_INC_STATS64'
mod##SNMP_INC_STATS64((net)->mib.statname##_statistics, (field));\
^
include/net/ipv6.h:213:3: note: in expansion of macro '_DEVINC'
_DEVINC(net, ipv6, __, idev, field)
^
include/net/ipv6_frag.h:80:2: note: in expansion of macro '__IP6_INC_STATS'
__IP6_INC_STATS(net, __in6_dev_get(dev), IPSTATS_MIB_REASMFAILS);
^
>> include/net/ipv6.h:171:34: error: 'struct netns_mib' has no member named 'ipv6_statistics'
mod##SNMP_INC_STATS64((net)->mib.statname##_statistics, (field));\
^
arch/x86/include/asm/percpu.h:138:17: note: in definition of macro 'percpu_add_op'
switch (sizeof(var)) { \
^
include/linux/percpu-defs.h:380:11: note: in expansion of macro 'raw_cpu_add_2'
case 2: stem##2(variable, __VA_ARGS__);break; \
^
include/linux/percpu-defs.h:424:32: note: in expansion of macro '__pcpu_size_call'
#define raw_cpu_add(pcp, val) __pcpu_size_call(raw_cpu_add_, pcp, val)
^
include/linux/percpu-defs.h:460:2: note: in expansion of macro 'raw_cpu_add'
raw_cpu_add(pcp, val); \
^
include/linux/percpu-defs.h:499:30: note: in expansion of macro '__this_cpu_add'
#define __this_cpu_inc(pcp) __this_cpu_add(pcp, 1)
^
include/net/snmp.h:127:4: note: in expansion of macro '__this_cpu_inc'
__this_cpu_inc(mib->mibs[field])
^
include/net/snmp.h:192:41: note: in expansion of macro '__SNMP_INC_STATS'
#define __SNMP_INC_STATS64(mib, field) __SNMP_INC_STATS(mib, field)
^
include/net/ipv6.h:171:2: note: in expansion of macro '__SNMP_INC_STATS64'
mod##SNMP_INC_STATS64((net)->mib.statname##_statistics, (field));\
^
include/net/ipv6.h:213:3: note: in expansion of macro '_DEVINC'
_DEVINC(net, ipv6, __, idev, field)
^
include/net/ipv6_frag.h:80:2: note: in expansion of macro '__IP6_INC_STATS'
__IP6_INC_STATS(net, __in6_dev_get(dev), IPSTATS_MIB_REASMFAILS);
^
>> include/net/ipv6.h:171:34: error: 'struct netns_mib' has no member named 'ipv6_statistics'
mod##SNMP_INC_STATS64((net)->mib.statname##_statistics, (field));\
^
arch/x86/include/asm/percpu.h:141:39: note: in definition of macro 'percpu_add_op'
asm("incb "__percpu_arg(0) : "+m" (var)); \
^
include/linux/percpu-defs.h:380:11: note: in expansion of macro 'raw_cpu_add_2'
case 2: stem##2(variable, __VA_ARGS__);break; \
^
include/linux/percpu-defs.h:424:32: note: in expansion of macro '__pcpu_size_call'
#define raw_cpu_add(pcp, val) __pcpu_size_call(raw_cpu_add_, pcp, val)
^
include/linux/percpu-defs.h:460:2: note: in expansion of macro 'raw_cpu_add'
raw_cpu_add(pcp, val); \
^
include/linux/percpu-defs.h:499:30: note: in expansion of macro '__this_cpu_add'
#define __this_cpu_inc(pcp) __this_cpu_add(pcp, 1)
^
include/net/snmp.h:127:4: note: in expansion of macro '__this_cpu_inc'
__this_cpu_inc(mib->mibs[field])
^
include/net/snmp.h:192:41: note: in expansion of macro '__SNMP_INC_STATS'
#define __SNMP_INC_STATS64(mib, field) __SNMP_INC_STATS(mib, field)
^
include/net/ipv6.h:171:2: note: in expansion of macro '__SNMP_INC_STATS64'
mod##SNMP_INC_STATS64((net)->mib.statname##_statistics, (field));\
^
include/net/ipv6.h:213:3: note: in expansion of macro '_DEVINC'
_DEVINC(net, ipv6, __, idev, field)
^
include/net/ipv6_frag.h:80:2: note: in expansion of macro '__IP6_INC_STATS'
__IP6_INC_STATS(net, __in6_dev_get(dev), IPSTATS_MIB_REASMFAILS);
^
>> include/net/ipv6.h:171:34: error: 'struct netns_mib' has no member named 'ipv6_statistics'
mod##SNMP_INC_STATS64((net)->mib.statname##_statistics, (field));\
^
arch/x86/include/asm/percpu.h:143:39: note: in definition of macro 'percpu_add_op'
asm("decb "__percpu_arg(0) : "+m" (var)); \
^
include/linux/percpu-defs.h:380:11: note: in expansion of macro 'raw_cpu_add_2'
case 2: stem##2(variable, __VA_ARGS__);break; \
^
include/linux/percpu-defs.h:424:32: note: in expansion of macro '__pcpu_size_call'
#define raw_cpu_add(pcp, val) __pcpu_size_call(raw_cpu_add_, pcp, val)
^
include/linux/percpu-defs.h:460:2: note: in expansion of macro 'raw_cpu_add'
raw_cpu_add(pcp, val); \
^
include/linux/percpu-defs.h:499:30: note: in expansion of macro '__this_cpu_add'
#define __this_cpu_inc(pcp) __this_cpu_add(pcp, 1)
^
include/net/snmp.h:127:4: note: in expansion of macro '__this_cpu_inc'
__this_cpu_inc(mib->mibs[field])
^
include/net/snmp.h:192:41: note: in expansion of macro '__SNMP_INC_STATS'
#define __SNMP_INC_STATS64(mib, field) __SNMP_INC_STATS(mib, field)
^
include/net/ipv6.h:171:2: note: in expansion of macro '__SNMP_INC_STATS64'
mod##SNMP_INC_STATS64((net)->mib.statname##_statistics, (field));\
^
include/net/ipv6.h:213:3: note: in expansion of macro '_DEVINC'
_DEVINC(net, ipv6, __, idev, field)
^
include/net/ipv6_frag.h:80:2: note: in expansion of macro '__IP6_INC_STATS'
__IP6_INC_STATS(net, __in6_dev_get(dev), IPSTATS_MIB_REASMFAILS);
^vim +171 include/net/ipv6.h
3d7cc2ba Pavel Emelyanov 2008-01-09 165
13415e46 Eric Dumazet 2016-04-27 166 #define _DEVINC(net, statname, mod, idev, field) \
14878f75 David L Stevens 2007-09-16 167 ({ \
a11d206d YOSHIFUJI Hideaki 2006-11-04 168 struct inet6_dev *_idev = (idev); \
a11d206d YOSHIFUJI Hideaki 2006-11-04 169 if (likely(_idev != NULL)) \
13415e46 Eric Dumazet 2016-04-27 170 mod##SNMP_INC_STATS64((_idev)->stats.statname, (field));\13415e46 Eric Dumazet 2016-04-27 @171 mod##SNMP_INC_STATS64((net)->mib.statname##_statistics, (field));\a11d206d YOSHIFUJI Hideaki 2006-11-04 172 })14878f75 David L Stevens 2007-09-16 173
:::::: The code at line 171 was first introduced by commit
:::::: 13415e46c5915e2dac089de516369005fbc045f9 net: snmp: kill STATS_BH macros
:::::: TO: Eric Dumazet <[email protected]>
:::::: CC: David S. Miller <[email protected]>
---
0-DAY kernel test infrastructure Open Source Technology Center
https://lists.01.org/pipermail/kbuild-all Intel Corporation