Hi Paolo,
[FYI, it's a private test report for your RFC patch.]
[auto build test WARNING on net/master]
[also build test WARNING on net-next/master ipvs/master linus/master v5.13 next-20210709]
[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]
url:
https://github.com/0day-ci/linux/commits/Paolo-Abeni/veth-more-flexible-c...
base:
https://git.kernel.org/pub/scm/linux/kernel/git/davem/net.git
2b452550a203d88112eaf0ba9fc4b750a000b496
config: x86_64-rhel-8.3-kselftests (attached as .config)
compiler: gcc-9 (Debian 9.3.0-22) 9.3.0
reproduce:
# apt-get install sparse
# sparse version: v0.6.3-341-g8af24329-dirty
#
https://github.com/0day-ci/linux/commit/e778921949f8b7c673639dbf5bcf7d4f2...
git remote add linux-review
https://github.com/0day-ci/linux
git fetch --no-tags linux-review
Paolo-Abeni/veth-more-flexible-channels-number-configuration/20210709-174314
git checkout e778921949f8b7c673639dbf5bcf7d4f22b7567b
# save the attached .config to linux build tree
make W=1 C=1 CF='-fdiagnostic-prefix -D__CHECK_ENDIAN__' ARCH=x86_64
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp(a)intel.com>
sparse warnings: (new ones prefixed by >>)
> drivers/net/veth.c:259:37: sparse: sparse: incorrect type in
argument 1 (different address spaces) @@ expected struct net_device const *dev @@
got struct net_device [noderef] __rcu *peer @@
drivers/net/veth.c:259:37: sparse:
expected struct net_device const *dev
drivers/net/veth.c:259:37: sparse: got struct net_device [noderef] __rcu *peer
> drivers/net/veth.c:256:51: sparse: sparse: dereference of noderef
expression
drivers/net/veth.c:260:56: sparse: sparse: dereference of noderef
expression
vim +259 drivers/net/veth.c
237
238 static int veth_set_channels(struct net_device *dev,
239 struct ethtool_channels *ch)
240 {
241 struct veth_priv *priv = netdev_priv(dev);
242 struct veth_priv *peer_priv;
243
244 /* accept changes only on rx/tx */
245 if (ch->combined_count != min(dev->real_num_rx_queues,
dev->real_num_tx_queues))
246 return -EINVAL;
247
248 /* respect contraint posed at device creation time */
249 if (ch->rx_count > dev->num_rx_queues || ch->tx_count >
dev->num_tx_queues)
250 return -EINVAL;
251
252 if (!ch->rx_count || !ch->tx_count)
253 return -EINVAL;
254
255 /* avoid braking XDP, if that is enabled */
256 if (priv->_xdp_prog && ch->rx_count <
priv->peer->real_num_tx_queues)
257 return -EINVAL;
258
259 peer_priv = netdev_priv(priv->peer);
260 if
(peer_priv->_xdp_prog && ch->tx_count >
priv->peer->real_num_rx_queues)
261 return -EINVAL;
262
263 if (netif_running(dev))
264 veth_close(dev);
265
266 priv->num_tx_queues = ch->tx_count;
267 priv->num_rx_queues = ch->rx_count;
268
269 if (netif_running(dev))
270 veth_open(dev);
271 return 0;
272 }
273
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org