From: kernel test robot <lkp@intel.com>
To: Puranjay Mohan <puranjay@kernel.org>,
Albert Ou <aou@eecs.berkeley.edu>,
Alexei Starovoitov <ast@kernel.org>,
Andrew Morton <akpm@linux-foundation.org>,
Andrii Nakryiko <andrii@kernel.org>,
bpf@vger.kernel.org, Daniel Borkmann <daniel@iogearbox.net>,
"David S. Miller" <davem@davemloft.net>,
Eduard Zingerman <eddyz87@gmail.com>,
Eric Dumazet <edumazet@google.com>, Hao Luo <haoluo@google.com>,
Helge Deller <deller@gmx.de>, Jakub Kicinski <kuba@kernel.org>,
"James E.J. Bottomley" <James.Bottomley@hansenpartnership.com>,
Jiri Olsa <jolsa@kernel.org>,
John Fastabend <john.fastabend@gmail.com>,
KP Singh <kpsingh@kernel.org>,
linux-kernel@vger.kernel.org, linux-parisc@vger.kernel.org,
linux-riscv@lists.infradead.org,
Martin KaFai Lau <martin.lau@linux.dev>,
Mykola Lysenko <mykolal@fb.com>,
Palmer Dabbelt <palmer@dabbelt.com>,
Paolo Abeni <pabeni@redhat.com>,
Paul Walmsley <paul.walmsley@sifive.com>,
Puranjay Mohan <puranjay12@gmail.com>,
Shuah Khan <skhan@linuxfoundation.org>,
Song Liu <song@kernel.org>, Stanislav Fomichev <sdf@fomichev.me>
Cc: oe-kbuild-all@lists.linux.dev,
Linux Memory Management List <linux-mm@kvack.org>,
netdev@vger.kernel.org
Subject: Re: [PATCH bpf-next 1/5] net: checksum: move from32to16() to generic header
Date: Tue, 22 Oct 2024 21:50:28 +0800 [thread overview]
Message-ID: <202410222149.3FVJFYYy-lkp@intel.com> (raw)
In-Reply-To: <20241021122112.101513-2-puranjay@kernel.org>
Hi Puranjay,
kernel test robot noticed the following build warnings:
[auto build test WARNING on bpf-next/master]
url: https://github.com/intel-lab-lkp/linux/commits/Puranjay-Mohan/net-checksum-move-from32to16-to-generic-header/20241021-202707
base: https://git.kernel.org/pub/scm/linux/kernel/git/bpf/bpf-next.git master
patch link: https://lore.kernel.org/r/20241021122112.101513-2-puranjay%40kernel.org
patch subject: [PATCH bpf-next 1/5] net: checksum: move from32to16() to generic header
config: x86_64-randconfig-122-20241022 (https://download.01.org/0day-ci/archive/20241022/202410222149.3FVJFYYy-lkp@intel.com/config)
compiler: gcc-12 (Debian 12.2.0-14) 12.2.0
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20241022/202410222149.3FVJFYYy-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/202410222149.3FVJFYYy-lkp@intel.com/
sparse warnings: (new ones prefixed by >>)
>> lib/checksum.c:84:34: sparse: sparse: incorrect type in argument 1 (different base types) @@ expected restricted __wsum [usertype] sum @@ got unsigned int [assigned] result @@
lib/checksum.c:84:34: sparse: expected restricted __wsum [usertype] sum
lib/checksum.c:84:34: sparse: got unsigned int [assigned] result
>> lib/checksum.c:84:16: sparse: sparse: incorrect type in assignment (different base types) @@ expected unsigned int [assigned] result @@ got restricted __sum16 @@
lib/checksum.c:84:16: sparse: expected unsigned int [assigned] result
lib/checksum.c:84:16: sparse: got restricted __sum16
vim +84 lib/checksum.c
35
36 #ifndef do_csum
37 static unsigned int do_csum(const unsigned char *buff, int len)
38 {
39 int odd;
40 unsigned int result = 0;
41
42 if (len <= 0)
43 goto out;
44 odd = 1 & (unsigned long) buff;
45 if (odd) {
46 #ifdef __LITTLE_ENDIAN
47 result += (*buff << 8);
48 #else
49 result = *buff;
50 #endif
51 len--;
52 buff++;
53 }
54 if (len >= 2) {
55 if (2 & (unsigned long) buff) {
56 result += *(unsigned short *) buff;
57 len -= 2;
58 buff += 2;
59 }
60 if (len >= 4) {
61 const unsigned char *end = buff + ((unsigned)len & ~3);
62 unsigned int carry = 0;
63 do {
64 unsigned int w = *(unsigned int *) buff;
65 buff += 4;
66 result += carry;
67 result += w;
68 carry = (w > result);
69 } while (buff < end);
70 result += carry;
71 result = (result & 0xffff) + (result >> 16);
72 }
73 if (len & 2) {
74 result += *(unsigned short *) buff;
75 buff += 2;
76 }
77 }
78 if (len & 1)
79 #ifdef __LITTLE_ENDIAN
80 result += *buff;
81 #else
82 result += (*buff << 8);
83 #endif
> 84 result = csum_from32to16(result);
85 if (odd)
86 result = ((result >> 8) & 0xff) | ((result & 0xff) << 8);
87 out:
88 return result;
89 }
90 #endif
91
--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki
WARNING: multiple messages have this Message-ID (diff)
From: kernel test robot <lkp@intel.com>
To: Puranjay Mohan <puranjay@kernel.org>,
Albert Ou <aou@eecs.berkeley.edu>,
Alexei Starovoitov <ast@kernel.org>,
Andrew Morton <akpm@linux-foundation.org>,
Andrii Nakryiko <andrii@kernel.org>,
bpf@vger.kernel.org, Daniel Borkmann <daniel@iogearbox.net>,
"David S. Miller" <davem@davemloft.net>,
Eduard Zingerman <eddyz87@gmail.com>,
Eric Dumazet <edumazet@google.com>, Hao Luo <haoluo@google.com>,
Helge Deller <deller@gmx.de>, Jakub Kicinski <kuba@kernel.org>,
"James E.J. Bottomley" <James.Bottomley@hansenpartnership.com>,
Jiri Olsa <jolsa@kernel.org>,
John Fastabend <john.fastabend@gmail.com>,
KP Singh <kpsingh@kernel.org>,
linux-kernel@vger.kernel.org, linux-parisc@vger.kernel.org,
linux-riscv@lists.infradead.org,
Martin KaFai Lau <martin.lau@linux.dev>,
Mykola Lysenko <mykolal@fb.com>,
Palmer Dabbelt <palmer@dabbelt.com>,
Paolo Abeni <pabeni@redhat.com>,
Paul Walmsley <paul.walmsley@sifive.com>,
Puranjay Mohan <puranjay12@gmail.com>,
Shuah Khan <skhan@linuxfoundation.org>,
Song Liu <song@kernel.org>, Stanislav Fomichev <sdf@fomichev.me>
Cc: oe-kbuild-all@lists.linux.dev,
Linux Memory Management List <linux-mm@kvack.org>,
netdev@vger.kernel.org
Subject: Re: [PATCH bpf-next 1/5] net: checksum: move from32to16() to generic header
Date: Tue, 22 Oct 2024 21:50:28 +0800 [thread overview]
Message-ID: <202410222149.3FVJFYYy-lkp@intel.com> (raw)
In-Reply-To: <20241021122112.101513-2-puranjay@kernel.org>
Hi Puranjay,
kernel test robot noticed the following build warnings:
[auto build test WARNING on bpf-next/master]
url: https://github.com/intel-lab-lkp/linux/commits/Puranjay-Mohan/net-checksum-move-from32to16-to-generic-header/20241021-202707
base: https://git.kernel.org/pub/scm/linux/kernel/git/bpf/bpf-next.git master
patch link: https://lore.kernel.org/r/20241021122112.101513-2-puranjay%40kernel.org
patch subject: [PATCH bpf-next 1/5] net: checksum: move from32to16() to generic header
config: x86_64-randconfig-122-20241022 (https://download.01.org/0day-ci/archive/20241022/202410222149.3FVJFYYy-lkp@intel.com/config)
compiler: gcc-12 (Debian 12.2.0-14) 12.2.0
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20241022/202410222149.3FVJFYYy-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/202410222149.3FVJFYYy-lkp@intel.com/
sparse warnings: (new ones prefixed by >>)
>> lib/checksum.c:84:34: sparse: sparse: incorrect type in argument 1 (different base types) @@ expected restricted __wsum [usertype] sum @@ got unsigned int [assigned] result @@
lib/checksum.c:84:34: sparse: expected restricted __wsum [usertype] sum
lib/checksum.c:84:34: sparse: got unsigned int [assigned] result
>> lib/checksum.c:84:16: sparse: sparse: incorrect type in assignment (different base types) @@ expected unsigned int [assigned] result @@ got restricted __sum16 @@
lib/checksum.c:84:16: sparse: expected unsigned int [assigned] result
lib/checksum.c:84:16: sparse: got restricted __sum16
vim +84 lib/checksum.c
35
36 #ifndef do_csum
37 static unsigned int do_csum(const unsigned char *buff, int len)
38 {
39 int odd;
40 unsigned int result = 0;
41
42 if (len <= 0)
43 goto out;
44 odd = 1 & (unsigned long) buff;
45 if (odd) {
46 #ifdef __LITTLE_ENDIAN
47 result += (*buff << 8);
48 #else
49 result = *buff;
50 #endif
51 len--;
52 buff++;
53 }
54 if (len >= 2) {
55 if (2 & (unsigned long) buff) {
56 result += *(unsigned short *) buff;
57 len -= 2;
58 buff += 2;
59 }
60 if (len >= 4) {
61 const unsigned char *end = buff + ((unsigned)len & ~3);
62 unsigned int carry = 0;
63 do {
64 unsigned int w = *(unsigned int *) buff;
65 buff += 4;
66 result += carry;
67 result += w;
68 carry = (w > result);
69 } while (buff < end);
70 result += carry;
71 result = (result & 0xffff) + (result >> 16);
72 }
73 if (len & 2) {
74 result += *(unsigned short *) buff;
75 buff += 2;
76 }
77 }
78 if (len & 1)
79 #ifdef __LITTLE_ENDIAN
80 result += *buff;
81 #else
82 result += (*buff << 8);
83 #endif
> 84 result = csum_from32to16(result);
85 if (odd)
86 result = ((result >> 8) & 0xff) | ((result & 0xff) << 8);
87 out:
88 return result;
89 }
90 #endif
91
--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki
_______________________________________________
linux-riscv mailing list
linux-riscv@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-riscv
next prev parent reply other threads:[~2024-10-22 13:50 UTC|newest]
Thread overview: 48+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-10-21 12:21 [PATCH bpf-next 0/5] Optimize bpf_csum_diff() and homogenize for all archs Puranjay Mohan
2024-10-21 12:21 ` Puranjay Mohan
2024-10-21 12:21 ` [PATCH bpf-next 1/5] net: checksum: move from32to16() to generic header Puranjay Mohan
2024-10-21 12:21 ` Puranjay Mohan
2024-10-21 13:41 ` Daniel Borkmann
2024-10-21 13:41 ` Daniel Borkmann
2024-10-22 9:49 ` Toke Høiland-Jørgensen
2024-10-22 9:49 ` Toke Høiland-Jørgensen
2024-10-22 13:50 ` kernel test robot [this message]
2024-10-22 13:50 ` kernel test robot
2024-10-21 12:21 ` [PATCH bpf-next 2/5] bpf: bpf_csum_diff: optimize and homogenize for all archs Puranjay Mohan
2024-10-21 12:21 ` Puranjay Mohan
2024-10-21 13:42 ` Daniel Borkmann
2024-10-21 13:42 ` Daniel Borkmann
2024-10-22 9:54 ` Toke Høiland-Jørgensen
2024-10-22 9:54 ` Toke Høiland-Jørgensen
2024-10-22 18:09 ` kernel test robot
2024-10-22 18:09 ` kernel test robot
2024-10-21 12:21 ` [PATCH bpf-next 3/5] selftests/bpf: don't mask result of bpf_csum_diff() in test_verifier Puranjay Mohan
2024-10-21 12:21 ` Puranjay Mohan
2024-10-21 13:01 ` Helge Deller
2024-10-21 13:01 ` Helge Deller
2024-10-21 13:14 ` Puranjay Mohan
2024-10-21 13:14 ` Puranjay Mohan
2024-10-21 14:04 ` Helge Deller
2024-10-21 14:04 ` Helge Deller
2024-10-21 13:42 ` Daniel Borkmann
2024-10-21 13:42 ` Daniel Borkmann
2024-10-22 9:55 ` Toke Høiland-Jørgensen
2024-10-22 9:55 ` Toke Høiland-Jørgensen
2024-10-21 12:21 ` [PATCH bpf-next 4/5] selftests/bpf: Add benchmark for bpf_csum_diff() helper Puranjay Mohan
2024-10-21 12:21 ` Puranjay Mohan
2024-10-21 13:43 ` Daniel Borkmann
2024-10-21 13:43 ` Daniel Borkmann
2024-10-21 23:28 ` Andrii Nakryiko
2024-10-21 23:28 ` Andrii Nakryiko
2024-10-22 10:21 ` Puranjay Mohan
2024-10-22 10:21 ` Puranjay Mohan
2024-10-22 17:47 ` Andrii Nakryiko
2024-10-22 17:47 ` Andrii Nakryiko
2024-10-22 17:58 ` Puranjay Mohan
2024-10-22 17:58 ` Puranjay Mohan
2024-10-23 15:37 ` Puranjay Mohan
2024-10-23 15:37 ` Puranjay Mohan
2024-10-21 12:21 ` [PATCH bpf-next 5/5] selftests/bpf: Add a selftest for bpf_csum_diff() Puranjay Mohan
2024-10-21 12:21 ` Puranjay Mohan
2024-10-21 13:44 ` Daniel Borkmann
2024-10-21 13:44 ` Daniel Borkmann
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=202410222149.3FVJFYYy-lkp@intel.com \
--to=lkp@intel.com \
--cc=James.Bottomley@hansenpartnership.com \
--cc=akpm@linux-foundation.org \
--cc=andrii@kernel.org \
--cc=aou@eecs.berkeley.edu \
--cc=ast@kernel.org \
--cc=bpf@vger.kernel.org \
--cc=daniel@iogearbox.net \
--cc=davem@davemloft.net \
--cc=deller@gmx.de \
--cc=eddyz87@gmail.com \
--cc=edumazet@google.com \
--cc=haoluo@google.com \
--cc=john.fastabend@gmail.com \
--cc=jolsa@kernel.org \
--cc=kpsingh@kernel.org \
--cc=kuba@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=linux-parisc@vger.kernel.org \
--cc=linux-riscv@lists.infradead.org \
--cc=martin.lau@linux.dev \
--cc=mykolal@fb.com \
--cc=netdev@vger.kernel.org \
--cc=oe-kbuild-all@lists.linux.dev \
--cc=pabeni@redhat.com \
--cc=palmer@dabbelt.com \
--cc=paul.walmsley@sifive.com \
--cc=puranjay12@gmail.com \
--cc=puranjay@kernel.org \
--cc=sdf@fomichev.me \
--cc=skhan@linuxfoundation.org \
--cc=song@kernel.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.