diff options
author | Christophe Fontaine <cfontain@redhat.com> | 2022-07-07 14:31:31 +0200 |
---|---|---|
committer | Ilya Maximets <i.maximets@ovn.org> | 2022-07-15 23:08:38 +0200 |
commit | 1b53826d6c740c78857b66b1769650ffd3de7c63 (patch) | |
tree | c5aa31152ad4bd34fc8deb4234ec9e79bcdbb2f7 /ofproto | |
parent | 73ba04fd77a1c4ea98dd289268b9db9067ce3519 (diff) | |
download | openvswitch-1b53826d6c740c78857b66b1769650ffd3de7c63.tar.gz |
ofproto/bond: Add knob 'all-members-active'.
This config param allows the delivery of broadcast and multicast
packets to the secondary interface of non-lacp bonds, equivalent
to the option 'all_slaves_active' for Linux kernel bonds.
Reported-at: https://bugzilla.redhat.com/1720935
Signed-off-by: Christophe Fontaine <cfontain@redhat.com>
Signed-off-by: Ilya Maximets <i.maximets@ovn.org>
Diffstat (limited to 'ofproto')
-rw-r--r-- | ofproto/bond.c | 12 | ||||
-rw-r--r-- | ofproto/bond.h | 3 |
2 files changed, 14 insertions, 1 deletions
diff --git a/ofproto/bond.c b/ofproto/bond.c index 845f69e21..f06cf20c9 100644 --- a/ofproto/bond.c +++ b/ofproto/bond.c @@ -125,6 +125,8 @@ struct bond { uint32_t basis; /* Basis for flow hash function. */ bool use_lb_output_action; /* Use lb_output action to avoid recirculation. Applicable only for Balance TCP mode. */ + bool all_members_active; /* Accept multicast packets on secondary + members of a non-LACP Balance SLB bond. */ char *primary; /* Name of the primary member. */ /* SLB specific bonding info. */ @@ -480,6 +482,9 @@ bond_reconfigure(struct bond *bond, const struct bond_settings *s) revalidate = true; } + bond->all_members_active = (bond->balance == BM_SLB) + ? s->all_members_active : false; + if (bond->balance != BM_AB) { if (!bond->recirc_id) { bond->recirc_id = recirc_alloc_id(bond->ofproto); @@ -893,7 +898,7 @@ bond_check_admissibility(struct bond *bond, const void *member_, /* Drop all multicast packets on inactive members. */ if (eth_addr_is_multicast(eth_dst)) { - if (bond->active_member != member) { + if (bond->active_member != member && !bond->all_members_active) { goto out; } } @@ -1495,6 +1500,11 @@ bond_print_details(struct ds *ds, const struct bond *bond) use_lb_output_action ? "enabled" : "disabled", use_lb_output_action ? recirc_id : -1); + if (bond->balance == BM_SLB) { + ds_put_format(ds, "all members active: %s\n", + bond->all_members_active ? "true" : "false"); + } + ds_put_format(ds, "updelay: %d ms\n", bond->updelay); ds_put_format(ds, "downdelay: %d ms\n", bond->downdelay); diff --git a/ofproto/bond.h b/ofproto/bond.h index 1683ec878..2eb0c95a7 100644 --- a/ofproto/bond.h +++ b/ofproto/bond.h @@ -62,6 +62,9 @@ struct bond_settings { ovs run. */ bool use_lb_output_action; /* Use lb_output action. Only applicable for bond mode BALANCE TCP. */ + bool all_members_active; /* Accept multicast packets on secondary + interface. Only applicable for non-LACP + BALANCE SLB bond mode. */ }; /* Program startup. */ |