mirror of
https://github.com/systemd/systemd
synced 2024-07-21 18:24:38 +00:00
Merge pull request #31498 from ssahani/bond
netdev: bond - add support for peer_notif_delay
This commit is contained in:
commit
d5e6df24bd
|
@ -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>
|
||||
|
|
|
@ -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)
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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)
|
||||
|
|
|
@ -7,3 +7,4 @@ Mode=active-backup
|
|||
PrimaryReselectPolicy=always
|
||||
MIIMonitorSec=1s
|
||||
ARPMissedMax=10
|
||||
PeerNotifyDelaySec=300s
|
||||
|
|
|
@ -1517,6 +1517,7 @@ class NetworkdNetDevTests(unittest.TestCase, Utilities):
|
|||
print(output)
|
||||
|
||||
self.check_link_attr('bond97', 'bonding', 'arp_missed_max', '10')
|
||||
self.check_link_attr('bond97', 'bonding', 'peer_notif_delay', '300000')
|
||||
|
||||
def test_vlan(self):
|
||||
copy_network_unit('21-vlan.netdev', '11-dummy.netdev',
|
||||
|
|
Loading…
Reference in a new issue