diff mbox

[ovs-dev,03/11] ovs/dp-cls: saving rx queue identifier

Message ID 1dd8e98a5c4f52c22d5d2cfab7babba84292013a.1499257385.git.shacharbe@mellanox.com
State Deferred
Headers show

Commit Message

Shachar Beiser July 5, 2017, 12:27 p.m. UTC
The receive queue id is saved in order to direct the
data-path classifier traffic towards it.

Signed-off-by: Shachar Beiser <shacharbe@mellanox.com>
---
 lib/dp-packet.h | 1 +
 lib/netdev.c    | 2 ++
 2 files changed, 3 insertions(+)
diff mbox

Patch

diff --git a/lib/dp-packet.h b/lib/dp-packet.h
index d2549b1..28c8aa0 100644
--- a/lib/dp-packet.h
+++ b/lib/dp-packet.h
@@ -645,6 +645,7 @@  struct dp_packet_batch {
     size_t count;
     bool trunc; /* true if the batch needs truncate. */
     struct dp_packet *packets[NETDEV_MAX_BURST];
+    int rxqid;
 };
 
 static inline void
diff --git a/lib/netdev.c b/lib/netdev.c
index 765bf4b..69dfea4 100644
--- a/lib/netdev.c
+++ b/lib/netdev.c
@@ -57,6 +57,7 @@ 
 #ifdef __linux__
 #include "tc.h"
 #endif
+#include "dpif-netdev.h"
 
 VLOG_DEFINE_THIS_MODULE(netdev);
 
@@ -680,6 +681,7 @@  netdev_rxq_recv(struct netdev_rxq *rx, struct dp_packet_batch *batch)
     } else {
         batch->count = 0;
     }
+    batch->rxqid = rx->queue_id;
     return retval;
 }