From: kernel test robot <lkp@intel.com>
To: Eric Dumazet <edumazet@google.com>,
"David S . Miller" <davem@davemloft.net>,
Jakub Kicinski <kuba@kernel.org>, Paolo Abeni <pabeni@redhat.com>
Cc: llvm@lists.linux.dev, oe-kbuild-all@lists.linux.dev,
netdev@vger.kernel.org, Simon Horman <horms@kernel.org>,
David Ahern <dsahern@kernel.org>,
Kuniyuki Iwashima <kuniyu@amazon.com>,
eric.dumazet@gmail.com, Eric Dumazet <edumazet@google.com>
Subject: Re: [PATCH net-next 2/4] inetpeer: remove create argument of inet_getpeer()
Date: Sat, 14 Dec 2024 22:34:40 +0800 [thread overview]
Message-ID: <202412142229.7lFHEOun-lkp@intel.com> (raw)
In-Reply-To: <20241213130212.1783302-3-edumazet@google.com>
Hi Eric,
kernel test robot noticed the following build warnings:
[auto build test WARNING on net-next/main]
url: https://github.com/intel-lab-lkp/linux/commits/Eric-Dumazet/inetpeer-remove-create-argument-of-inet_getpeer_v-46/20241213-210500
base: net-next/main
patch link: https://lore.kernel.org/r/20241213130212.1783302-3-edumazet%40google.com
patch subject: [PATCH net-next 2/4] inetpeer: remove create argument of inet_getpeer()
config: i386-buildonly-randconfig-003-20241214 (https://download.01.org/0day-ci/archive/20241214/202412142229.7lFHEOun-lkp@intel.com/config)
compiler: clang version 19.1.3 (https://github.com/llvm/llvm-project ab51eccf88f5321e7c60591c5546b254b6afab99)
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20241214/202412142229.7lFHEOun-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/202412142229.7lFHEOun-lkp@intel.com/
All warnings (new ones prefixed by >>):
In file included from net/ipv4/inetpeer.c:19:
In file included from include/linux/mm.h:2223:
include/linux/vmstat.h:518:36: warning: arithmetic between different enumeration types ('enum node_stat_item' and 'enum lru_list') [-Wenum-enum-conversion]
518 | return node_stat_name(NR_LRU_BASE + lru) + 3; // skip "nr_"
| ~~~~~~~~~~~ ^ ~~~
>> net/ipv4/inetpeer.c:177:6: warning: variable 'invalidated' set but not used [-Wunused-but-set-variable]
177 | int invalidated;
| ^
2 warnings generated.
vim +/invalidated +177 net/ipv4/inetpeer.c
^1da177e4c3f41 Linus Torvalds 2005-04-16 170
c0efc887dcadbd David S. Miller 2012-06-09 171 struct inet_peer *inet_getpeer(struct inet_peer_base *base,
4a6cb3d13bf1f8 Eric Dumazet 2024-12-13 172 const struct inetpeer_addr *daddr)
^1da177e4c3f41 Linus Torvalds 2005-04-16 173 {
b145425f269a17 Eric Dumazet 2017-07-17 174 struct inet_peer *p, *gc_stack[PEER_MAX_GC];
b145425f269a17 Eric Dumazet 2017-07-17 175 struct rb_node **pp, *parent;
b145425f269a17 Eric Dumazet 2017-07-17 176 unsigned int gc_cnt, seq;
b145425f269a17 Eric Dumazet 2017-07-17 @177 int invalidated;
^1da177e4c3f41 Linus Torvalds 2005-04-16 178
4b9d9be839fdb7 Eric Dumazet 2011-06-08 179 /* Attempt a lockless lookup first.
aa1039e73cc2cf Eric Dumazet 2010-06-15 180 * Because of a concurrent writer, we might not find an existing entry.
aa1039e73cc2cf Eric Dumazet 2010-06-15 181 */
7b46ac4e77f322 David S. Miller 2011-03-08 182 rcu_read_lock();
b145425f269a17 Eric Dumazet 2017-07-17 183 seq = read_seqbegin(&base->lock);
b145425f269a17 Eric Dumazet 2017-07-17 184 p = lookup(daddr, base, seq, NULL, &gc_cnt, &parent, &pp);
b145425f269a17 Eric Dumazet 2017-07-17 185 invalidated = read_seqretry(&base->lock, seq);
7b46ac4e77f322 David S. Miller 2011-03-08 186 rcu_read_unlock();
^1da177e4c3f41 Linus Torvalds 2005-04-16 187
4b9d9be839fdb7 Eric Dumazet 2011-06-08 188 if (p)
aa1039e73cc2cf Eric Dumazet 2010-06-15 189 return p;
aa1039e73cc2cf Eric Dumazet 2010-06-15 190
aa1039e73cc2cf Eric Dumazet 2010-06-15 191 /* retry an exact lookup, taking the lock before.
aa1039e73cc2cf Eric Dumazet 2010-06-15 192 * At least, nodes should be hot in our cache.
aa1039e73cc2cf Eric Dumazet 2010-06-15 193 */
b145425f269a17 Eric Dumazet 2017-07-17 194 parent = NULL;
65e8354ec13a45 Eric Dumazet 2011-03-04 195 write_seqlock_bh(&base->lock);
b145425f269a17 Eric Dumazet 2017-07-17 196
b145425f269a17 Eric Dumazet 2017-07-17 197 gc_cnt = 0;
b145425f269a17 Eric Dumazet 2017-07-17 198 p = lookup(daddr, base, seq, gc_stack, &gc_cnt, &parent, &pp);
4a6cb3d13bf1f8 Eric Dumazet 2024-12-13 199 if (!p) {
b145425f269a17 Eric Dumazet 2017-07-17 200 p = kmem_cache_alloc(peer_cachep, GFP_ATOMIC);
aa1039e73cc2cf Eric Dumazet 2010-06-15 201 if (p) {
b534ecf1cd26f0 David S. Miller 2010-11-30 202 p->daddr = *daddr;
b6a37e5e25414d Eric Dumazet 2018-04-09 203 p->dtime = (__u32)jiffies;
1cc9a98b59ba92 Reshetova, Elena 2017-06-30 204 refcount_set(&p->refcnt, 2);
aa1039e73cc2cf Eric Dumazet 2010-06-15 205 atomic_set(&p->rid, 0);
144001bddcb4db David S. Miller 2011-01-27 206 p->metrics[RTAX_LOCK-1] = INETPEER_METRICS_NEW;
92d8682926342d David S. Miller 2011-02-04 207 p->rate_tokens = 0;
c09551c6ff7fe1 Lorenzo Bianconi 2019-02-06 208 p->n_redirects = 0;
bc9259a8bae9e8 Nicolas Dichtel 2012-09-27 209 /* 60*HZ is arbitrary, but chosen enough high so that the first
bc9259a8bae9e8 Nicolas Dichtel 2012-09-27 210 * calculation of tokens is at its maximum.
bc9259a8bae9e8 Nicolas Dichtel 2012-09-27 211 */
bc9259a8bae9e8 Nicolas Dichtel 2012-09-27 212 p->rate_last = jiffies - 60*HZ;
^1da177e4c3f41 Linus Torvalds 2005-04-16 213
b145425f269a17 Eric Dumazet 2017-07-17 214 rb_link_node(&p->rb_node, parent, pp);
b145425f269a17 Eric Dumazet 2017-07-17 215 rb_insert_color(&p->rb_node, &base->rb_root);
98158f5a853caf David S. Miller 2010-11-30 216 base->total++;
aa1039e73cc2cf Eric Dumazet 2010-06-15 217 }
b145425f269a17 Eric Dumazet 2017-07-17 218 }
b145425f269a17 Eric Dumazet 2017-07-17 219 if (gc_cnt)
b145425f269a17 Eric Dumazet 2017-07-17 220 inet_peer_gc(base, gc_stack, gc_cnt);
65e8354ec13a45 Eric Dumazet 2011-03-04 221 write_sequnlock_bh(&base->lock);
^1da177e4c3f41 Linus Torvalds 2005-04-16 222
^1da177e4c3f41 Linus Torvalds 2005-04-16 223 return p;
^1da177e4c3f41 Linus Torvalds 2005-04-16 224 }
b3419363808f24 David S. Miller 2010-11-30 225 EXPORT_SYMBOL_GPL(inet_getpeer);
98158f5a853caf David S. Miller 2010-11-30 226
--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki
next prev parent reply other threads:[~2024-12-14 14:35 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-12-13 13:02 [PATCH net-next 0/4] inetpeer: reduce false sharing and atomic operations Eric Dumazet
2024-12-13 13:02 ` [PATCH net-next 1/4] inetpeer: remove create argument of inet_getpeer_v[46]() Eric Dumazet
2024-12-13 13:02 ` [PATCH net-next 2/4] inetpeer: remove create argument of inet_getpeer() Eric Dumazet
2024-12-13 20:16 ` Simon Horman
2024-12-13 20:47 ` Eric Dumazet
2024-12-14 14:34 ` kernel test robot [this message]
2024-12-13 13:02 ` [PATCH net-next 3/4] inetpeer: update inetpeer timestamp in inet_getpeer() Eric Dumazet
2024-12-15 15:34 ` Ido Schimmel
2024-12-13 13:02 ` [PATCH net-next 4/4] inetpeer: do not get a refcount " Eric Dumazet
2024-12-15 15:48 ` Ido Schimmel
2024-12-15 17:42 ` 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=202412142229.7lFHEOun-lkp@intel.com \
--to=lkp@intel.com \
--cc=davem@davemloft.net \
--cc=dsahern@kernel.org \
--cc=edumazet@google.com \
--cc=eric.dumazet@gmail.com \
--cc=horms@kernel.org \
--cc=kuba@kernel.org \
--cc=kuniyu@amazon.com \
--cc=llvm@lists.linux.dev \
--cc=netdev@vger.kernel.org \
--cc=oe-kbuild-all@lists.linux.dev \
--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 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.