Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

bonding: don't force LACPDU tx to ~333 ms boundaries

The timer which ensures that no more than 3 LACPDUs are transmitted in
a second rearms itself every 333ms regardless of whether an LACPDU is
transmitted when the timer expires. This causes LACPDU tx to be delayed
until the next expiration of the timer, which effectively aligns LACPDUs
to ~333ms boundaries. This results in a variable amount of jitter in the
timing of periodic LACPDUs.

Change this to only rearm the timer when an LACPDU is actually sent,
allowing tx at any point after the timer has expired.

Signed-off-by: Seth Forshee (DigitalOcean) <sforshee@kernel.org>
Reviewed-by: Carlos Bilbao <carlos.bilbao@kernel.org>
Link: https://patch.msgid.link/20250625-fix-lacpdu-jitter-v1-1-4d0ee627e1ba@kernel.org
Signed-off-by: Paolo Abeni <pabeni@redhat.com>

authored by

Seth Forshee (DigitalOcean) and committed by
Paolo Abeni
135faae6 8b98f34c

+6 -5
+6 -5
drivers/net/bonding/bond_3ad.c
··· 1378 1378 /* check if tx timer expired, to verify that we do not send more than 1379 1379 * 3 packets per second 1380 1380 */ 1381 - if (port->sm_tx_timer_counter && !(--port->sm_tx_timer_counter)) { 1381 + if (!port->sm_tx_timer_counter || !(--port->sm_tx_timer_counter)) { 1382 1382 /* check if there is something to send */ 1383 1383 if (port->ntt && (port->sm_vars & AD_PORT_LACP_ENABLED)) { 1384 1384 __update_lacpdu_from_port(port); ··· 1393 1393 * again until demanded 1394 1394 */ 1395 1395 port->ntt = false; 1396 + 1397 + /* restart tx timer(to verify that we will not 1398 + * exceed AD_MAX_TX_IN_SECOND 1399 + */ 1400 + port->sm_tx_timer_counter = ad_ticks_per_sec / AD_MAX_TX_IN_SECOND; 1396 1401 } 1397 1402 } 1398 - /* restart tx timer(to verify that we will not exceed 1399 - * AD_MAX_TX_IN_SECOND 1400 - */ 1401 - port->sm_tx_timer_counter = ad_ticks_per_sec/AD_MAX_TX_IN_SECOND; 1402 1403 } 1403 1404 } 1404 1405