]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
netdev: bond - add support for peer_notif_delay
authorSusant Sahani <ssahani@vmware.com>
Mon, 26 Feb 2024 13:26:57 +0000 (18:56 +0530)
committerSusant Sahani <ssahani@vmware.com>
Wed, 28 Feb 2024 12:01:02 +0000 (17:31 +0530)
 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.

man/systemd.netdev.xml
src/network/netdev/bond.c
src/network/netdev/bond.h
src/network/netdev/netdev-gperf.gperf

index e941a39eb89508770794ed5e8a5f8880e18a50cf..4e9afc3674ea1b2937bd38298b9f98fcb56959af 100644 (file)
         </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>
index ecf091356bd93459dfba90dd8b8b4410b5765515..52a7f126b6db2430c66bac672850d47693e2b768 100644 (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)
index b301fa67f023df61bb5baa223fdc4ff58355336b..ea94001e6e67bdc48fceb16d1e6f0feeee22ff9d 100644 (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;
index 1bac0c227d09c9f89883ca99761bfcab00e80916..4883a2652d4639fc9a95e8a7301abcaab9e7d6e2 100644 (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)