With single datapath, multiple userspace bridges share the same datapath. As such it does not look beneficial that we decide a valid open flow port number based on the number of ports in the datapath specially now that we have the ofport_request column in OVSDB.
This commit does not remove ofproto_init_max_ports() interface as defined in ofproto-provider.h as there may be other implementations that still use it. But ofproto-dpif should not need it. Signed-off-by: Gurucharan Shetty <[email protected]> --- lib/dpif.c | 8 -------- lib/dpif.h | 1 - ofproto/ofproto-dpif.c | 3 --- 3 files changed, 12 deletions(-) diff --git a/lib/dpif.c b/lib/dpif.c index ed84f5f..783a7cb 100644 --- a/lib/dpif.c +++ b/lib/dpif.c @@ -632,14 +632,6 @@ dpif_port_query_by_name(const struct dpif *dpif, const char *devname, return error; } -/* Returns one greater than the maximum port number accepted in flow - * actions. */ -uint32_t -dpif_get_max_ports(const struct dpif *dpif) -{ - return dpif->dpif_class->get_max_ports(dpif); -} - /* Returns the Netlink PID value to supply in OVS_ACTION_ATTR_USERSPACE actions * as the OVS_USERSPACE_ATTR_PID attribute's value, for use in flows whose * packets arrived on port 'port_no'. diff --git a/lib/dpif.h b/lib/dpif.h index de7450a..6db6ad3 100644 --- a/lib/dpif.h +++ b/lib/dpif.h @@ -418,7 +418,6 @@ int dpif_port_query_by_name(const struct dpif *, const char *devname, struct dpif_port *); int dpif_port_get_name(struct dpif *, odp_port_t port_no, char *name, size_t name_size); -uint32_t dpif_get_max_ports(const struct dpif *); uint32_t dpif_port_get_pid(const struct dpif *, odp_port_t port_no); struct dpif_port_dump { diff --git a/ofproto/ofproto-dpif.c b/ofproto/ofproto-dpif.c index 3bbe329..f5ccfca 100644 --- a/ofproto/ofproto-dpif.c +++ b/ofproto/ofproto-dpif.c @@ -1241,9 +1241,6 @@ construct(struct ofproto *ofproto_) return error; } - max_ports = dpif_get_max_ports(ofproto->backer->dpif); - ofproto_init_max_ports(ofproto_, MIN(max_ports, ofp_to_u16(OFPP_MAX))); - ofproto->netflow = NULL; ofproto->sflow = NULL; ofproto->ipfix = NULL; -- 1.7.9.5 _______________________________________________ dev mailing list [email protected] http://openvswitch.org/mailman/listinfo/dev
