[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <202506290114.0EPFmc8U-lkp@intel.com>
Date: Sun, 29 Jun 2025 01:43:30 +0800
From: kernel test robot <lkp@...el.com>
To: Alok Tiwari <alok.a.tiwari@...cle.com>, sgoutham@...vell.com,
andrew+netdev@...n.ch, davem@...emloft.net, edumazet@...gle.com,
kuba@...nel.org, pabeni@...hat.com, horms@...nel.org,
netdev@...r.kernel.org
Cc: oe-kbuild-all@...ts.linux.dev, alok.a.tiwari@...cle.com,
linux-arm-kernel@...ts.infradead.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH] net: thunderx: avoid direct MTU assignment after
WRITE_ONCE()
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@...el.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
Powered by blists - more mailing lists