vswitch: Implement dscp column of the Queue table.
[openvswitch] / lib / dpif-netdev.c
index eb8d66d9cae4e10e5ec2f47e5b2091c4beb5c11a..6de4bfc15898df291053de2b285d7a4f1c2b1c7b 100644 (file)
@@ -908,6 +908,14 @@ dpif_netdev_recv_set_mask(struct dpif *dpif, int listen_mask)
     return 0;
 }
 
+static int
+dpif_netdev_queue_to_priority(const struct dpif *dpif OVS_UNUSED,
+                              uint32_t queue_id, uint32_t *priority)
+{
+    *priority = queue_id;
+    return 0;
+}
+
 static struct dp_netdev_queue *
 find_nonempty_queue(struct dpif *dpif)
 {
@@ -1313,7 +1321,7 @@ dp_netdev_execute_actions(struct dp_netdev *dp,
 
         case OVS_ACTION_ATTR_PUSH_VLAN:
             vlan = nl_attr_get(a);
-            eth_push_vlan(packet, vlan->vlan_tci);
+            eth_push_vlan(packet, vlan->vlan_tci & ~htons(VLAN_CFI));
             break;
 
         case OVS_ACTION_ATTR_POP_VLAN:
@@ -1366,7 +1374,7 @@ const struct dpif_class dpif_netdev_class = {
     NULL,                       /* operate */
     dpif_netdev_recv_get_mask,
     dpif_netdev_recv_set_mask,
-    NULL,                       /* queue_to_priority */
+    dpif_netdev_queue_to_priority,
     dpif_netdev_recv,
     dpif_netdev_recv_wait,
     dpif_netdev_recv_purge,