recirculation: Some cosmetic fixes
[sliver-openvswitch.git] / lib / dpif-netdev.c
index d1097e9..60e024e 100644 (file)
@@ -43,6 +43,7 @@
 #include "list.h"
 #include "meta-flow.h"
 #include "netdev.h"
+#include "netdev-dpdk.h"
 #include "netdev-vport.h"
 #include "netlink.h"
 #include "odp-execute.h"
@@ -1864,6 +1865,7 @@ pmd_thread_main(void *f_)
     poll_cnt = 0;
     poll_list = NULL;
 
+    pmd_thread_setaffinity_cpu(f->id);
 reload:
     poll_cnt = pmd_load_queues(f, &poll_list, poll_cnt);
     atomic_read(&f->change_seq, &port_seq);
@@ -2080,7 +2082,7 @@ struct dp_netdev_execute_aux {
 
 static void
 dp_execute_cb(void *aux_, struct ofpbuf *packet,
-              const struct pkt_metadata *md OVS_UNUSED,
+              struct pkt_metadata *md,
               const struct nlattr *a, bool may_steal)
     OVS_NO_THREAD_SAFETY_ANALYSIS
 {
@@ -2112,6 +2114,25 @@ dp_execute_cb(void *aux_, struct ofpbuf *packet,
         }
         break;
     }
+
+    case OVS_ACTION_ATTR_RECIRC: {
+        const struct ovs_action_recirc *act;
+
+        act = nl_attr_get(a);
+        md->recirc_id = act->recirc_id;
+        md->dp_hash = 0;
+
+        if (act->hash_alg == OVS_RECIRC_HASH_ALG_L4) {
+            struct flow flow;
+
+            flow_extract(packet, md, &flow);
+            md->dp_hash = flow_hash_symmetric_l4(&flow, act->hash_bias);
+        }
+
+        dp_netdev_port_input(aux->dp, packet, md);
+        break;
+    }
+
     case OVS_ACTION_ATTR_PUSH_VLAN:
     case OVS_ACTION_ATTR_POP_VLAN:
     case OVS_ACTION_ATTR_PUSH_MPLS: