[dpdk-users] Why is the order of atomic read/write like in queue_update_status in rte_eth_vhost.c?
马尔斯
mars14850 at gmail.com
Mon Aug 24 17:50:10 CEST 2020
/* Wait until rx/tx_pkt_burst stops accessing vhost device */
for (i = 0; i < dev->data->nb_rx_queues; i++) {
vq = dev->data->rx_queues[i];
if (vq == NULL)
continue;
rte_atomic32_set(&vq->allow_queuing, allow_queuing);
while (rte_atomic32_read(&vq->while_queuing))
rte_pause();
}
I think we will set the queue's allow_queuing, and the comment above says
we would wait while queue is bursting.
Why wait after atomic set rather than before aotmic set? Does the
rte_pause() loop means wait?
Best wishes!
More information about the users
mailing list