diff options
author | Susant Sahani <ssahani@gmail.com> | 2018-12-13 14:53:07 +0530 |
---|---|---|
committer | Susant Sahani <ssahani@gmail.com> | 2018-12-15 18:15:16 +0530 |
commit | fde60a424edb891026ad77776565c043985e9763 (patch) | |
tree | 70ec8ff922cbc39dd1d355418ec4c7828c241e18 /src/network | |
parent | Merge pull request #11046 from keszybz/generator-mains (diff) | |
download | systemd-fde60a424edb891026ad77776565c043985e9763.tar.gz systemd-fde60a424edb891026ad77776565c043985e9763.tar.bz2 systemd-fde60a424edb891026ad77776565c043985e9763.zip |
netdev bond: add support to configure tlb_dynamic_lb
Closes https://github.com/systemd/systemd/issues/11135
Add test for bond : tlb_dynamic_lb
Diffstat (limited to 'src/network')
-rw-r--r-- | src/network/netdev/bond.c | 7 | ||||
-rw-r--r-- | src/network/netdev/bond.h | 2 | ||||
-rw-r--r-- | src/network/netdev/netdev-gperf.gperf | 1 |
3 files changed, 10 insertions, 0 deletions
diff --git a/src/network/netdev/bond.c b/src/network/netdev/bond.c index 70d314bc7..550a7f891 100644 --- a/src/network/netdev/bond.c +++ b/src/network/netdev/bond.c @@ -307,6 +307,12 @@ static int netdev_bond_fill_message_create(NetDev *netdev, Link *link, sd_netlin if (r < 0) return log_netdev_error_errno(netdev, r, "Could not append IFLA_BOND_ALL_SLAVES_ACTIVE attribute: %m"); + if (b->tlb_dynamic_lb >= 0) { + r = sd_netlink_message_append_u8(m, IFLA_BOND_TLB_DYNAMIC_LB, b->tlb_dynamic_lb); + if (r < 0) + return log_netdev_error_errno(netdev, r, "Could not append IFLA_BOND_TLB_DYNAMIC_LB attribute: %m"); + } + if (b->arp_interval > 0) { if (b->n_arp_ip_targets > 0) { @@ -534,6 +540,7 @@ static void bond_init(NetDev *netdev) { b->primary_reselect = _NETDEV_BOND_PRIMARY_RESELECT_INVALID; b->all_slaves_active = false; + b->tlb_dynamic_lb = -1; b->resend_igmp = RESEND_IGMP_DEFAULT; b->packets_per_slave = PACKETS_PER_SLAVE_DEFAULT; diff --git a/src/network/netdev/bond.h b/src/network/netdev/bond.h index 99ef25d0d..31b922b03 100644 --- a/src/network/netdev/bond.h +++ b/src/network/netdev/bond.h @@ -99,6 +99,8 @@ typedef struct Bond { BondArpAllTargets arp_all_targets; BondPrimaryReselect primary_reselect; + int tlb_dynamic_lb; + bool all_slaves_active; unsigned resend_igmp; diff --git a/src/network/netdev/netdev-gperf.gperf b/src/network/netdev/netdev-gperf.gperf index fbc7a59e9..39b26b842 100644 --- a/src/network/netdev/netdev-gperf.gperf +++ b/src/network/netdev/netdev-gperf.gperf @@ -141,6 +141,7 @@ Bond.ResendIGMP, config_parse_unsigned, 0, Bond.PacketsPerSlave, config_parse_unsigned, 0, offsetof(Bond, packets_per_slave) Bond.GratuitousARP, config_parse_unsigned, 0, offsetof(Bond, num_grat_arp) Bond.AllSlavesActive, config_parse_unsigned, 0, offsetof(Bond, all_slaves_active) +Bond.DynamicTransmitLoadBalancing, config_parse_tristate, 0, offsetof(Bond, tlb_dynamic_lb) Bond.MinLinks, config_parse_unsigned, 0, offsetof(Bond, min_links) Bond.MIIMonitorSec, config_parse_sec, 0, offsetof(Bond, miimon) Bond.UpDelaySec, config_parse_sec, 0, offsetof(Bond, updelay) |