[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <202507171204.xrYX6hPj-lkp@intel.com>
Date: Thu, 17 Jul 2025 12:35:06 +0800
From: kernel test robot <lkp@...el.com>
To: carlos.bilbao@...nel.org, jv@...sburgh.net, andrew+netdev@...n.ch,
davem@...emloft.net, edumazet@...gle.com, kuba@...nel.org,
pabeni@...hat.com, horms@...nel.org, netdev@...r.kernel.org,
linux-kernel@...r.kernel.org
Cc: llvm@...ts.linux.dev, oe-kbuild-all@...ts.linux.dev,
sforshee@...nel.org, bilbao@...edu,
Carlos Bilbao <carlos.bilbao@...nel.org>
Subject: Re: [PATCH] bonding: Switch periodic LACPDU state machine from
counter to jiffies
Hi,
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-rc6 next-20250716]
[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/carlos-bilbao-kernel-org/bonding-Switch-periodic-LACPDU-state-machine-from-counter-to-jiffies/20250716-045912
base: net-next/main
patch link: https://lore.kernel.org/r/20250715205733.50911-1-carlos.bilbao%40kernel.org
patch subject: [PATCH] bonding: Switch periodic LACPDU state machine from counter to jiffies
config: i386-randconfig-017-20250717 (https://download.01.org/0day-ci/archive/20250717/202507171204.xrYX6hPj-lkp@intel.com/config)
compiler: clang version 20.1.8 (https://github.com/llvm/llvm-project 87f0227cb60147a26a1eeb4fb06e3b505e9c7261)
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20250717/202507171204.xrYX6hPj-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/202507171204.xrYX6hPj-lkp@intel.com/
All warnings (new ones prefixed by >>):
>> drivers/net/bonding/bond_3ad.c:1484:3: warning: unannotated fall-through between switch labels [-Wimplicit-fallthrough]
1484 | default:
| ^
drivers/net/bonding/bond_3ad.c:1484:3: note: insert 'break;' to avoid fall-through
1484 | default:
| ^
| break;
1 warning generated.
vim +1484 drivers/net/bonding/bond_3ad.c
^1da177e4c3f41 Linus Torvalds 2005-04-16 1416
^1da177e4c3f41 Linus Torvalds 2005-04-16 1417 /**
^1da177e4c3f41 Linus Torvalds 2005-04-16 1418 * ad_periodic_machine - handle a port's periodic state machine
^1da177e4c3f41 Linus Torvalds 2005-04-16 1419 * @port: the port we're looking at
3a755cd8b7c601 Hangbin Liu 2021-08-02 1420 * @bond_params: bond parameters we will use
^1da177e4c3f41 Linus Torvalds 2005-04-16 1421 *
^1da177e4c3f41 Linus Torvalds 2005-04-16 1422 * Turn ntt flag on priodically to perform periodic transmission of lacpdu's.
^1da177e4c3f41 Linus Torvalds 2005-04-16 1423 */
bbef56d861f103 Colin Ian King 2021-09-07 1424 static void ad_periodic_machine(struct port *port, struct bond_params *bond_params)
^1da177e4c3f41 Linus Torvalds 2005-04-16 1425 {
^1da177e4c3f41 Linus Torvalds 2005-04-16 1426 periodic_states_t last_state;
^1da177e4c3f41 Linus Torvalds 2005-04-16 1427
3bf2d28a2d7112 Veaceslav Falico 2014-01-08 1428 /* keep current state machine state to compare later if it was changed */
^1da177e4c3f41 Linus Torvalds 2005-04-16 1429 last_state = port->sm_periodic_state;
^1da177e4c3f41 Linus Torvalds 2005-04-16 1430
3bf2d28a2d7112 Veaceslav Falico 2014-01-08 1431 /* check if port was reinitialized */
^1da177e4c3f41 Linus Torvalds 2005-04-16 1432 if (((port->sm_vars & AD_PORT_BEGIN) || !(port->sm_vars & AD_PORT_LACP_ENABLED) || !port->is_enabled) ||
3a755cd8b7c601 Hangbin Liu 2021-08-02 1433 (!(port->actor_oper_port_state & LACP_STATE_LACP_ACTIVITY) && !(port->partner_oper.port_state & LACP_STATE_LACP_ACTIVITY)) ||
bbef56d861f103 Colin Ian King 2021-09-07 1434 !bond_params->lacp_active) {
3bf2d28a2d7112 Veaceslav Falico 2014-01-08 1435 port->sm_periodic_state = AD_NO_PERIODIC;
a117d493f00ee2 Carlos Bilbao 2025-07-15 1436 } else if (port->sm_periodic_state == AD_NO_PERIODIC)
a117d493f00ee2 Carlos Bilbao 2025-07-15 1437 port->sm_periodic_state = AD_FAST_PERIODIC;
3bf2d28a2d7112 Veaceslav Falico 2014-01-08 1438 /* check if periodic state machine expired */
a117d493f00ee2 Carlos Bilbao 2025-07-15 1439 else if (time_after_eq(jiffies, port->sm_periodic_next_jiffies)) {
3bf2d28a2d7112 Veaceslav Falico 2014-01-08 1440 /* if expired then do tx */
3bf2d28a2d7112 Veaceslav Falico 2014-01-08 1441 port->sm_periodic_state = AD_PERIODIC_TX;
^1da177e4c3f41 Linus Torvalds 2005-04-16 1442 } else {
3bf2d28a2d7112 Veaceslav Falico 2014-01-08 1443 /* If not expired, check if there is some new timeout
3bf2d28a2d7112 Veaceslav Falico 2014-01-08 1444 * parameter from the partner state
3bf2d28a2d7112 Veaceslav Falico 2014-01-08 1445 */
^1da177e4c3f41 Linus Torvalds 2005-04-16 1446 switch (port->sm_periodic_state) {
^1da177e4c3f41 Linus Torvalds 2005-04-16 1447 case AD_FAST_PERIODIC:
a117d493f00ee2 Carlos Bilbao 2025-07-15 1448 if (!(port->partner_oper.port_state & LACP_STATE_LACP_TIMEOUT))
3bf2d28a2d7112 Veaceslav Falico 2014-01-08 1449 port->sm_periodic_state = AD_SLOW_PERIODIC;
^1da177e4c3f41 Linus Torvalds 2005-04-16 1450 break;
^1da177e4c3f41 Linus Torvalds 2005-04-16 1451 case AD_SLOW_PERIODIC:
a117d493f00ee2 Carlos Bilbao 2025-07-15 1452 if ((port->partner_oper.port_state & LACP_STATE_LACP_TIMEOUT))
3bf2d28a2d7112 Veaceslav Falico 2014-01-08 1453 port->sm_periodic_state = AD_PERIODIC_TX;
^1da177e4c3f41 Linus Torvalds 2005-04-16 1454 break;
3bf2d28a2d7112 Veaceslav Falico 2014-01-08 1455 default:
^1da177e4c3f41 Linus Torvalds 2005-04-16 1456 break;
^1da177e4c3f41 Linus Torvalds 2005-04-16 1457 }
^1da177e4c3f41 Linus Torvalds 2005-04-16 1458 }
^1da177e4c3f41 Linus Torvalds 2005-04-16 1459
3bf2d28a2d7112 Veaceslav Falico 2014-01-08 1460 /* check if the state machine was changed */
^1da177e4c3f41 Linus Torvalds 2005-04-16 1461 if (port->sm_periodic_state != last_state) {
17720981964ac5 Jarod Wilson 2019-06-07 1462 slave_dbg(port->slave->bond->dev, port->slave->dev,
17720981964ac5 Jarod Wilson 2019-06-07 1463 "Periodic Machine: Port=%d, Last State=%d, Curr State=%d\n",
a4aee5c808fc5b Joe Perches 2009-12-13 1464 port->actor_port_number, last_state,
a4aee5c808fc5b Joe Perches 2009-12-13 1465 port->sm_periodic_state);
a117d493f00ee2 Carlos Bilbao 2025-07-15 1466
^1da177e4c3f41 Linus Torvalds 2005-04-16 1467 switch (port->sm_periodic_state) {
^1da177e4c3f41 Linus Torvalds 2005-04-16 1468 case AD_PERIODIC_TX:
d238d458a70ad1 Holger Eitzenberger 2008-12-26 1469 port->ntt = true;
a117d493f00ee2 Carlos Bilbao 2025-07-15 1470 if (!(port->partner_oper.port_state &
a117d493f00ee2 Carlos Bilbao 2025-07-15 1471 LACP_STATE_LACP_TIMEOUT))
a117d493f00ee2 Carlos Bilbao 2025-07-15 1472 port->sm_periodic_state = AD_SLOW_PERIODIC;
a117d493f00ee2 Carlos Bilbao 2025-07-15 1473 else
a117d493f00ee2 Carlos Bilbao 2025-07-15 1474 port->sm_periodic_state = AD_FAST_PERIODIC;
a117d493f00ee2 Carlos Bilbao 2025-07-15 1475 fallthrough;
a117d493f00ee2 Carlos Bilbao 2025-07-15 1476 case AD_SLOW_PERIODIC:
a117d493f00ee2 Carlos Bilbao 2025-07-15 1477 case AD_FAST_PERIODIC:
a117d493f00ee2 Carlos Bilbao 2025-07-15 1478 if (port->sm_periodic_state == AD_SLOW_PERIODIC)
a117d493f00ee2 Carlos Bilbao 2025-07-15 1479 port->sm_periodic_next_jiffies = jiffies
a117d493f00ee2 Carlos Bilbao 2025-07-15 1480 + HZ * AD_SLOW_PERIODIC_TIME;
a117d493f00ee2 Carlos Bilbao 2025-07-15 1481 else /* AD_FAST_PERIODIC */
a117d493f00ee2 Carlos Bilbao 2025-07-15 1482 port->sm_periodic_next_jiffies = jiffies
a117d493f00ee2 Carlos Bilbao 2025-07-15 1483 + HZ * AD_FAST_PERIODIC_TIME;
3bf2d28a2d7112 Veaceslav Falico 2014-01-08 @1484 default:
^1da177e4c3f41 Linus Torvalds 2005-04-16 1485 break;
^1da177e4c3f41 Linus Torvalds 2005-04-16 1486 }
^1da177e4c3f41 Linus Torvalds 2005-04-16 1487 }
^1da177e4c3f41 Linus Torvalds 2005-04-16 1488 }
^1da177e4c3f41 Linus Torvalds 2005-04-16 1489
--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki
Powered by blists - more mailing lists