From: kernel test robot <lkp@intel.com>
To: wenxu@ucloud.cn, pablo@netfilter.org
Cc: kbuild-all@lists.01.org, netfilter-devel@vger.kernel.org
Subject: Re: [PATCH nf] netfilter: nft_payload: fix vlan_tpid get from h_vlan_proto
Date: Sat, 3 Apr 2021 02:51:35 +0800 [thread overview]
Message-ID: <202104030203.FCbW20Fm-lkp@intel.com> (raw)
In-Reply-To: <1617347632-19283-1-git-send-email-wenxu@ucloud.cn>
[-- Attachment #1: Type: text/plain, Size: 4064 bytes --]
Hi,
Thank you for the patch! Yet something to improve:
[auto build test ERROR on nf/master]
url: https://github.com/0day-ci/linux/commits/wenxu-ucloud-cn/netfilter-nft_payload-fix-vlan_tpid-get-from-h_vlan_proto/20210402-151443
base: https://git.kernel.org/pub/scm/linux/kernel/git/pablo/nf.git master
config: i386-randconfig-r022-20210402 (attached as .config)
compiler: gcc-9 (Debian 9.3.0-22) 9.3.0
reproduce (this is a W=1 build):
# https://github.com/0day-ci/linux/commit/eca110c24cc53cf938a9fc7fcddcc8ebc5a35e68
git remote add linux-review https://github.com/0day-ci/linux
git fetch --no-tags linux-review wenxu-ucloud-cn/netfilter-nft_payload-fix-vlan_tpid-get-from-h_vlan_proto/20210402-151443
git checkout eca110c24cc53cf938a9fc7fcddcc8ebc5a35e68
# save the attached .config to linux build tree
make W=1 ARCH=i386
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@intel.com>
All errors (new ones prefixed by >>):
net/netfilter/nft_payload.c: In function 'nft_payload_offload_ll':
>> net/netfilter/nft_payload.c:232:2: error: duplicate case value
232 | case offsetof(struct vlan_ethhdr, h_vlan_proto):
| ^~~~
net/netfilter/nft_payload.c:217:2: note: previously used here
217 | case offsetof(struct ethhdr, h_proto):
| ^~~~
vim +232 net/netfilter/nft_payload.c
195
196 static int nft_payload_offload_ll(struct nft_offload_ctx *ctx,
197 struct nft_flow_rule *flow,
198 const struct nft_payload *priv)
199 {
200 struct nft_offload_reg *reg = &ctx->regs[priv->dreg];
201
202 switch (priv->offset) {
203 case offsetof(struct ethhdr, h_source):
204 if (!nft_payload_offload_mask(reg, priv->len, ETH_ALEN))
205 return -EOPNOTSUPP;
206
207 NFT_OFFLOAD_MATCH(FLOW_DISSECTOR_KEY_ETH_ADDRS, eth_addrs,
208 src, ETH_ALEN, reg);
209 break;
210 case offsetof(struct ethhdr, h_dest):
211 if (!nft_payload_offload_mask(reg, priv->len, ETH_ALEN))
212 return -EOPNOTSUPP;
213
214 NFT_OFFLOAD_MATCH(FLOW_DISSECTOR_KEY_ETH_ADDRS, eth_addrs,
215 dst, ETH_ALEN, reg);
216 break;
217 case offsetof(struct ethhdr, h_proto):
218 if (!nft_payload_offload_mask(reg, priv->len, sizeof(__be16)))
219 return -EOPNOTSUPP;
220
221 NFT_OFFLOAD_MATCH(FLOW_DISSECTOR_KEY_BASIC, basic,
222 n_proto, sizeof(__be16), reg);
223 nft_offload_set_dependency(ctx, NFT_OFFLOAD_DEP_NETWORK);
224 break;
225 case offsetof(struct vlan_ethhdr, h_vlan_TCI):
226 if (!nft_payload_offload_mask(reg, priv->len, sizeof(__be16)))
227 return -EOPNOTSUPP;
228
229 NFT_OFFLOAD_MATCH(FLOW_DISSECTOR_KEY_VLAN, vlan,
230 vlan_tci, sizeof(__be16), reg);
231 break;
> 232 case offsetof(struct vlan_ethhdr, h_vlan_proto):
233 if (!nft_payload_offload_mask(reg, priv->len, sizeof(__be16)))
234 return -EOPNOTSUPP;
235
236 NFT_OFFLOAD_MATCH(FLOW_DISSECTOR_KEY_VLAN, vlan,
237 vlan_tpid, sizeof(__be16), reg);
238 nft_offload_set_dependency(ctx, NFT_OFFLOAD_DEP_NETWORK);
239 break;
240 case offsetof(struct vlan_ethhdr, h_vlan_TCI) + sizeof(struct vlan_hdr):
241 if (!nft_payload_offload_mask(reg, priv->len, sizeof(__be16)))
242 return -EOPNOTSUPP;
243
244 NFT_OFFLOAD_MATCH(FLOW_DISSECTOR_KEY_CVLAN, vlan,
245 vlan_tci, sizeof(__be16), reg);
246 break;
247 case offsetof(struct vlan_ethhdr, h_vlan_proto) +
248 sizeof(struct vlan_hdr):
249 if (!nft_payload_offload_mask(reg, priv->len, sizeof(__be16)))
250 return -EOPNOTSUPP;
251
252 NFT_OFFLOAD_MATCH(FLOW_DISSECTOR_KEY_CVLAN, vlan,
253 vlan_tpid, sizeof(__be16), reg);
254 break;
255 default:
256 return -EOPNOTSUPP;
257 }
258
259 return 0;
260 }
261
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
[-- Attachment #2: .config.gz --]
[-- Type: application/gzip, Size: 36729 bytes --]
next prev parent reply other threads:[~2021-04-02 18:52 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-04-02 7:13 [PATCH nf] netfilter: nft_payload: fix vlan_tpid get from h_vlan_proto wenxu
2021-04-02 18:51 ` kernel test robot [this message]
2021-04-02 19:54 ` Pablo Neira Ayuso
2021-04-03 13:33 ` wenxu
2021-04-03 14:59 ` wenxu
2021-04-08 22:48 ` Pablo Neira Ayuso
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=202104030203.FCbW20Fm-lkp@intel.com \
--to=lkp@intel.com \
--cc=kbuild-all@lists.01.org \
--cc=netfilter-devel@vger.kernel.org \
--cc=pablo@netfilter.org \
--cc=wenxu@ucloud.cn \
/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).