@@ -93,6 +93,7 @@ struct ofbundle {
/* Configuration. */
struct ovs_list ports; /* Contains "struct ofport"s. */
+ ofp_port_t port_group; /* Group of ports to forbid loopback */
enum port_vlan_mode vlan_mode; /* VLAN mode */
uint16_t qinq_ethtype;
int vlan; /* -1=trunk port, else a 12-bit VLAN ID. */
@@ -451,8 +452,9 @@ type_run(const char *type)
HMAP_FOR_EACH (bundle, hmap_node, &ofproto->bundles) {
xlate_bundle_set(ofproto, bundle, bundle->name,
- bundle->vlan_mode, bundle->qinq_ethtype,
- bundle->vlan, bundle->trunks, bundle->cvlans,
+ bundle->port_group, bundle->vlan_mode,
+ bundle->qinq_ethtype, bundle->vlan,
+ bundle->trunks, bundle->cvlans,
bundle->use_priority_tags,
bundle->bond, bundle->lacp,
bundle->floodable, bundle->protected);
@@ -2896,6 +2898,7 @@ bundle_set(struct ofproto *ofproto_, void *aux,
bundle->name = NULL;
ovs_list_init(&bundle->ports);
+ bundle->port_group = 0;
bundle->vlan_mode = PORT_VLAN_TRUNK;
bundle->qinq_ethtype = ETH_TYPE_VLAN_8021AD;
bundle->vlan = -1;
@@ -2957,6 +2960,12 @@ bundle_set(struct ofproto *ofproto_, void *aux,
return EINVAL;
}
+ /* Set port_group */
+ if (s->port_group != bundle->port_group) {
+ bundle->port_group = s->port_group;
+ need_flush = true;
+ }
+
/* Set VLAN tagging mode */
if (s->vlan_mode != bundle->vlan_mode
|| s->use_priority_tags != bundle->use_priority_tags) {
Signed-off-by: Matthias May <matthias.may@neratec.com> --- ofproto/ofproto-dpif.c | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-)