From: Ed Maste Date: Wed, 15 Aug 2012 22:00:34 +0000 (+0000) Subject: netdev: Map to OpenFlow port for flow lookup X-Git-Url: https://pintos-os.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=25f78c28faf4f3e059a006c8423b701fe9e9e77c;p=openvswitch netdev: Map to OpenFlow port for flow lookup In the flow hash special ports are stored using OpenFlow constants. For example the "local port" is stored as 0xfffe (OFPP_LOCAL). Signed-off-by: Ed Maste Signed-off-by: Ben Pfaff --- diff --git a/lib/dpif-netdev.c b/lib/dpif-netdev.c index 60fae5fa..7fa27208 100644 --- a/lib/dpif-netdev.c +++ b/lib/dpif-netdev.c @@ -1011,7 +1011,7 @@ dp_netdev_port_input(struct dp_netdev *dp, struct dp_netdev_port *port, if (packet->size < ETH_HEADER_LEN) { return; } - flow_extract(packet, 0, 0, port->port_no, &key); + flow_extract(packet, 0, 0, odp_port_to_ofp_port(port->port_no), &key); flow = dp_netdev_lookup_flow(dp, &key); if (flow) { dp_netdev_flow_used(flow, &key, packet);