Netdev Archive on lore.kernel.org
help / color / mirror / Atom feed
From: kernel test robot <lkp@intel.com>
To: Maciej Fijalkowski <maciej.fijalkowski@intel.com>,
	intel-wired-lan@lists.osuosl.org
Cc: clang-built-linux@googlegroups.com, kbuild-all@lists.01.org,
	netdev@vger.kernel.org, bpf@vger.kernel.org, davem@davemloft.net,
	anthony.l.nguyen@intel.com, kuba@kernel.org, bjorn@kernel.org,
	magnus.karlsson@intel.com, jesse.brandeburg@intel.com,
	alexandr.lobakin@intel.com
Subject: Re: [PATCH v4 intel-next 1/6] ice: split ice_ring onto Tx/Rx separate structs
Date: Sat, 7 Aug 2021 00:34:59 +0800	[thread overview]
Message-ID: <202108070003.U9G2g9hw-lkp@intel.com> (raw)
In-Reply-To: <20210806095539.34423-2-maciej.fijalkowski@intel.com>

[-- Attachment #1: Type: text/plain, Size: 4731 bytes --]

Hi Maciej,

Thank you for the patch! Perhaps something to improve:

[auto build test WARNING on ipvs/master]
[also build test WARNING on v5.14-rc4 next-20210805]
[cannot apply to tnguy-next-queue/dev-queue sparc-next/master]
[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/Maciej-Fijalkowski/XDP_TX-improvements-for-ice/20210806-181155
base:   https://git.kernel.org/pub/scm/linux/kernel/git/horms/ipvs.git master
config: x86_64-randconfig-a006-20210804 (attached as .config)
compiler: clang version 14.0.0 (https://github.com/llvm/llvm-project 42b9c2a17a0b63cccf3ac197a82f91b28e53e643)
reproduce (this is a W=1 build):
        wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
        chmod +x ~/bin/make.cross
        # https://github.com/0day-ci/linux/commit/8d6527ccf7e797a316a0ff3d8713d756ebc56e88
        git remote add linux-review https://github.com/0day-ci/linux
        git fetch --no-tags linux-review Maciej-Fijalkowski/XDP_TX-improvements-for-ice/20210806-181155
        git checkout 8d6527ccf7e797a316a0ff3d8713d756ebc56e88
        # save the attached .config to linux build tree
        COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross ARCH=x86_64 

If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@intel.com>

All warnings (new ones prefixed by >>):

>> drivers/net/ethernet/intel/ice/ice_main.c:5649:7: warning: variable 'pkts' is used uninitialized whenever 'if' condition is false [-Wsometimes-uninitialized]
                   if (ring)
                       ^~~~
   drivers/net/ethernet/intel/ice/ice_main.c:5651:28: note: uninitialized use occurs here
                   vsi_stats->tx_packets += pkts;
                                            ^~~~
   drivers/net/ethernet/intel/ice/ice_main.c:5649:3: note: remove the 'if' if its condition is always true
                   if (ring)
                   ^~~~~~~~~
   drivers/net/ethernet/intel/ice/ice_main.c:5646:11: note: initialize the variable 'pkts' to silence this warning
                   u64 pkts, bytes;
                           ^
                            = 0
>> drivers/net/ethernet/intel/ice/ice_main.c:5649:7: warning: variable 'bytes' is used uninitialized whenever 'if' condition is false [-Wsometimes-uninitialized]
                   if (ring)
                       ^~~~
   drivers/net/ethernet/intel/ice/ice_main.c:5652:26: note: uninitialized use occurs here
                   vsi_stats->tx_bytes += bytes;
                                          ^~~~~
   drivers/net/ethernet/intel/ice/ice_main.c:5649:3: note: remove the 'if' if its condition is always true
                   if (ring)
                   ^~~~~~~~~
   drivers/net/ethernet/intel/ice/ice_main.c:5646:18: note: initialize the variable 'bytes' to silence this warning
                   u64 pkts, bytes;
                                  ^
                                   = 0
   2 warnings generated.
--
>> drivers/net/ethernet/intel/ice/ice_ethtool.c:1342:7: warning: variable 'ring' is uninitialized when used here [-Wuninitialized]
                   if (ring) {
                       ^~~~
   drivers/net/ethernet/intel/ice/ice_ethtool.c:1323:23: note: initialize the variable 'ring' to silence this warning
           struct ice_ring *ring;
                                ^
                                 = NULL
   1 warning generated.


vim +5649 drivers/net/ethernet/intel/ice/ice_main.c

  5630	
  5631	/**
  5632	 * ice_update_vsi_tx_ring_stats - Update VSI Tx ring stats counters
  5633	 * @vsi: the VSI to be updated
  5634	 * @rings: rings to work on
  5635	 * @count: number of rings
  5636	 */
  5637	static void
  5638	ice_update_vsi_tx_ring_stats(struct ice_vsi *vsi, struct ice_tx_ring **rings,
  5639				     u16 count)
  5640	{
  5641		struct rtnl_link_stats64 *vsi_stats = &vsi->net_stats;
  5642		u16 i;
  5643	
  5644		for (i = 0; i < count; i++) {
  5645			struct ice_tx_ring *ring;
  5646			u64 pkts, bytes;
  5647	
  5648			ring = READ_ONCE(rings[i]);
> 5649			if (ring)
  5650				ice_fetch_u64_stats_per_ring(&ring->syncp, ring->stats, &pkts, &bytes);
  5651			vsi_stats->tx_packets += pkts;
  5652			vsi_stats->tx_bytes += bytes;
  5653			vsi->tx_restart += ring->tx_stats.restart_q;
  5654			vsi->tx_busy += ring->tx_stats.tx_busy;
  5655			vsi->tx_linearize += ring->tx_stats.tx_linearize;
  5656		}
  5657	}
  5658	

---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org

[-- Attachment #2: .config.gz --]
[-- Type: application/gzip, Size: 36478 bytes --]

  reply	other threads:[~2021-08-06 16:35 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-08-06  9:55 [PATCH v4 intel-next 0/6] XDP_TX improvements for ice Maciej Fijalkowski
2021-08-06  9:55 ` [PATCH v4 intel-next 1/6] ice: split ice_ring onto Tx/Rx separate structs Maciej Fijalkowski
2021-08-06 16:34   ` kernel test robot [this message]
2021-08-06  9:55 ` [PATCH v4 intel-next 2/6] ice: unify xdp_rings accesses Maciej Fijalkowski
2021-08-06  9:55 ` [PATCH v4 intel-next 3/6] ice: do not create xdp_frame on XDP_TX Maciej Fijalkowski
2021-08-06  9:55 ` [PATCH v4 intel-next 4/6] ice: propagate xdp_ring onto rx_ring Maciej Fijalkowski
2021-08-06  9:55 ` [PATCH v4 intel-next 5/6] ice: optimize XDP_TX workloads Maciej Fijalkowski
2021-08-06  9:55 ` [PATCH v4 intel-next 6/6] ice: introduce XDP_TX fallback path Maciej Fijalkowski

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=202108070003.U9G2g9hw-lkp@intel.com \
    --to=lkp@intel.com \
    --cc=alexandr.lobakin@intel.com \
    --cc=anthony.l.nguyen@intel.com \
    --cc=bjorn@kernel.org \
    --cc=bpf@vger.kernel.org \
    --cc=clang-built-linux@googlegroups.com \
    --cc=davem@davemloft.net \
    --cc=intel-wired-lan@lists.osuosl.org \
    --cc=jesse.brandeburg@intel.com \
    --cc=kbuild-all@lists.01.org \
    --cc=kuba@kernel.org \
    --cc=maciej.fijalkowski@intel.com \
    --cc=magnus.karlsson@intel.com \
    --cc=netdev@vger.kernel.org \
    --subject='Re: [PATCH v4 intel-next 1/6] ice: split ice_ring onto Tx/Rx separate structs' \
    /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

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).