netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: kernel test robot <lkp@intel.com>
To: Jeroen de Borst <jeroendb@google.com>, netdev@vger.kernel.org
Cc: llvm@lists.linux.dev, oe-kbuild-all@lists.linux.dev,
	davem@davemloft.net, edumazet@google.com, kuba@kernel.org,
	pabeni@redhat.com, jeroendb@google.com, pkaligineedi@google.com,
	shailend@google.com, andrew+netdev@lunn.ch, willemb@google.com,
	hramamurthy@google.com, ziweixiao@google.com, horms@kernel.org,
	linux-kernel@vger.kernel.org,
	Jeroen de Borst <jeroend@google.com>
Subject: Re: [PATCH net-next v2] gve: Add RSS cache for non RSS device option scenario
Date: Thu, 6 Feb 2025 18:39:16 +0800	[thread overview]
Message-ID: <202502061802.Co0dVfXU-lkp@intel.com> (raw)
In-Reply-To: <20250204213121.14195-1-jeroendb@google.com>

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@intel.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

      parent reply	other threads:[~2025-02-06 10:40 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-02-04 21:31 [PATCH net-next v2] gve: Add RSS cache for non RSS device option scenario Jeroen de Borst
2025-02-05 16:28 ` Simon Horman
2025-02-06  6:26   ` Ziwei Xiao
2025-02-05 16:52 ` Kalesh Anakkur Purayil
2025-02-06  6:34   ` Ziwei Xiao
2025-02-06 10:39 ` kernel test robot [this message]

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=202502061802.Co0dVfXU-lkp@intel.com \
    --to=lkp@intel.com \
    --cc=andrew+netdev@lunn.ch \
    --cc=davem@davemloft.net \
    --cc=edumazet@google.com \
    --cc=horms@kernel.org \
    --cc=hramamurthy@google.com \
    --cc=jeroend@google.com \
    --cc=jeroendb@google.com \
    --cc=kuba@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=llvm@lists.linux.dev \
    --cc=netdev@vger.kernel.org \
    --cc=oe-kbuild-all@lists.linux.dev \
    --cc=pabeni@redhat.com \
    --cc=pkaligineedi@google.com \
    --cc=shailend@google.com \
    --cc=willemb@google.com \
    --cc=ziweixiao@google.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;
as well as URLs for NNTP newsgroup(s).