From: kernel test robot <lkp@intel.com>
To: David Wei <dw@davidwei.uk>
Cc: llvm@lists.linux.dev, oe-kbuild-all@lists.linux.dev,
Daniel Borkmann <daniel@iogearbox.net>,
Nikolay Aleksandrov <razor@blackwall.org>
Subject: [cilium:pr/netkit-iouring6 2/2] net/core/netdev_rx_queue.c:21:6: warning: no previous prototype for function 'netdev_rx_queue_peer'
Date: Thu, 27 Nov 2025 21:00:58 +0100 [thread overview]
Message-ID: <202511272127.HJ4NxkVL-lkp@intel.com> (raw)
tree: https://github.com/cilium/linux.git pr/netkit-iouring6
head: 7bfb4fc5f460441d05b483647e4f4c59c4afaeb1
commit: 7bfb4fc5f460441d05b483647e4f4c59c4afaeb1 [2/2] net: Implement netdev_nl_bind_queue_doit
config: x86_64-kexec (https://download.01.org/0day-ci/archive/20251127/202511272127.HJ4NxkVL-lkp@intel.com/config)
compiler: clang version 20.1.8 (https://github.com/llvm/llvm-project 87f0227cb60147a26a1eeb4fb06e3b505e9c7261)
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20251127/202511272127.HJ4NxkVL-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/202511272127.HJ4NxkVL-lkp@intel.com/
All warnings (new ones prefixed by >>):
>> net/core/netdev_rx_queue.c:21:6: warning: no previous prototype for function 'netdev_rx_queue_peer' [-Wmissing-prototypes]
21 | void netdev_rx_queue_peer(struct net_device *src_dev,
| ^
net/core/netdev_rx_queue.c:21:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
21 | void netdev_rx_queue_peer(struct net_device *src_dev,
| ^
| static
>> net/core/netdev_rx_queue.c:34:6: warning: no previous prototype for function 'netdev_rx_queue_unpeer' [-Wmissing-prototypes]
34 | void netdev_rx_queue_unpeer(struct net_device *src_dev,
| ^
net/core/netdev_rx_queue.c:34:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
34 | void netdev_rx_queue_unpeer(struct net_device *src_dev,
| ^
| static
net/core/netdev_rx_queue.c:55:11: error: no member named 'peer' in 'struct netdev_rx_queue'
55 | if (rxq->peer) {
| ~~~ ^
net/core/netdev_rx_queue.c:58:14: error: no member named 'peer' in 'struct netdev_rx_queue'
58 | rxq = rxq->peer;
| ~~~ ^
>> net/core/netdev_rx_queue.c:66:1: warning: no previous prototype for function 'netif_get_rx_queue_peer_locked' [-Wmissing-prototypes]
66 | netif_get_rx_queue_peer_locked(struct net_device **dev, unsigned int *rxq_idx)
| ^
net/core/netdev_rx_queue.c:65:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
65 | struct netdev_rx_queue *
| ^
| static
>> net/core/netdev_rx_queue.c:81:6: warning: no previous prototype for function 'netif_put_rx_queue_peer_locked' [-Wmissing-prototypes]
81 | void netif_put_rx_queue_peer_locked(struct net_device *orig_dev,
| ^
net/core/netdev_rx_queue.c:81:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
81 | void netif_put_rx_queue_peer_locked(struct net_device *orig_dev,
| ^
| static
4 warnings and 2 errors generated.
vim +/netdev_rx_queue_peer +21 net/core/netdev_rx_queue.c
20
> 21 void netdev_rx_queue_peer(struct net_device *src_dev,
22 struct netdev_rx_queue *src_rxq,
23 struct netdev_rx_queue *dst_rxq)
24 {
25 netdev_assert_locked(src_dev);
26 netdev_assert_locked(dst_rxq->dev);
27
28 netdev_hold(src_dev, &src_rxq->lease_tracker, GFP_KERNEL);
29
30 WRITE_ONCE(src_rxq->lease, dst_rxq);
31 WRITE_ONCE(dst_rxq->lease, src_rxq);
32 }
33
> 34 void netdev_rx_queue_unpeer(struct net_device *src_dev,
35 struct netdev_rx_queue *src_rxq,
36 struct netdev_rx_queue *dst_rxq)
37 {
38 WARN_ON_ONCE(READ_ONCE(dst_rxq->dev->reg_state) != NETREG_UNREGISTERING);
39
40 netdev_assert_locked(dst_rxq->dev);
41 netdev_assert_locked(src_dev);
42
43 WRITE_ONCE(src_rxq->lease, NULL);
44 WRITE_ONCE(dst_rxq->lease, NULL);
45
46 netdev_put(src_dev, &src_rxq->lease_tracker);
47 }
48
49 static struct netdev_rx_queue *
50 __netif_get_rx_queue_peer(struct net_device **dev, unsigned int *rxq_idx)
51 {
52 struct net_device *orig_dev = *dev;
53 struct netdev_rx_queue *rxq = __netif_get_rx_queue(orig_dev, *rxq_idx);
54
> 55 if (rxq->peer) {
56 if (orig_dev->dev.parent)
57 return NULL;
58 rxq = rxq->peer;
59 *rxq_idx = get_netdev_rx_queue_index(rxq);
60 *dev = rxq->dev;
61 }
62 return rxq;
63 }
64
65 struct netdev_rx_queue *
> 66 netif_get_rx_queue_peer_locked(struct net_device **dev, unsigned int *rxq_idx)
67 {
68 struct net_device *orig_dev = *dev;
69 struct netdev_rx_queue *rxq;
70
71 /* Locking order is always from the virtual to the physical device
72 * see netdev_nl_bind_queue_doit().
73 */
74 netdev_ops_assert_locked(orig_dev);
75 rxq = __netif_get_rx_queue_peer(dev, rxq_idx);
76 if (rxq && orig_dev != *dev)
77 netdev_lock(*dev);
78 return rxq;
79 }
80
> 81 void netif_put_rx_queue_peer_locked(struct net_device *orig_dev,
82 struct net_device *dev)
83 {
84 if (orig_dev != dev)
85 netdev_unlock(dev);
86 }
87
--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki
reply other threads:[~2025-11-27 20:01 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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=202511272127.HJ4NxkVL-lkp@intel.com \
--to=lkp@intel.com \
--cc=daniel@iogearbox.net \
--cc=dw@davidwei.uk \
--cc=llvm@lists.linux.dev \
--cc=oe-kbuild-all@lists.linux.dev \
--cc=razor@blackwall.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