ofproto-dpif: Require an in_port when tracing datapath flows.
[sliver-openvswitch.git] / lib / ofp-parse.c
index d64d461..6f35c12 100644 (file)
@@ -428,12 +428,17 @@ parse_named_action(enum ofputil_action_code code, const struct flow *flow,
     case OFPUTIL_OFPAT11_PUSH_VLAN:
         ethertype = str_to_u16(arg, "ethertype");
         if (ethertype != ETH_TYPE_VLAN_8021Q) {
-            /* TODO:XXXX ETH_TYPE_VLAN_8021AD case isn't supported */
+            /* XXX ETH_TYPE_VLAN_8021AD case isn't supported */
             ovs_fatal(0, "%s: not a valid VLAN ethertype", arg);
         }
         ofpact_put_PUSH_VLAN(ofpacts);
         break;
 
+    case OFPUTIL_OFPAT11_SET_QUEUE:
+        ofpact_put_SET_QUEUE(ofpacts)->queue_id = str_to_u32(arg);
+        break;
+
+
     case OFPUTIL_OFPAT10_SET_DL_SRC:
     case OFPUTIL_OFPAT11_SET_DL_SRC:
         str_to_mac(arg, ofpact_put_SET_ETH_SRC(ofpacts)->mac);
@@ -624,7 +629,7 @@ parse_named_instruction(enum ovs_instruction_type type,
         break;
 
     case OVSINST_OFPIT11_WRITE_ACTIONS:
-        /* TODO:XXX */
+        /* XXX */
         ovs_fatal(0, "instruction write-actions is not supported yet");
         break;
 
@@ -1144,6 +1149,10 @@ parse_ofp_exact_flow(struct flow *flow, const char *s)
         }
     }
 
+    if (!flow->in_port) {
+        flow->in_port = OFPP_NONE;
+    }
+
 exit:
     free(copy);