mirror of
https://github.com/torvalds/linux.git
synced 2026-06-04 04:23:35 +02:00
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>
This commit is contained in:
parent
8b98f34ce1
commit
135faae632
|
|
@ -1378,7 +1378,7 @@ static void ad_tx_machine(struct port *port)
|
|||
/* check if tx timer expired, to verify that we do not send more than
|
||||
* 3 packets per second
|
||||
*/
|
||||
if (port->sm_tx_timer_counter && !(--port->sm_tx_timer_counter)) {
|
||||
if (!port->sm_tx_timer_counter || !(--port->sm_tx_timer_counter)) {
|
||||
/* check if there is something to send */
|
||||
if (port->ntt && (port->sm_vars & AD_PORT_LACP_ENABLED)) {
|
||||
__update_lacpdu_from_port(port);
|
||||
|
|
@ -1393,12 +1393,13 @@ static void ad_tx_machine(struct port *port)
|
|||
* again until demanded
|
||||
*/
|
||||
port->ntt = false;
|
||||
|
||||
/* restart tx timer(to verify that we will not
|
||||
* exceed AD_MAX_TX_IN_SECOND
|
||||
*/
|
||||
port->sm_tx_timer_counter = ad_ticks_per_sec / AD_MAX_TX_IN_SECOND;
|
||||
}
|
||||
}
|
||||
/* restart tx timer(to verify that we will not exceed
|
||||
* AD_MAX_TX_IN_SECOND
|
||||
*/
|
||||
port->sm_tx_timer_counter = ad_ticks_per_sec/AD_MAX_TX_IN_SECOND;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user