DPDK usage discussions
 help / color / mirror / Atom feed
* [dpdk-users] Why is the order of atomic read/write like in queue_update_status in rte_eth_vhost.c?
@ 2020-08-24 15:50 马尔斯
  0 siblings, 0 replies; only message in thread
From: 马尔斯 @ 2020-08-24 15:50 UTC (permalink / raw)
  To: users

 /* 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!

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2020-08-24 15:50 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-08-24 15:50 [dpdk-users] Why is the order of atomic read/write like in queue_update_status in rte_eth_vhost.c? 马尔斯

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).