The switch to a single datapath uncovered a long-standing bug in the
send_packet() function.  The code had used an (invalid) ingress OpenFlow
port of 0, which happened to get translated to the datapath's local
port, which was always 0.  With the single datapath, this invalid
OpenFlow port number no longer maps properly, so switch-generated
packets could not be transmitted.  This patch properly sets the ingress
port to OFPP_LOCAL.

Signed-off-by: Justin Pettit <jpet...@nicira.com>
---
 ofproto/ofproto-dpif.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/ofproto/ofproto-dpif.c b/ofproto/ofproto-dpif.c
index fe0aae3..098a43e 100644
--- a/ofproto/ofproto-dpif.c
+++ b/ofproto/ofproto-dpif.c
@@ -5176,7 +5176,7 @@ send_packet(const struct ofport_dpif *ofport, struct 
ofpbuf *packet)
     struct flow flow;
     int error;
 
-    flow_extract(packet, 0, NULL, 0, &flow);
+    flow_extract(packet, 0, NULL, OFPP_LOCAL, &flow);
     odp_port = vsp_realdev_to_vlandev(ofproto, ofport->odp_port,
                                       flow.vlan_tci);
     if (odp_port != ofport->odp_port) {
-- 
1.7.5.4

_______________________________________________
dev mailing list
dev@openvswitch.org
http://openvswitch.org/mailman/listinfo/dev

Reply via email to