mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: kernel test robot <lkp@intel.com>
To: carlos.bilbao@kernel.org, jv@jvosburgh.net,
	andrew+netdev@lunn.ch, davem@davemloft.net, edumazet@google.com,
	kuba@kernel.org, pabeni@redhat.com, horms@kernel.org,
	netdev@vger.kernel.org, linux-kernel@vger.kernel.org
Cc: llvm@lists.linux.dev, oe-kbuild-all@lists.linux.dev,
	sforshee@kernel.org, bilbao@vt.edu,
	Carlos Bilbao <carlos.bilbao@kernel.org>
Subject: Re: [PATCH] bonding: Switch periodic LACPDU state machine from counter to jiffies
Date: Thu, 17 Jul 2025 12:35:06 +0800	[thread overview]
Message-ID: <202507171204.xrYX6hPj-lkp@intel.com> (raw)
In-Reply-To: <20250715205733.50911-1-carlos.bilbao@kernel.org>

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

      parent reply	other threads:[~2025-07-17  4:35 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-07-15 20:57 carlos.bilbao
2025-07-15 20:59 ` Carlos Bilbao
2025-07-16 15:30   ` Jay Vosburgh
2025-07-16 19:44     ` Carlos Bilbao
2025-07-16 23:33       ` Jay Vosburgh
2025-08-05 13:14   ` Hangbin Liu
2025-09-08 21:26     ` Carlos Bilbao
2025-09-09  3:25       ` Hangbin Liu
2025-07-16  9:09 ` Simon Horman
2025-07-16 19:45   ` Carlos Bilbao
2025-07-17  4:35 ` 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=202507171204.xrYX6hPj-lkp@intel.com \
    --to=lkp@intel.com \
    --cc=andrew+netdev@lunn.ch \
    --cc=bilbao@vt.edu \
    --cc=carlos.bilbao@kernel.org \
    --cc=davem@davemloft.net \
    --cc=edumazet@google.com \
    --cc=horms@kernel.org \
    --cc=jv@jvosburgh.net \
    --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=sforshee@kernel.org \
    /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

all inboxes | Powered by JetHome®