This is the source code of "__netdev_dpdk_vhost_send" in master branch:
"
...
/* There is vHost TX single queue, So we need to lock it for TX. */
rte_spinlock_lock(&vhost_dev->vhost_tx_lock);
do {
unsigned int tx_pkts;
tx_pkts = rte_vhost_enqueue_burst(virtio_dev, VIRTIO_RXQ,
cur_pkts, cnt);
...
"
There is a spinlock for vshot TX single queue, but It seems the DPDK API
"virtio_dev_rx" or "virtio_dev_merge_rx" called in
"rte_vhost_enqueue_burst" has a lock-free mechanism.
I tried to remove the spinlock and did a simple concurrency test, two
TCP traffics form main thread(core 0) and pmd thread(core 1) were sent
to the same guest, it worked well.
I deeply appreciate some help for solving my confusion.
_______________________________________________
dev mailing list
dev@openvswitch.org
http://openvswitch.org/mailman/listinfo/dev