bond: support tlb_dynamic_lb in balance-alb mode

In kernel, `tlb_dynamic_lb` is supported to configure in bonding mode
`balance-alb`. Therefore, add the support in NetworkManager to avoid
undesirable limitation.

Kernel previously had such limitation and it was removed in
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=e79c1055749e3183a2beee04a24da378623329c5.

Signed-off-by: Wen Liang <liangwen12year@gmail.com>

https://bugzilla.redhat.com/show_bug.cgi?id=1959934

https://gitlab.freedesktop.org/NetworkManager/NetworkManager/-/merge_requests/868
This commit is contained in:
Wen Liang 2021-05-25 08:45:46 -04:00 committed by Thomas Haller
parent 8ba66f8ec9
commit 18839361ac
No known key found for this signature in database
GPG key ID: 29C2366E4DFC5728
2 changed files with 2 additions and 2 deletions

View file

@ -225,7 +225,7 @@ static NM_UTILS_STRING_TABLE_LOOKUP_DEFINE(
{NM_SETTING_BOND_OPTION_PACKETS_PER_SLAVE, ~(BIT(NM_BOND_MODE_ROUNDROBIN))},
{NM_SETTING_BOND_OPTION_PRIMARY,
~(BIT(NM_BOND_MODE_ACTIVEBACKUP) | BIT(NM_BOND_MODE_TLB) | BIT(NM_BOND_MODE_ALB))},
{NM_SETTING_BOND_OPTION_TLB_DYNAMIC_LB, ~(BIT(NM_BOND_MODE_TLB))}, );
{NM_SETTING_BOND_OPTION_TLB_DYNAMIC_LB, ~(BIT(NM_BOND_MODE_TLB) | BIT(NM_BOND_MODE_ALB))}, );
gboolean
_nm_setting_bond_option_supported(const char *option, NMBondMode mode)

View file

@ -807,7 +807,7 @@ test_bond_normalize(void)
((const char *[]){"mode", "active-backup", "miimon", "1", NULL}));
test_bond_normalize_options(
((const char *[]){"mode", "balance-alb", "tlb_dynamic_lb", "1", NULL}),
((const char *[]){"mode", "balance-alb", NULL}));
((const char *[]){"mode", "balance-alb", "tlb_dynamic_lb", "1", NULL}));
test_bond_normalize_options(
((const char *[]){"mode", "balance-tlb", "tlb_dynamic_lb", "1", NULL}),
((const char *[]){"mode", "balance-tlb", "tlb_dynamic_lb", "1", NULL}));