DPDK usage discussions
 help / color / mirror / Atom feed
From: 马尔斯 <mars14850@gmail.com>
To: users@dpdk.org
Subject: [dpdk-users] Why is the order of atomic read/write like in queue_update_status in rte_eth_vhost.c?
Date: Mon, 24 Aug 2020 23:50:10 +0800
Message-ID: <CAHUXu_X64iP1ca3G0ZMwktsN673uaEMQ0_B0D2faGGY_tgtwTg@mail.gmail.com> (raw)

 /* 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)
rte_atomic32_set(&vq->allow_queuing, allow_queuing);
while (rte_atomic32_read(&vq->while_queuing))

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!

                 reply	other threads:[~2020-08-24 15:50 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=CAHUXu_X64iP1ca3G0ZMwktsN673uaEMQ0_B0D2faGGY_tgtwTg@mail.gmail.com \
    --to=mars14850@gmail.com \
    --cc=users@dpdk.org \


* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link

DPDK usage discussions

This inbox may be cloned and mirrored by anyone:

	git clone --mirror https://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/ https://inbox.dpdk.org/users \
	public-inbox-index users

Example config snippet for mirrors.
Newsgroup available over NNTP:

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