From: Ben Pfaff Date: Tue, 13 Jul 2010 00:14:03 +0000 (-0700) Subject: bridge: 'in_port' in flow_t is now an OpenFlow port number. X-Git-Url: http://git.onelab.eu/?a=commitdiff_plain;h=d8e7e8fca8e5ed93f469c2cb1dbea701fa9f60cd;p=sliver-openvswitch.git bridge: 'in_port' in flow_t is now an OpenFlow port number. Commit b79520fe4 (Restore ovs-vswitchd VLAN, mirror, bonding, QoS features ("xflow" only)) broke the treatment of flows arriving on the local port. This is because previously these flows had an in_port of XFLOWP_LOCAL, but now they have an in_port of OFPP_LOCAL. This commit fixes the problem. I don't know how this snuck through my testing, since it's trivial to find. I did do testing; perhaps I didn't do testing with a controller at the right stage in development. --- diff --git a/vswitchd/bridge.c b/vswitchd/bridge.c index 0abb41637..836c8b18e 100644 --- a/vswitchd/bridge.c +++ b/vswitchd/bridge.c @@ -2283,7 +2283,7 @@ is_admissible(struct bridge *br, const flow_t *flow, bool have_packet, int vlan; /* Find the interface and port structure for the received packet. */ - in_iface = iface_from_xf_ifidx(br, flow->in_port); + in_iface = iface_from_xf_ifidx(br, ofp_port_to_xflow_port(flow->in_port)); if (!in_iface) { /* No interface? Something fishy... */ if (have_packet) { @@ -2868,7 +2868,7 @@ bond_send_learning_packets(struct port *port) n_packets++; compose_benign_packet(&packet, "Open vSwitch Bond Failover", 0xf177, e->mac); - flow_extract(&packet, 0, XFLOWP_NONE, &flow); + flow_extract(&packet, 0, OFPP_NONE, &flow); retval = ofproto_send_packet(br->ofproto, &flow, actions, a - actions, &packet); if (retval) {