summaryrefslogtreecommitdiffstats
path: root/src/plugins/memif/memif_api.c
diff options
context:
space:
mode:
authorSteven <sluong@cisco.com>2017-05-30 10:35:51 -0700
committerDave Wallace <dwallacelf@gmail.com>2017-05-31 02:27:45 +0000
commitc2ebcbb89bea719418fc3f896ae3de4302acaf6d (patch)
tree7b035f314305d100c1c1c482887581739d96f987 /src/plugins/memif/memif_api.c
parent79ea7ec3b3c04d334a21107818c64d70c42b99ae (diff)
memif: multi-queues support
- Add rx-queues and tx-queues option to the create memif CLI - Add vlib_worker_thread_barrier_sync () to memif_conn_fd_read_ready () as the latter function may disconnect the ring and clean up the shared memory. - On transmit, write the rid (queue number) to the socket. - On receive, read the rid and trigger the interrupt for the corresponding thread. Change-Id: If1c7e26c7124174678f047909cbc33e931eaac8c Signed-off-by: Steven <sluong@cisco.com>
Diffstat (limited to 'src/plugins/memif/memif_api.c')
-rw-r--r--src/plugins/memif/memif_api.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/plugins/memif/memif_api.c b/src/plugins/memif/memif_api.c
index 1ade317e26f..1470f944275 100644
--- a/src/plugins/memif/memif_api.c
+++ b/src/plugins/memif/memif_api.c
@@ -122,6 +122,11 @@ vl_api_memif_create_t_handler (vl_api_memif_create_t * mp)
/* role */
args.is_master = (mp->role == 0);
+ if (args.is_master == 0)
+ {
+ args.rx_queues = mp->rx_queues;
+ args.tx_queues = mp->tx_queues;
+ }
/* ring size */
if (mp->ring_size)