[ovs-dev] [more wdp 1/3] bridge: 'in_port' in flow_t is now an OpenFlow port number.

Ben Pfaff blp at nicira.com
Tue Jul 13 00:14:44 UTC 2010


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.
---
 vswitchd/bridge.c |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/vswitchd/bridge.c b/vswitchd/bridge.c
index 0abb416..836c8b1 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) {
-- 
1.7.1





More information about the dev mailing list