Re: [PATCH nf-next v4] netfilter: nft_ct: add ct timeout support

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi Harsha,

Thank you for the patch! Perhaps something to improve:

[auto build test WARNING on nf-next/master]

url:    https://github.com/0day-ci/linux/commits/Harsha-Sharma/netfilter-nft_ct-add-ct-timeout-support/20180612-061838
base:   https://git.kernel.org/pub/scm/linux/kernel/git/pablo/nf-next.git master
config: x86_64-randconfig-s0-06120905 (attached as .config)
compiler: gcc-6 (Debian 6.4.0-9) 6.4.0 20171026
reproduce:
        # save the attached .config to linux build tree
        make ARCH=x86_64 

All warnings (new ones prefixed by >>):

   In file included from include/linux/kernel.h:10:0,
                    from net//netfilter/nft_ct.c:12:
   net//netfilter/nft_ct.c: In function 'ctnl_timeout_parse_policy':
   net//netfilter/nft_ct.c:783:14: error: 'const struct nf_conntrack_l4proto' has no member named 'ctnl_timeout'; did you mean 'get_timeouts'?
     if (!l4proto->ctnl_timeout.nlattr_to_obj)
                 ^
   include/linux/compiler.h:58:30: note: in definition of macro '__trace_if'
     if (__builtin_constant_p(!!(cond)) ? !!(cond) :   \
                                 ^~~~
>> net//netfilter/nft_ct.c:783:2: note: in expansion of macro 'if'
     if (!l4proto->ctnl_timeout.nlattr_to_obj)
     ^~
   net//netfilter/nft_ct.c:783:14: error: 'const struct nf_conntrack_l4proto' has no member named 'ctnl_timeout'; did you mean 'get_timeouts'?
     if (!l4proto->ctnl_timeout.nlattr_to_obj)
                 ^
   include/linux/compiler.h:58:42: note: in definition of macro '__trace_if'
     if (__builtin_constant_p(!!(cond)) ? !!(cond) :   \
                                             ^~~~
>> net//netfilter/nft_ct.c:783:2: note: in expansion of macro 'if'
     if (!l4proto->ctnl_timeout.nlattr_to_obj)
     ^~
   net//netfilter/nft_ct.c:783:14: error: 'const struct nf_conntrack_l4proto' has no member named 'ctnl_timeout'; did you mean 'get_timeouts'?
     if (!l4proto->ctnl_timeout.nlattr_to_obj)
                 ^
   include/linux/compiler.h:69:16: note: in definition of macro '__trace_if'
      ______r = !!(cond);     \
                   ^~~~
>> net//netfilter/nft_ct.c:783:2: note: in expansion of macro 'if'
     if (!l4proto->ctnl_timeout.nlattr_to_obj)
     ^~
   net//netfilter/nft_ct.c:786:22: error: 'const struct nf_conntrack_l4proto' has no member named 'ctnl_timeout'; did you mean 'get_timeouts'?
     tb = kcalloc(l4proto->ctnl_timeout.nlattr_max + 1, sizeof(*tb),
                         ^~
   net//netfilter/nft_ct.c:792:36: error: 'const struct nf_conntrack_l4proto' has no member named 'ctnl_timeout'; did you mean 'get_timeouts'?
     ret = nla_parse_nested(tb, l4proto->ctnl_timeout.nlattr_max,
                                       ^~
   net//netfilter/nft_ct.c:793:24: error: 'const struct nf_conntrack_l4proto' has no member named 'ctnl_timeout'; did you mean 'get_timeouts'?
              attr, l4proto->ctnl_timeout.nla_policy,
                           ^~
   net//netfilter/nft_ct.c:798:15: error: 'const struct nf_conntrack_l4proto' has no member named 'ctnl_timeout'; did you mean 'get_timeouts'?
     ret = l4proto->ctnl_timeout.nlattr_to_obj(tb, net, timeouts);
                  ^~
   net//netfilter/nft_ct.c: In function 'nft_ct_timeout_obj_init':
   net//netfilter/nft_ct.c:850:26: error: 'struct net' has no member named 'nfct_timeout_list'
     INIT_LIST_HEAD(&ctx->net->nfct_timeout_list);
                             ^~
   In file included from net//netfilter/nft_ct.c:12:0:
   net//netfilter/nft_ct.c:851:40: error: 'struct net' has no member named 'nfct_timeout_list'
     list_for_each_entry(timeout, &ctx->net->nfct_timeout_list, head) {
                                           ^
   include/linux/kernel.h:961:26: note: in definition of macro 'container_of'
     void *__mptr = (void *)(ptr);     \
                             ^~~
   include/linux/list.h:377:2: note: in expansion of macro 'list_entry'
     list_entry((ptr)->next, type, member)
     ^~~~~~~~~~
   include/linux/list.h:464:13: note: in expansion of macro 'list_first_entry'
     for (pos = list_first_entry(head, typeof(*pos), member); \
                ^~~~~~~~~~~~~~~~
   net//netfilter/nft_ct.c:851:2: note: in expansion of macro 'list_for_each_entry'
     list_for_each_entry(timeout, &ctx->net->nfct_timeout_list, head) {
     ^~~~~~~~~~~~~~~~~~~
   In file included from include/linux/kernel.h:10:0,
                    from net//netfilter/nft_ct.c:12:
   net//netfilter/nft_ct.c:851:40: error: 'struct net' has no member named 'nfct_timeout_list'
     list_for_each_entry(timeout, &ctx->net->nfct_timeout_list, head) {
                                           ^
   include/linux/compiler.h:316:19: note: in definition of macro '__compiletime_assert'
      bool __cond = !(condition);    \
                      ^~~~~~~~~
   include/linux/compiler.h:339:2: note: in expansion of macro '_compiletime_assert'
     _compiletime_assert(condition, msg, __compiletime_assert_, __LINE__)
     ^~~~~~~~~~~~~~~~~~~
   include/linux/build_bug.h:45:37: note: in expansion of macro 'compiletime_assert'
    #define BUILD_BUG_ON_MSG(cond, msg) compiletime_assert(!(cond), msg)
                                        ^~~~~~~~~~~~~~~~~~
   include/linux/kernel.h:962:2: note: in expansion of macro 'BUILD_BUG_ON_MSG'
     BUILD_BUG_ON_MSG(!__same_type(*(ptr), ((type *)0)->member) && \
     ^~~~~~~~~~~~~~~~
   include/linux/kernel.h:962:20: note: in expansion of macro '__same_type'
     BUILD_BUG_ON_MSG(!__same_type(*(ptr), ((type *)0)->member) && \
                       ^~~~~~~~~~~
   include/linux/list.h:366:2: note: in expansion of macro 'container_of'
     container_of(ptr, type, member)
     ^~~~~~~~~~~~
   include/linux/list.h:377:2: note: in expansion of macro 'list_entry'
     list_entry((ptr)->next, type, member)
     ^~~~~~~~~~
   include/linux/list.h:464:13: note: in expansion of macro 'list_first_entry'
     for (pos = list_first_entry(head, typeof(*pos), member); \
                ^~~~~~~~~~~~~~~~
   net//netfilter/nft_ct.c:851:2: note: in expansion of macro 'list_for_each_entry'
     list_for_each_entry(timeout, &ctx->net->nfct_timeout_list, head) {
     ^~~~~~~~~~~~~~~~~~~
   net//netfilter/nft_ct.c:851:40: error: 'struct net' has no member named 'nfct_timeout_list'
     list_for_each_entry(timeout, &ctx->net->nfct_timeout_list, head) {
                                           ^
   include/linux/compiler.h:316:19: note: in definition of macro '__compiletime_assert'
      bool __cond = !(condition);    \
                      ^~~~~~~~~
   include/linux/compiler.h:339:2: note: in expansion of macro '_compiletime_assert'
     _compiletime_assert(condition, msg, __compiletime_assert_, __LINE__)
     ^~~~~~~~~~~~~~~~~~~
   include/linux/build_bug.h:45:37: note: in expansion of macro 'compiletime_assert'
    #define BUILD_BUG_ON_MSG(cond, msg) compiletime_assert(!(cond), msg)
                                        ^~~~~~~~~~~~~~~~~~
   include/linux/kernel.h:962:2: note: in expansion of macro 'BUILD_BUG_ON_MSG'
     BUILD_BUG_ON_MSG(!__same_type(*(ptr), ((type *)0)->member) && \
     ^~~~~~~~~~~~~~~~
   include/linux/kernel.h:963:6: note: in expansion of macro '__same_type'
        !__same_type(*(ptr), void),   \
         ^~~~~~~~~~~
   include/linux/list.h:366:2: note: in expansion of macro 'container_of'
     container_of(ptr, type, member)
     ^~~~~~~~~~~~
   include/linux/list.h:377:2: note: in expansion of macro 'list_entry'
     list_entry((ptr)->next, type, member)
     ^~~~~~~~~~
   include/linux/list.h:464:13: note: in expansion of macro 'list_first_entry'
     for (pos = list_first_entry(head, typeof(*pos), member); \
                ^~~~~~~~~~~~~~~~
   net//netfilter/nft_ct.c:851:2: note: in expansion of macro 'list_for_each_entry'
     list_for_each_entry(timeout, &ctx->net->nfct_timeout_list, head) {
     ^~~~~~~~~~~~~~~~~~~
   In file included from include/linux/module.h:9:0,
                    from net//netfilter/nft_ct.c:14:
   net//netfilter/nft_ct.c:851:40: error: 'struct net' has no member named 'nfct_timeout_list'
     list_for_each_entry(timeout, &ctx->net->nfct_timeout_list, head) {

vim +/if +783 net//netfilter/nft_ct.c

   774	
   775	static int
   776	ctnl_timeout_parse_policy(void *timeouts,
   777				  const struct nf_conntrack_l4proto *l4proto,
   778				  struct net *net, const struct nlattr *attr)
   779	{
   780		int ret = 0;
   781		struct nlattr **tb;
   782	
 > 783		if (!l4proto->ctnl_timeout.nlattr_to_obj)
   784			return 0;
   785	
   786		tb = kcalloc(l4proto->ctnl_timeout.nlattr_max + 1, sizeof(*tb),
   787			     GFP_KERNEL);
   788	
   789		if (!tb)
   790			return -ENOMEM;
   791	
   792		ret = nla_parse_nested(tb, l4proto->ctnl_timeout.nlattr_max,
   793				       attr, l4proto->ctnl_timeout.nla_policy,
   794				       NULL);
   795		if (ret < 0)
   796			goto err;
   797	
   798		ret = l4proto->ctnl_timeout.nlattr_to_obj(tb, net, timeouts);
   799	
   800	err:
   801		kfree(tb);
   802		return ret;
   803	}
   804	

---
0-DAY kernel test infrastructure                Open Source Technology Center
https://lists.01.org/pipermail/kbuild-all                   Intel Corporation

Attachment: .config.gz
Description: application/gzip


[Index of Archives]     [Netfitler Users]     [LARTC]     [Bugtraq]     [Yosemite Forum]

  Powered by Linux