+static struct ofport *
+get_port(const struct ofproto *ofproto, uint16_t odp_port)
+{
+ struct ofport *port;
+
+ HMAP_FOR_EACH_IN_BUCKET (port, struct ofport, hmap_node,
+ hash_int(odp_port, 0), &ofproto->ports) {
+ if (port->odp_port == odp_port) {
+ return port;
+ }
+ }
+ return NULL;
+}
+