network: netdev - bond add support for ARP missed max

Allows to configure bond arp_missed_max is the maximum number of arp_interval monitor cycle
for missed ARP replies. If this number is exceeded, link is reported as
down.
This commit is contained in:
Susant Sahani 2024-02-15 16:11:22 +05:30
parent 7ad0a7b2b6
commit b33bba0434
6 changed files with 23 additions and 0 deletions

View File

@ -2420,6 +2420,18 @@
<xi:include href="version-info.xml" xpointer="v220"/>
</listitem>
</varlistentry>
<varlistentry>
<term><varname>ARPMissedMax=</varname></term>
<listitem>
<para>Specify the maximum number of arp interval monitor cycle
for missed ARP replies. If this number is exceeded, link is reported as
down. Defaults to unset.
</para>
<xi:include href="version-info.xml" xpointer="v256"/>
</listitem>
</varlistentry>
</variablelist>
<para>For more detail information see

View File

@ -124,6 +124,7 @@ static const NLAPolicy rtnl_link_info_data_bond_policies[] = {
[IFLA_BOND_AD_ACTOR_SYSTEM] = BUILD_POLICY_WITH_SIZE(ETHER_ADDR, ETH_ALEN),
[IFLA_BOND_TLB_DYNAMIC_LB] = BUILD_POLICY(U8),
[IFLA_BOND_PEER_NOTIF_DELAY] = BUILD_POLICY(U32),
[IFLA_BOND_MISSED_MAX] = BUILD_POLICY(U8),
};
static const NLAPolicy rtnl_link_info_data_bridge_policies[] = {

View File

@ -198,6 +198,12 @@ static int netdev_bond_fill_message_create(NetDev *netdev, Link *link, sd_netlin
return r;
}
if (b->arp_missed_max > 0) {
r = sd_netlink_message_append_u8(m, IFLA_BOND_MISSED_MAX, b->arp_missed_max);
if (r < 0)
return r;
}
if (b->arp_interval > 0 && !ordered_set_isempty(b->arp_ip_targets)) {
void *val;
int n = 0;

View File

@ -34,6 +34,8 @@ typedef struct Bond {
uint16_t ad_user_port_key;
struct ether_addr ad_actor_system;
uint8_t arp_missed_max;
usec_t miimon;
usec_t updelay;
usec_t downdelay;

View File

@ -218,6 +218,7 @@ Bond.LearnPacketIntervalSec, config_parse_sec,
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)
Bond.ARPMissedMax, config_parse_uint8, 0, offsetof(Bond, arp_missed_max)
Bridge.HelloTimeSec, config_parse_sec, 0, offsetof(Bridge, hello_time)
Bridge.MaxAgeSec, config_parse_sec, 0, offsetof(Bridge, max_age)
Bridge.AgeingTimeSec, config_parse_sec, 0, offsetof(Bridge, ageing_time)

View File

@ -14,5 +14,6 @@ MinLinks=1
AdActorSystemPriority=1218
AdUserPortKey=811
AdActorSystem=00:11:22:33:44:55
ARPMissedMax=10
# feed the sanitizer
AdActorSystem=00:11:22:33:44:55