netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: kernel test robot <lkp@intel.com>
To: Alok Tiwari <alok.a.tiwari@oracle.com>,
	sgoutham@marvell.com, andrew+netdev@lunn.ch, davem@davemloft.net,
	edumazet@google.com, kuba@kernel.org, pabeni@redhat.com,
	horms@kernel.org, netdev@vger.kernel.org
Cc: oe-kbuild-all@lists.linux.dev, alok.a.tiwari@oracle.com,
	linux-arm-kernel@lists.infradead.org,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH] net: thunderx: avoid direct MTU assignment after WRITE_ONCE()
Date: Sun, 29 Jun 2025 01:43:30 +0800	[thread overview]
Message-ID: <202506290114.0EPFmc8U-lkp@intel.com> (raw)
In-Reply-To: <20250628095221.461991-1-alok.a.tiwari@oracle.com>

Hi Alok,

kernel test robot noticed the following build warnings:

[auto build test WARNING on net-next/main]
[also build test WARNING on net/main linus/master v6.16-rc3 next-20250627]
[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#_base_tree_information]

url:    https://github.com/intel-lab-lkp/linux/commits/Alok-Tiwari/net-thunderx-avoid-direct-MTU-assignment-after-WRITE_ONCE/20250628-175420
base:   net-next/main
patch link:    https://lore.kernel.org/r/20250628095221.461991-1-alok.a.tiwari%40oracle.com
patch subject: [PATCH] net: thunderx: avoid direct MTU assignment after WRITE_ONCE()
config: x86_64-buildonly-randconfig-006-20250628 (https://download.01.org/0day-ci/archive/20250629/202506290114.0EPFmc8U-lkp@intel.com/config)
compiler: gcc-12 (Debian 12.2.0-14+deb12u1) 12.2.0
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20250629/202506290114.0EPFmc8U-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/202506290114.0EPFmc8U-lkp@intel.com/

All warnings (new ones prefixed by >>):

   drivers/net/ethernet/cavium/thunder/nicvf_main.c: In function 'nicvf_change_mtu':
>> drivers/net/ethernet/cavium/thunder/nicvf_main.c:1581:13: warning: unused variable 'orig_mtu' [-Wunused-variable]
    1581 |         int orig_mtu = netdev->mtu;
         |             ^~~~~~~~


vim +/orig_mtu +1581 drivers/net/ethernet/cavium/thunder/nicvf_main.c

4863dea3fab0173 Sunil Goutham   2015-05-26  1577  
4863dea3fab0173 Sunil Goutham   2015-05-26  1578  static int nicvf_change_mtu(struct net_device *netdev, int new_mtu)
4863dea3fab0173 Sunil Goutham   2015-05-26  1579  {
4863dea3fab0173 Sunil Goutham   2015-05-26  1580  	struct nicvf *nic = netdev_priv(netdev);
f9aa9dc7d2d00e6 David S. Miller 2016-11-22 @1581  	int orig_mtu = netdev->mtu;
4863dea3fab0173 Sunil Goutham   2015-05-26  1582  
1f227d16083b2e2 Matteo Croce    2019-04-11  1583  	/* For now just support only the usual MTU sized frames,
1f227d16083b2e2 Matteo Croce    2019-04-11  1584  	 * plus some headroom for VLAN, QinQ.
1f227d16083b2e2 Matteo Croce    2019-04-11  1585  	 */
1f227d16083b2e2 Matteo Croce    2019-04-11  1586  	if (nic->xdp_prog && new_mtu > MAX_XDP_MTU) {
1f227d16083b2e2 Matteo Croce    2019-04-11  1587  		netdev_warn(netdev, "Jumbo frames not yet supported with XDP, current MTU %d.\n",
1f227d16083b2e2 Matteo Croce    2019-04-11  1588  			    netdev->mtu);
1f227d16083b2e2 Matteo Croce    2019-04-11  1589  		return -EINVAL;
1f227d16083b2e2 Matteo Croce    2019-04-11  1590  	}
1f227d16083b2e2 Matteo Croce    2019-04-11  1591  
712c3185344050c Sunil Goutham   2016-11-15  1592  
8be8a2ba18f34d5 Alok Tiwari     2025-06-28  1593  	if (!netif_running(netdev)) {
8be8a2ba18f34d5 Alok Tiwari     2025-06-28  1594  		WRITE_ONCE(netdev->mtu, new_mtu);
712c3185344050c Sunil Goutham   2016-11-15  1595  		return 0;
8be8a2ba18f34d5 Alok Tiwari     2025-06-28  1596  	}
712c3185344050c Sunil Goutham   2016-11-15  1597  
f9aa9dc7d2d00e6 David S. Miller 2016-11-22  1598  	if (nicvf_update_hw_max_frs(nic, new_mtu)) {
4863dea3fab0173 Sunil Goutham   2015-05-26  1599  		return -EINVAL;
f9aa9dc7d2d00e6 David S. Miller 2016-11-22  1600  	}
4863dea3fab0173 Sunil Goutham   2015-05-26  1601  
8be8a2ba18f34d5 Alok Tiwari     2025-06-28  1602  	WRITE_ONCE(netdev->mtu, new_mtu);
8be8a2ba18f34d5 Alok Tiwari     2025-06-28  1603  
4863dea3fab0173 Sunil Goutham   2015-05-26  1604  	return 0;
4863dea3fab0173 Sunil Goutham   2015-05-26  1605  }
4863dea3fab0173 Sunil Goutham   2015-05-26  1606  

-- 
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki

      reply	other threads:[~2025-06-28 17:43 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-06-28  9:52 [PATCH] net: thunderx: avoid direct MTU assignment after WRITE_ONCE() Alok Tiwari
2025-06-28 17:43 ` 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=202506290114.0EPFmc8U-lkp@intel.com \
    --to=lkp@intel.com \
    --cc=alok.a.tiwari@oracle.com \
    --cc=andrew+netdev@lunn.ch \
    --cc=davem@davemloft.net \
    --cc=edumazet@google.com \
    --cc=horms@kernel.org \
    --cc=kuba@kernel.org \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=netdev@vger.kernel.org \
    --cc=oe-kbuild-all@lists.linux.dev \
    --cc=pabeni@redhat.com \
    --cc=sgoutham@marvell.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).