netfilter-devel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: kbuild test robot <lkp@intel.com>
To: Pablo Neira Ayuso <pablo@netfilter.org>
Cc: kbuild-all@lists.01.org, netfilter-devel@vger.kernel.org,
	davem@davemloft.net, netdev@vger.kernel.org, paulb@mellanox.com,
	ozsh@mellanox.com, majd@mellanox.com, saeedm@mellanox.com
Subject: Re: [PATCH net-next 6/6] netfilter: nf_flow_table: hardware offload support
Date: Wed, 13 Nov 2019 07:31:54 +0800	[thread overview]
Message-ID: <201911130721.o9Vc4RaP%lkp@intel.com> (raw)
In-Reply-To: <20191111232956.24898-7-pablo@netfilter.org>

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

Hi Pablo,

I love your patch! Perhaps something to improve:

[auto build test WARNING on net-next/master]
[also build test WARNING on next-20191112]
[cannot apply to v5.4-rc7]
[if your patch is applied to the wrong git tree, please drop us a note to help
improve the system. BTW, we also suggest to use '--base' option to specify the
base tree in git format-patch, please see https://stackoverflow.com/a/37406982]

url:    https://github.com/0day-ci/linux/commits/Pablo-Neira-Ayuso/netfilter-flowtable-hardware-offload/20191113-052213
base:   https://git.kernel.org/pub/scm/linux/kernel/git/davem/net-next.git ca22d6977b9b4ab0fd2e7909b57e32ba5b95046f
config: mips-allmodconfig (attached as .config)
compiler: mips-linux-gcc (GCC) 7.4.0
reproduce:
        wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
        chmod +x ~/bin/make.cross
        # save the attached .config to linux build tree
        GCC_VERSION=7.4.0 make.cross ARCH=mips 

If you fix the issue, kindly add following tag
Reported-by: kbuild test robot <lkp@intel.com>

All warnings (new ones prefixed by >>):

   net/netfilter/nf_flow_table_offload.c: In function 'nf_flow_rule_match':
>> net/netfilter/nf_flow_table_offload.c:80:21: warning: large integer implicitly truncated to unsigned type [-Woverflow]
      mask->tcp.flags = TCP_FLAG_RST | TCP_FLAG_FIN;
                        ^~~~~~~~~~~~

vim +80 net/netfilter/nf_flow_table_offload.c

    46	
    47	#define NF_FLOW_DISSECTOR(__match, __type, __field)	\
    48		(__match)->dissector.offset[__type] =		\
    49			offsetof(struct nf_flow_key, __field)
    50	
    51	static int nf_flow_rule_match(struct nf_flow_match *match,
    52				      const struct flow_offload_tuple *tuple)
    53	{
    54		struct nf_flow_key *mask = &match->mask;
    55		struct nf_flow_key *key = &match->key;
    56	
    57		NF_FLOW_DISSECTOR(match, FLOW_DISSECTOR_KEY_CONTROL, control);
    58		NF_FLOW_DISSECTOR(match, FLOW_DISSECTOR_KEY_BASIC, basic);
    59		NF_FLOW_DISSECTOR(match, FLOW_DISSECTOR_KEY_IPV4_ADDRS, ipv4);
    60		NF_FLOW_DISSECTOR(match, FLOW_DISSECTOR_KEY_TCP, tcp);
    61		NF_FLOW_DISSECTOR(match, FLOW_DISSECTOR_KEY_PORTS, tp);
    62	
    63		switch (tuple->l3proto) {
    64		case AF_INET:
    65			key->control.addr_type = FLOW_DISSECTOR_KEY_IPV4_ADDRS;
    66			key->basic.n_proto = htons(ETH_P_IP);
    67			key->ipv4.src = tuple->src_v4.s_addr;
    68			mask->ipv4.src = 0xffffffff;
    69			key->ipv4.dst = tuple->dst_v4.s_addr;
    70			mask->ipv4.dst = 0xffffffff;
    71			break;
    72		default:
    73			return -EOPNOTSUPP;
    74		}
    75		mask->basic.n_proto = 0xffff;
    76	
    77		switch (tuple->l4proto) {
    78		case IPPROTO_TCP:
    79			key->tcp.flags = 0;
  > 80			mask->tcp.flags = TCP_FLAG_RST | TCP_FLAG_FIN;
    81			match->dissector.used_keys |= BIT(FLOW_DISSECTOR_KEY_TCP);
    82			break;
    83		case IPPROTO_UDP:
    84			break;
    85		default:
    86			return -EOPNOTSUPP;
    87		}
    88	
    89		key->basic.ip_proto = tuple->l4proto;
    90		mask->basic.ip_proto = 0xff;
    91	
    92		key->tp.src = tuple->src_port;
    93		mask->tp.src = 0xffff;
    94		key->tp.dst = tuple->dst_port;
    95		mask->tp.dst = 0xffff;
    96	
    97		match->dissector.used_keys |= BIT(FLOW_DISSECTOR_KEY_CONTROL) |
    98					      BIT(FLOW_DISSECTOR_KEY_BASIC) |
    99					      BIT(FLOW_DISSECTOR_KEY_IPV4_ADDRS) |
   100					      BIT(FLOW_DISSECTOR_KEY_PORTS);
   101		return 0;
   102	}
   103	

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

[-- Attachment #2: .config.gz --]
[-- Type: application/gzip, Size: 62097 bytes --]

  reply	other threads:[~2019-11-12 23:32 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-11-11 23:29 [PATCH net-next 0/6] netfilter flowtable hardware offload Pablo Neira Ayuso
2019-11-11 23:29 ` [PATCH net-next 1/6] netfilter: nf_flow_table: move conntrack object to struct flow_offload Pablo Neira Ayuso
2019-11-11 23:29 ` [PATCH net-next 2/6] netfilter: nf_flow_table: remove union from flow_offload structure Pablo Neira Ayuso
2019-11-11 23:29 ` [PATCH net-next 3/6] netfilter: nf_flowtable: remove flow_offload_entry structure Pablo Neira Ayuso
2019-11-11 23:29 ` [PATCH net-next 4/6] netfilter: nf_flow_table: detach routing information from flow description Pablo Neira Ayuso
2019-11-11 23:29 ` [PATCH net-next 5/6] netfilter: nf_tables: add flowtable offload control plane Pablo Neira Ayuso
2019-11-11 23:29 ` [PATCH net-next 6/6] netfilter: nf_flow_table: hardware offload support Pablo Neira Ayuso
2019-11-12 23:31   ` kbuild test robot [this message]
2020-03-19 15:57   ` Edward Cree
2020-03-19 16:47     ` Paul Blakey
2020-03-19 19:37       ` Pablo Neira Ayuso
2019-11-13  3:42 ` [PATCH net-next 0/6] netfilter flowtable hardware offload David Miller

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=201911130721.o9Vc4RaP%lkp@intel.com \
    --to=lkp@intel.com \
    --cc=davem@davemloft.net \
    --cc=kbuild-all@lists.01.org \
    --cc=majd@mellanox.com \
    --cc=netdev@vger.kernel.org \
    --cc=netfilter-devel@vger.kernel.org \
    --cc=ozsh@mellanox.com \
    --cc=pablo@netfilter.org \
    --cc=paulb@mellanox.com \
    --cc=saeedm@mellanox.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).