DPDK usage discussions
 help / color / 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, back to index

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? 马尔斯

DPDK usage discussions

Archives are clonable:
	git clone --mirror http://inbox.dpdk.org/users/0 users/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 users users/ http://inbox.dpdk.org/users \
		users@dpdk.org
	public-inbox-index users


Newsgroup available over NNTP:
	nntp://inbox.dpdk.org/inbox.dpdk.users


AGPL code for this site: git clone https://public-inbox.org/ public-inbox