From: kernel test robot <lkp@intel.com>
To: Pablo Neira Ayuso <pablo@netfilter.org>, netfilter-devel@vger.kernel.org
Cc: oe-kbuild-all@lists.linux.dev
Subject: Re: [PATCH nf-next 2/2] netfilter: nft_payload: skbuff vlan metadata mangle support
Date: Fri, 10 May 2024 21:11:58 +0800 [thread overview]
Message-ID: <202405102106.cxYkCzFw-lkp@intel.com> (raw)
In-Reply-To: <20240510000719.3205-3-pablo@netfilter.org>
Hi Pablo,
kernel test robot noticed the following build warnings:
[auto build test WARNING on netfilter-nf/main]
[also build test WARNING on linus/master v6.9-rc7 next-20240510]
[cannot apply to nf-next/master]
[If your patch is applied to the wrong git tree, kindly drop us a note.
And when submitting patch, we suggest to use '--base' as documented in
https://git-scm.com/docs/git-format-patch#_base_tree_information]
url: https://github.com/intel-lab-lkp/linux/commits/Pablo-Neira-Ayuso/netfilter-nft_payload-restore-vlan-q-in-q-match-support/20240510-080839
base: git://git.kernel.org/pub/scm/linux/kernel/git/netfilter/nf.git main
patch link: https://lore.kernel.org/r/20240510000719.3205-3-pablo%40netfilter.org
patch subject: [PATCH nf-next 2/2] netfilter: nft_payload: skbuff vlan metadata mangle support
config: powerpc64-randconfig-r133-20240510 (https://download.01.org/0day-ci/archive/20240510/202405102106.cxYkCzFw-lkp@intel.com/config)
compiler: powerpc64-linux-gcc (GCC) 13.2.0
reproduce: (https://download.01.org/0day-ci/archive/20240510/202405102106.cxYkCzFw-lkp@intel.com/reproduce)
If you fix the issue in a separate patch/commit (i.e. not just a new version of
the same patch/commit), kindly add following tags
| Reported-by: kernel test robot <lkp@intel.com>
| Closes: https://lore.kernel.org/oe-kbuild-all/202405102106.cxYkCzFw-lkp@intel.com/
sparse warnings: (new ones prefixed by >>)
>> net/netfilter/nft_payload.c:826:36: sparse: sparse: incorrect type in assignment (different base types) @@ expected restricted __be16 [usertype] vlan_proto @@ got unsigned short @@
net/netfilter/nft_payload.c:826:36: sparse: expected restricted __be16 [usertype] vlan_proto
net/netfilter/nft_payload.c:826:36: sparse: got unsigned short
>> net/netfilter/nft_payload.c:840:28: sparse: sparse: cast to restricted __be16
>> net/netfilter/nft_payload.c:840:26: sparse: sparse: incorrect type in assignment (different base types) @@ expected restricted __be16 [usertype] vlan_tci @@ got unsigned short [usertype] @@
net/netfilter/nft_payload.c:840:26: sparse: expected restricted __be16 [usertype] vlan_tci
net/netfilter/nft_payload.c:840:26: sparse: got unsigned short [usertype]
>> net/netfilter/nft_payload.c:841:31: sparse: sparse: incorrect type in assignment (different base types) @@ expected unsigned short [usertype] vlan_tci @@ got restricted __be16 [usertype] vlan_tci @@
net/netfilter/nft_payload.c:841:31: sparse: expected unsigned short [usertype] vlan_tci
net/netfilter/nft_payload.c:841:31: sparse: got restricted __be16 [usertype] vlan_tci
vim +826 net/netfilter/nft_payload.c
809
810 static bool
811 nft_payload_set_vlan(const u32 *src, struct sk_buff *skb, u8 offset, u8 len,
812 int *vlan_hlen)
813 {
814 struct nft_payload_vlan_hdr *vlanh;
815 __be16 vlan_proto;
816 __be16 vlan_tci;
817
818 if (offset >= offsetof(struct vlan_ethhdr, h_vlan_encapsulated_proto)) {
819 *vlan_hlen = VLAN_HLEN;
820 return true;
821 }
822
823 switch (offset) {
824 case offsetof(struct vlan_ethhdr, h_vlan_proto):
825 if (len == 2) {
> 826 vlan_proto = nft_reg_load16(src);
827 skb->vlan_proto = vlan_proto;
828 } else if (len == 4) {
829 vlanh = (struct nft_payload_vlan_hdr *)src;
830 __vlan_hwaccel_put_tag(skb, vlanh->h_vlan_proto,
831 ntohs(vlanh->h_vlan_TCI));
832 } else {
833 return false;
834 }
835 break;
836 case offsetof(struct vlan_ethhdr, h_vlan_TCI):
837 if (len != 2)
838 return false;
839
> 840 vlan_tci = ntohs(nft_reg_load16(src));
> 841 skb->vlan_tci = vlan_tci;
842 break;
843 default:
844 return false;
845 }
846
847 return true;
848 }
849
--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki
prev parent reply other threads:[~2024-05-10 13:12 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-05-10 0:07 [PATCH nf-next 0/2] nf_tables: vlan matching & mangling Pablo Neira Ayuso
2024-05-10 0:07 ` [PATCH nf-next 1/2] netfilter: nft_payload: restore vlan q-in-q match support Pablo Neira Ayuso
2024-05-10 0:07 ` [PATCH nf-next 2/2] netfilter: nft_payload: skbuff vlan metadata mangle support Pablo Neira Ayuso
2024-05-10 13:11 ` kernel test robot [this message]
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=202405102106.cxYkCzFw-lkp@intel.com \
--to=lkp@intel.com \
--cc=netfilter-devel@vger.kernel.org \
--cc=oe-kbuild-all@lists.linux.dev \
--cc=pablo@netfilter.org \
/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).