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 [thread overview]
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)
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!
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:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* 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 \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).