From: kernel test robot <lkp@intel.com>
To: Eric Dumazet <eric.dumazet@gmail.com>,
"David S . Miller" <davem@davemloft.net>,
Jakub Kicinski <kuba@kernel.org>, Paolo Abeni <pabeni@redhat.com>
Cc: kbuild-all@lists.01.org, netdev <netdev@vger.kernel.org>,
Eric Dumazet <edumazet@google.com>
Subject: Re: [PATCH net-next 1/2] raw: use more conventional iterators
Date: Sat, 18 Jun 2022 10:01:08 +0800 [thread overview]
Message-ID: <202206180947.vsH21eY4-lkp@intel.com> (raw)
In-Reply-To: <20220617201045.2659460-2-eric.dumazet@gmail.com>
Hi Eric,
I love your patch! Perhaps something to improve:
[auto build test WARNING on net-next/master]
url: https://github.com/intel-lab-lkp/linux/commits/Eric-Dumazet/raw-RCU-conversion/20220618-041145
base: https://git.kernel.org/pub/scm/linux/kernel/git/davem/net-next.git 4875d94c69d5a4836c4225b51429d277c297aae8
config: x86_64-randconfig-a013 (https://download.01.org/0day-ci/archive/20220618/202206180947.vsH21eY4-lkp@intel.com/config)
compiler: gcc-11 (Debian 11.3.0-3) 11.3.0
reproduce (this is a W=1 build):
# https://github.com/intel-lab-lkp/linux/commit/6862039427583c2b85bdda50f45ece5b79ed5fa5
git remote add linux-review https://github.com/intel-lab-lkp/linux
git fetch --no-tags linux-review Eric-Dumazet/raw-RCU-conversion/20220618-041145
git checkout 6862039427583c2b85bdda50f45ece5b79ed5fa5
# save the config file
mkdir build_dir && cp config build_dir/.config
make W=1 O=build_dir ARCH=x86_64 SHELL=/bin/bash net/ipv4/ net/ipv6/
If you fix the issue, kindly add following tag where applicable
Reported-by: kernel test robot <lkp@intel.com>
All warnings (new ones prefixed by >>):
net/ipv4/raw.c: In function 'raw_v4_input':
>> net/ipv4/raw.c:167:9: warning: ISO C90 forbids mixed declarations and code [-Wdeclaration-after-statement]
167 | int sdif = inet_sdif(skb);
| ^~~
net/ipv4/raw.c: In function 'raw_icmp_error':
net/ipv4/raw.c:268:9: warning: ISO C90 forbids mixed declarations and code [-Wdeclaration-after-statement]
268 | int dif = skb->dev->ifindex;
| ^~~
--
net/ipv6/raw.c: In function 'raw6_icmp_error':
>> net/ipv6/raw.c:338:40: warning: variable 'daddr' set but not used [-Wunused-but-set-variable]
338 | const struct in6_addr *saddr, *daddr;
| ^~~~~
>> net/ipv6/raw.c:338:32: warning: variable 'saddr' set but not used [-Wunused-but-set-variable]
338 | const struct in6_addr *saddr, *daddr;
| ^~~~~
vim +167 net/ipv4/raw.c
^1da177e4c3f41 Linus Torvalds 2005-04-16 157
^1da177e4c3f41 Linus Torvalds 2005-04-16 158 /* IP input processing comes here for RAW socket delivery.
^1da177e4c3f41 Linus Torvalds 2005-04-16 159 * Caller owns SKB, so we must make clones.
^1da177e4c3f41 Linus Torvalds 2005-04-16 160 *
^1da177e4c3f41 Linus Torvalds 2005-04-16 161 * RFC 1122: SHOULD pass TOS value up to the transport layer.
^1da177e4c3f41 Linus Torvalds 2005-04-16 162 * -> It does. And not only TOS, but all IP header.
^1da177e4c3f41 Linus Torvalds 2005-04-16 163 */
b71d1d426d263b Eric Dumazet 2011-04-22 164 static int raw_v4_input(struct sk_buff *skb, const struct iphdr *iph, int hash)
^1da177e4c3f41 Linus Torvalds 2005-04-16 165 {
6862039427583c Eric Dumazet 2022-06-17 166 struct net *net = dev_net(skb->dev);;
67359930e185c4 David Ahern 2017-08-07 @167 int sdif = inet_sdif(skb);
19e4e768064a87 David Ahern 2019-05-07 168 int dif = inet_iif(skb);
^1da177e4c3f41 Linus Torvalds 2005-04-16 169 struct hlist_head *head;
d13964f4490157 Patrick McHardy 2005-08-09 170 int delivered = 0;
6862039427583c Eric Dumazet 2022-06-17 171 struct sock *sk;
^1da177e4c3f41 Linus Torvalds 2005-04-16 172
b673e4dfc8f29e Pavel Emelyanov 2007-11-19 173 head = &raw_v4_hashinfo.ht[hash];
^1da177e4c3f41 Linus Torvalds 2005-04-16 174 if (hlist_empty(head))
6862039427583c Eric Dumazet 2022-06-17 175 return 0;
6862039427583c Eric Dumazet 2022-06-17 176 read_lock(&raw_v4_hashinfo.lock);
6862039427583c Eric Dumazet 2022-06-17 177 sk_for_each(sk, head) {
6862039427583c Eric Dumazet 2022-06-17 178 if (!raw_v4_match(net, sk, iph->protocol,
6862039427583c Eric Dumazet 2022-06-17 179 iph->saddr, iph->daddr, dif, sdif))
6862039427583c Eric Dumazet 2022-06-17 180 continue;
d13964f4490157 Patrick McHardy 2005-08-09 181 delivered = 1;
f5220d63991f3f Quentin Armitage 2014-07-23 182 if ((iph->protocol != IPPROTO_ICMP || !icmp_filter(sk, skb)) &&
f5220d63991f3f Quentin Armitage 2014-07-23 183 ip_mc_sf_allow(sk, iph->daddr, iph->saddr,
60d9b031412435 David Ahern 2017-08-07 184 skb->dev->ifindex, sdif)) {
^1da177e4c3f41 Linus Torvalds 2005-04-16 185 struct sk_buff *clone = skb_clone(skb, GFP_ATOMIC);
^1da177e4c3f41 Linus Torvalds 2005-04-16 186
^1da177e4c3f41 Linus Torvalds 2005-04-16 187 /* Not releasing hash table! */
^1da177e4c3f41 Linus Torvalds 2005-04-16 188 if (clone)
^1da177e4c3f41 Linus Torvalds 2005-04-16 189 raw_rcv(sk, clone);
^1da177e4c3f41 Linus Torvalds 2005-04-16 190 }
^1da177e4c3f41 Linus Torvalds 2005-04-16 191 }
b673e4dfc8f29e Pavel Emelyanov 2007-11-19 192 read_unlock(&raw_v4_hashinfo.lock);
d13964f4490157 Patrick McHardy 2005-08-09 193 return delivered;
^1da177e4c3f41 Linus Torvalds 2005-04-16 194 }
^1da177e4c3f41 Linus Torvalds 2005-04-16 195
--
0-DAY CI Kernel Test Service
https://01.org/lkp
next prev parent reply other threads:[~2022-06-18 2:02 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-06-17 20:10 [PATCH net-next 0/2] raw: RCU conversion Eric Dumazet
2022-06-17 20:10 ` [PATCH net-next 1/2] raw: use more conventional iterators Eric Dumazet
2022-06-18 0:57 ` kernel test robot
2022-06-18 0:57 ` kernel test robot
2022-06-18 2:01 ` kernel test robot [this message]
2022-06-17 20:10 ` [PATCH net-next 2/2] raw: convert raw sockets to RCU Eric Dumazet
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=202206180947.vsH21eY4-lkp@intel.com \
--to=lkp@intel.com \
--cc=davem@davemloft.net \
--cc=edumazet@google.com \
--cc=eric.dumazet@gmail.com \
--cc=kbuild-all@lists.01.org \
--cc=kuba@kernel.org \
--cc=netdev@vger.kernel.org \
--cc=pabeni@redhat.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