From: Maxime Coquelin <maxime.coquelin@redhat.com>
To: dev@dpdk.org, nicolas.chautru@intel.com, hernan.vargas@intel.com,
david.marchand@redhat.com, thomas@monjalon.net,
roretzla@linux.microsoft.com
Cc: Maxime Coquelin <maxime.coquelin@redhat.com>
Subject: [PATCH 2/2] baseband/fpga_lte_fec: use new barrier API
Date: Thu, 22 Feb 2024 17:21:13 +0100 [thread overview]
Message-ID: <20240222162113.1896370-2-maxime.coquelin@redhat.com> (raw)
In-Reply-To: <20240222162113.1896370-1-maxime.coquelin@redhat.com>
rte_smp_rmb() is deprecated, use the new API instead as
suggested in rte_atomic header.
Signed-off-by: Maxime Coquelin <maxime.coquelin@redhat.com>
---
drivers/baseband/fpga_lte_fec/fpga_lte_fec.c | 12 ++++++------
1 file changed, 6 insertions(+), 6 deletions(-)
diff --git a/drivers/baseband/fpga_lte_fec/fpga_lte_fec.c b/drivers/baseband/fpga_lte_fec/fpga_lte_fec.c
index a4a963f74d..4af969fab8 100644
--- a/drivers/baseband/fpga_lte_fec/fpga_lte_fec.c
+++ b/drivers/baseband/fpga_lte_fec/fpga_lte_fec.c
@@ -2091,7 +2091,7 @@ dequeue_enc_one_op_cb(struct fpga_queue *q, struct rte_bbdev_enc_op **op,
return -1;
/* make sure the response is read atomically */
- rte_smp_rmb();
+ rte_atomic_thread_fence(rte_memory_order_acquire);
rte_bbdev_log_debug("DMA response desc %p", desc);
@@ -2121,7 +2121,7 @@ dequeue_enc_one_op_tb(struct fpga_queue *q, struct rte_bbdev_enc_op **op,
return -1;
/* Make sure the response is read atomically */
- rte_smp_rmb();
+ rte_atomic_thread_fence(rte_memory_order_acquire);
/* Verify if done bit in all CBs is set */
cbs_in_op = desc->enc_req.cbs_in_op;
@@ -2133,7 +2133,7 @@ dequeue_enc_one_op_tb(struct fpga_queue *q, struct rte_bbdev_enc_op **op,
}
/* Make sure the response is read atomically */
- rte_smp_rmb();
+ rte_atomic_thread_fence(rte_memory_order_acquire);
for (cb_idx = 0; cb_idx < cbs_in_op; ++cb_idx) {
desc = q->ring_addr + ((q->head_free_desc + desc_offset +
@@ -2164,7 +2164,7 @@ dequeue_dec_one_op_cb(struct fpga_queue *q, struct rte_bbdev_dec_op **op,
return -1;
/* make sure the response is read atomically */
- rte_smp_rmb();
+ rte_atomic_thread_fence(rte_memory_order_acquire);
#ifdef RTE_LIBRTE_BBDEV_DEBUG
print_dma_dec_desc_debug_info(desc);
@@ -2199,7 +2199,7 @@ dequeue_dec_one_op_tb(struct fpga_queue *q, struct rte_bbdev_dec_op **op,
return -1;
/* Make sure the response is read atomically */
- rte_smp_rmb();
+ rte_atomic_thread_fence(rte_memory_order_acquire);
/* Verify if done bit in all CBs is set */
cbs_in_op = desc->dec_req.cbs_in_op;
@@ -2211,7 +2211,7 @@ dequeue_dec_one_op_tb(struct fpga_queue *q, struct rte_bbdev_dec_op **op,
}
/* Make sure the response is read atomically */
- rte_smp_rmb();
+ rte_atomic_thread_fence(rte_memory_order_acquire);
for (cb_idx = 0; cb_idx < cbs_in_op; ++cb_idx) {
desc = q->ring_addr + ((q->head_free_desc + desc_offset +
--
2.43.0
next prev parent reply other threads:[~2024-02-22 16:21 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-02-22 16:21 [PATCH 1/2] baseband/fpga_5gnr_fec: " Maxime Coquelin
2024-02-22 16:21 ` Maxime Coquelin [this message]
2024-02-22 18:05 ` Chautru, Nicolas
2024-02-26 11:03 ` Maxime Coquelin
2024-02-27 16:56 ` Maxime Coquelin
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=20240222162113.1896370-2-maxime.coquelin@redhat.com \
--to=maxime.coquelin@redhat.com \
--cc=david.marchand@redhat.com \
--cc=dev@dpdk.org \
--cc=hernan.vargas@intel.com \
--cc=nicolas.chautru@intel.com \
--cc=roretzla@linux.microsoft.com \
--cc=thomas@monjalon.net \
/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).