[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <202502061802.Co0dVfXU-lkp@intel.com>
Date: Thu, 6 Feb 2025 18:39:16 +0800
From: kernel test robot <lkp@...el.com>
To: Jeroen de Borst <jeroendb@...gle.com>, netdev@...r.kernel.org
Cc: llvm@...ts.linux.dev, oe-kbuild-all@...ts.linux.dev,
davem@...emloft.net, edumazet@...gle.com, kuba@...nel.org,
pabeni@...hat.com, jeroendb@...gle.com, pkaligineedi@...gle.com,
shailend@...gle.com, andrew+netdev@...n.ch, willemb@...gle.com,
hramamurthy@...gle.com, ziweixiao@...gle.com, horms@...nel.org,
linux-kernel@...r.kernel.org, Jeroen de Borst <jeroend@...gle.com>
Subject: Re: [PATCH net-next v2] gve: Add RSS cache for non RSS device option
scenario
Hi Jeroen,
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/Jeroen-de-Borst/gve-Add-RSS-cache-for-non-RSS-device-option-scenario/20250205-053317
base: net-next/main
patch link: https://lore.kernel.org/r/20250204213121.14195-1-jeroendb%40google.com
patch subject: [PATCH net-next v2] gve: Add RSS cache for non RSS device option scenario
config: x86_64-allyesconfig (https://download.01.org/0day-ci/archive/20250206/202502061802.Co0dVfXU-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/20250206/202502061802.Co0dVfXU-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@...el.com>
| Closes: https://lore.kernel.org/oe-kbuild-all/202502061802.Co0dVfXU-lkp@intel.com/
All warnings (new ones prefixed by >>):
In file included from drivers/net/ethernet/google/gve/gve_ethtool.c:7:
In file included from include/linux/rtnetlink.h:7:
In file included from include/linux/netdevice.h:38:
In file included from include/net/net_namespace.h:43:
In file included from include/linux/skbuff.h:17:
In file included from include/linux/bvec.h:10:
In file included from include/linux/highmem.h:8:
In file included from include/linux/cacheflush.h:5:
In file included from arch/x86/include/asm/cacheflush.h:5:
In file included from include/linux/mm.h:2224:
include/linux/vmstat.h:504:43: warning: arithmetic between different enumeration types ('enum zone_stat_item' and 'enum numa_stat_item') [-Wenum-enum-conversion]
504 | return vmstat_text[NR_VM_ZONE_STAT_ITEMS +
| ~~~~~~~~~~~~~~~~~~~~~ ^
505 | item];
| ~~~~
include/linux/vmstat.h:511:43: warning: arithmetic between different enumeration types ('enum zone_stat_item' and 'enum numa_stat_item') [-Wenum-enum-conversion]
511 | return vmstat_text[NR_VM_ZONE_STAT_ITEMS +
| ~~~~~~~~~~~~~~~~~~~~~ ^
512 | NR_VM_NUMA_EVENT_ITEMS +
| ~~~~~~~~~~~~~~~~~~~~~~
include/linux/vmstat.h:524:43: warning: arithmetic between different enumeration types ('enum zone_stat_item' and 'enum numa_stat_item') [-Wenum-enum-conversion]
524 | return vmstat_text[NR_VM_ZONE_STAT_ITEMS +
| ~~~~~~~~~~~~~~~~~~~~~ ^
525 | NR_VM_NUMA_EVENT_ITEMS +
| ~~~~~~~~~~~~~~~~~~~~~~
>> drivers/net/ethernet/google/gve/gve_ethtool.c:502:6: warning: variable 'reset_rss' is used uninitialized whenever 'if' condition is false [-Wsometimes-uninitialized]
502 | if (new_rx != priv->rx_cfg.num_queues &&
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
503 | priv->cache_rss_config && !netif_is_rxfh_configured(netdev))
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
drivers/net/ethernet/google/gve/gve_ethtool.c:509:57: note: uninitialized use occurs here
509 | return gve_adjust_queues(priv, new_rx_cfg, new_tx_cfg, reset_rss);
| ^~~~~~~~~
drivers/net/ethernet/google/gve/gve_ethtool.c:502:2: note: remove the 'if' if its condition is always true
502 | if (new_rx != priv->rx_cfg.num_queues &&
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
503 | priv->cache_rss_config && !netif_is_rxfh_configured(netdev))
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
504 | reset_rss = true;
>> drivers/net/ethernet/google/gve/gve_ethtool.c:502:6: warning: variable 'reset_rss' is used uninitialized whenever '&&' condition is false [-Wsometimes-uninitialized]
502 | if (new_rx != priv->rx_cfg.num_queues &&
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
503 | priv->cache_rss_config && !netif_is_rxfh_configured(netdev))
| ~~~~~~~~~~~~~~~~~~~~~~
drivers/net/ethernet/google/gve/gve_ethtool.c:509:57: note: uninitialized use occurs here
509 | return gve_adjust_queues(priv, new_rx_cfg, new_tx_cfg, reset_rss);
| ^~~~~~~~~
drivers/net/ethernet/google/gve/gve_ethtool.c:502:6: note: remove the '&&' if its condition is always true
502 | if (new_rx != priv->rx_cfg.num_queues &&
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
503 | priv->cache_rss_config && !netif_is_rxfh_configured(netdev))
| ~~~~~~~~~~~~~~~~~~~~~~~~~
>> drivers/net/ethernet/google/gve/gve_ethtool.c:502:6: warning: variable 'reset_rss' is used uninitialized whenever '&&' condition is false [-Wsometimes-uninitialized]
502 | if (new_rx != priv->rx_cfg.num_queues &&
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
drivers/net/ethernet/google/gve/gve_ethtool.c:509:57: note: uninitialized use occurs here
509 | return gve_adjust_queues(priv, new_rx_cfg, new_tx_cfg, reset_rss);
| ^~~~~~~~~
drivers/net/ethernet/google/gve/gve_ethtool.c:502:6: note: remove the '&&' if its condition is always true
502 | if (new_rx != priv->rx_cfg.num_queues &&
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
drivers/net/ethernet/google/gve/gve_ethtool.c:485:16: note: initialize the variable 'reset_rss' to silence this warning
485 | bool reset_rss;
| ^
| = 0
6 warnings generated.
vim +502 drivers/net/ethernet/google/gve/gve_ethtool.c
475
476 static int gve_set_channels(struct net_device *netdev,
477 struct ethtool_channels *cmd)
478 {
479 struct gve_priv *priv = netdev_priv(netdev);
480 struct gve_queue_config new_tx_cfg = priv->tx_cfg;
481 struct gve_queue_config new_rx_cfg = priv->rx_cfg;
482 struct ethtool_channels old_settings;
483 int new_tx = cmd->tx_count;
484 int new_rx = cmd->rx_count;
485 bool reset_rss;
486
487 gve_get_channels(netdev, &old_settings);
488
489 /* Changing combined is not allowed */
490 if (cmd->combined_count != old_settings.combined_count)
491 return -EINVAL;
492
493 if (!new_rx || !new_tx)
494 return -EINVAL;
495
496 if (priv->num_xdp_queues &&
497 (new_tx != new_rx || (2 * new_tx > priv->tx_cfg.max_queues))) {
498 dev_err(&priv->pdev->dev, "XDP load failed: The number of configured RX queues should be equal to the number of configured TX queues and the number of configured RX/TX queues should be less than or equal to half the maximum number of RX/TX queues");
499 return -EINVAL;
500 }
501
> 502 if (new_rx != priv->rx_cfg.num_queues &&
503 priv->cache_rss_config && !netif_is_rxfh_configured(netdev))
504 reset_rss = true;
505
506 new_tx_cfg.num_queues = new_tx;
507 new_rx_cfg.num_queues = new_rx;
508
> 509 return gve_adjust_queues(priv, new_rx_cfg, new_tx_cfg, reset_rss);
510 }
511
--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki
Powered by blists - more mailing lists