[ovs-dev] [RFC] [PATCH 3/6] port_group: bridge: set port_group in port config
Darrell Ball
dball at vmware.com
Thu May 4 08:02:50 UTC 2017
On 4/3/17, 2:40 AM, "ovs-dev-bounces at openvswitch.org on behalf of Matthias May" <ovs-dev-bounces at openvswitch.org on behalf of matthias.may at neratec.com> wrote:
Signed-off-by: Matthias May <matthias.may at neratec.com>
---
vswitchd/bridge.c | 11 +++++++++++
1 file changed, 11 insertions(+)
diff --git a/vswitchd/bridge.c b/vswitchd/bridge.c
index 867a26d8d..316e4742e 100644
--- a/vswitchd/bridge.c
+++ b/vswitchd/bridge.c
@@ -966,6 +966,17 @@ port_configure(struct port *port)
s.slaves[s.n_slaves++] = iface->ofp_port;
}
+ /* Get port_group. */
+ if (cfg->port_group) {
+ if ((*cfg->port_group > 0 && *cfg->port_group < OFPP_MAX)
+ || *cfg->port_group == OFPP_LOCAL) {
+ s.port_group = (uint32_t) *cfg->port_group;
+ }
+ } else {
+ /* On a port with multiple interfaces we default to the first. */
+ s.port_group = s.slaves[0];
Instead of imposing a default policy like this, maybe it is better to have
the isolation group with default “disabled” and have a helper function that checks for that
as well as the differing isolation groups.
Disabled isolation ports can communicate with any isolated ports.
This would leave loopback logic completely orthogonal.
+ }
+
/* Get VLAN tag. */
s.vlan = -1;
if (cfg->tag && *cfg->tag >= 0 && *cfg->tag <= 4095) {
--
2.11.0
_______________________________________________
dev mailing list
dev at openvswitch.org
https://urldefense.proofpoint.com/v2/url?u=https-3A__mail.openvswitch.org_mailman_listinfo_ovs-2Ddev&d=DwICAg&c=uilaK90D4TOVoH58JNXRgQ&r=BVhFA09CGX7JQ5Ih-uZnsw&m=reKfuY6GRfozcBj7e654rG5Di77rfpfqAbBm0BoJrEw&s=KRS04c6LgBEGunxav4lvA8s53R1rZ4DN1OJpaXGwwgA&e=
More information about the dev
mailing list