Skip to content

Commit

Permalink
netdev-dpdk: assume dpdkr peer can be multi-producer/consumer
Browse files Browse the repository at this point in the history
Although netdev does explicit locking, it is only valid from the ovs
perspective, then only the ring ends used by ovs should be declared as
single producer/consumer.
The other ends that are used by the application should be declared as
multiple producer/consumer that is the most general case.

Signed-off-by: Mauricio Vasquez B <mauricio.vasquezbernal@studenti.polito.it>
Acked-by: Flavio Leitner <fbl@sysclose.org>
Acked-by: Daniele Di Proietto <diproiettod@vmware.com>
  • Loading branch information
mauriciovasquezbernal authored and ddiproietto committed Nov 19, 2015
1 parent e9d6808 commit 8f0a76c
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions lib/netdev-dpdk.c
Expand Up @@ -1931,9 +1931,9 @@ dpdk_ring_create(const char dev_name[], unsigned int port_no,
return -err;
}

/* Create single consumer/producer rings, netdev does explicit locking. */
/* Create single producer tx ring, netdev does explicit locking. */
ivshmem->cring_tx = rte_ring_create(ring_name, DPDK_RING_SIZE, SOCKET0,
RING_F_SP_ENQ | RING_F_SC_DEQ);
RING_F_SP_ENQ);
if (ivshmem->cring_tx == NULL) {
rte_free(ivshmem);
return ENOMEM;
Expand All @@ -1944,9 +1944,9 @@ dpdk_ring_create(const char dev_name[], unsigned int port_no,
return -err;
}

/* Create single consumer/producer rings, netdev does explicit locking. */
/* Create single consumer rx ring, netdev does explicit locking. */
ivshmem->cring_rx = rte_ring_create(ring_name, DPDK_RING_SIZE, SOCKET0,
RING_F_SP_ENQ | RING_F_SC_DEQ);
RING_F_SC_DEQ);
if (ivshmem->cring_rx == NULL) {
rte_free(ivshmem);
return ENOMEM;
Expand Down

0 comments on commit 8f0a76c

Please sign in to comment.