Re: [PATCH nf-next 07/11] netfilter: nf_tables: use net_generic infra for transaction data

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

 



Hi Florian,

I love your patch! Perhaps something to improve:

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

url:    https://github.com/0day-ci/linux/commits/Florian-Westphal/netfilter-reduce-struct-net-size/20210401-041324
base:   https://git.kernel.org/pub/scm/linux/kernel/git/pablo/nf-next.git master
config: arc-allyesconfig (attached as .config)
compiler: arceb-elf-gcc (GCC) 9.3.0
reproduce (this is a W=1 build):
        wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
        chmod +x ~/bin/make.cross
        # https://github.com/0day-ci/linux/commit/8428bea184970c696c6648fc6a1101d846af5baa
        git remote add linux-review https://github.com/0day-ci/linux
        git fetch --no-tags linux-review Florian-Westphal/netfilter-reduce-struct-net-size/20210401-041324
        git checkout 8428bea184970c696c6648fc6a1101d846af5baa
        # save the attached .config to linux build tree
        COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-9.3.0 make.cross ARCH=arc 

If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@xxxxxxxxx>

All warnings (new ones prefixed by >>):

   net/netfilter/nf_tables_api.c: In function 'nf_tables_fill_table_info':
>> net/netfilter/nf_tables_api.c:732:26: warning: variable 'nft_net' set but not used [-Wunused-but-set-variable]
     732 |  struct nftables_pernet *nft_net;
         |                          ^~~~~~~


vim +/nft_net +732 net/netfilter/nf_tables_api.c

   727	
   728	static int nf_tables_fill_table_info(struct sk_buff *skb, struct net *net,
   729					     u32 portid, u32 seq, int event, u32 flags,
   730					     int family, const struct nft_table *table)
   731	{
 > 732		struct nftables_pernet *nft_net;
   733		struct nlmsghdr *nlh;
   734	
   735		event = nfnl_msg_type(NFNL_SUBSYS_NFTABLES, event);
   736		nlh = nfnl_msg_put(skb, portid, seq, event, flags, family,
   737				   NFNETLINK_V0, nft_base_seq(net));
   738		if (!nlh)
   739			goto nla_put_failure;
   740	
   741		nft_net = net_generic(net, nf_tables_net_id);
   742	
   743		if (nla_put_string(skb, NFTA_TABLE_NAME, table->name) ||
   744		    nla_put_be32(skb, NFTA_TABLE_FLAGS, htonl(table->flags)) ||
   745		    nla_put_be32(skb, NFTA_TABLE_USE, htonl(table->use)) ||
   746		    nla_put_be64(skb, NFTA_TABLE_HANDLE, cpu_to_be64(table->handle),
   747				 NFTA_TABLE_PAD))
   748			goto nla_put_failure;
   749		if (nft_table_has_owner(table) &&
   750		    nla_put_be32(skb, NFTA_TABLE_OWNER, htonl(table->nlpid)))
   751			goto nla_put_failure;
   752	
   753		if (table->udata) {
   754			if (nla_put(skb, NFTA_TABLE_USERDATA, table->udlen, table->udata))
   755				goto nla_put_failure;
   756		}
   757	
   758		nlmsg_end(skb, nlh);
   759		return 0;
   760	
   761	nla_put_failure:
   762		nlmsg_trim(skb, nlh);
   763		return -1;
   764	}
   765	

---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@xxxxxxxxxxxx

Attachment: .config.gz
Description: application/gzip


[Index of Archives]     [Netfitler Users]     [Berkeley Packet Filter]     [LARTC]     [Bugtraq]     [Yosemite Forum]

  Powered by Linux