netdev: bond - add support for peer_notif_delay

Specify the delay, in milliseconds, between each peer
notification (gratuitous ARP and unsolicited IPv6
Neighbor Advertisement) when they are issued after
a failover event. This delay should be a multiple of
the MII link monitor interval (miimon).

 The valid range is 0 - 300s. The default value is 0,
which means to match the value of the MII link monitor interval.
This commit is contained in:
Susant Sahani 2024-02-26 18:56:57 +05:30
parent 39af486a7f
commit 00386d5b3f
4 changed files with 21 additions and 0 deletions

View File

@ -2182,6 +2182,19 @@
</listitem>
</varlistentry>
<varlistentry>
<term><varname>PeerNotifyDelaySec=</varname></term>
<listitem>
<para>Specifies the number of seconds the delay between each peer notification
(gratuitous ARP and unsolicited IPv6 Neighbor Advertisement) when they are issued
after a failover event. This delay should be a multiple of the MII link monitor
interval (miimon). The valid range is 0...300s. The default value is 0,
which means to match the value of the <varname>MIIMonitorSec=</varname>.</para>
<xi:include href="version-info.xml" xpointer="v256"/>
</listitem>
</varlistentry>
<varlistentry>
<term><varname>UpDelaySec=</varname></term>
<listitem>

View File

@ -88,6 +88,12 @@ static int netdev_bond_fill_message_create(NetDev *netdev, Link *link, sd_netlin
return r;
}
if (b->peer_notify_delay != 0) {
r = sd_netlink_message_append_u32(m, IFLA_BOND_PEER_NOTIF_DELAY, b->peer_notify_delay / USEC_PER_MSEC);
if (r < 0)
return r;
}
if (b->downdelay != 0) {
r = sd_netlink_message_append_u32(m, IFLA_BOND_DOWNDELAY, b->downdelay / USEC_PER_MSEC);
if (r < 0)

View File

@ -41,6 +41,7 @@ typedef struct Bond {
usec_t downdelay;
usec_t arp_interval;
usec_t lp_interval;
usec_t peer_notify_delay;
OrderedSet *arp_ip_targets;
} Bond;

View File

@ -216,6 +216,7 @@ Bond.UpDelaySec, config_parse_sec,
Bond.DownDelaySec, config_parse_sec, 0, offsetof(Bond, downdelay)
Bond.ARPIntervalSec, config_parse_sec, 0, offsetof(Bond, arp_interval)
Bond.LearnPacketIntervalSec, config_parse_sec, 0, offsetof(Bond, lp_interval)
Bond.PeerNotifyDelaySec, config_parse_sec, 0, offsetof(Bond, peer_notify_delay)
Bond.AdActorSystemPriority, config_parse_ad_actor_sys_prio, 0, offsetof(Bond, ad_actor_sys_prio)
Bond.AdUserPortKey, config_parse_ad_user_port_key, 0, offsetof(Bond, ad_user_port_key)
Bond.AdActorSystem, config_parse_ad_actor_system, 0, offsetof(Bond, ad_actor_system)