From patchwork Thu Feb 22 16:21:12 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Maxime Coquelin X-Patchwork-Id: 137037 X-Patchwork-Delegate: maxime.coquelin@redhat.com Return-Path: X-Original-To: patchwork@inbox.dpdk.org Delivered-To: patchwork@inbox.dpdk.org Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id 7673043B78; Thu, 22 Feb 2024 17:21:22 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 1308C40281; Thu, 22 Feb 2024 17:21:22 +0100 (CET) Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) by mails.dpdk.org (Postfix) with ESMTP id 9D7894027F for ; Thu, 22 Feb 2024 17:21:20 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1708618880; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=lfWzi+s91uV7Xuh8NNOLFe53v+6N20PU7570JnDibXc=; b=hPs59G3pugn4HK86xz7zSlrs0pV1d8vIef/kLLuKzmvcu05xXLlWTl5uYVGGLi1Yal4JgA tbP9yNJhCA5+wSQuek/oS+LMX9rnnPVMEFzyCkpM5HcoU5bYK2ke6Wd21DlVslehZ4vfXx dx1Ilnvd1OcV+jj/uJBBqxbLDZC26fQ= Received: from mimecast-mx02.redhat.com (mimecast-mx02.redhat.com [66.187.233.88]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-153-fzfykomxNsO3wOvxjHd2zA-1; Thu, 22 Feb 2024 11:21:18 -0500 X-MC-Unique: fzfykomxNsO3wOvxjHd2zA-1 Received: from smtp.corp.redhat.com (int-mx01.intmail.prod.int.rdu2.redhat.com [10.11.54.1]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id EEF9683BA89; Thu, 22 Feb 2024 16:21:17 +0000 (UTC) Received: from max-p1.redhat.com (unknown [10.39.208.17]) by smtp.corp.redhat.com (Postfix) with ESMTP id EBF7A48B; Thu, 22 Feb 2024 16:21:15 +0000 (UTC) From: Maxime Coquelin 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 Subject: [PATCH 1/2] baseband/fpga_5gnr_fec: use new barrier API Date: Thu, 22 Feb 2024 17:21:12 +0100 Message-ID: <20240222162113.1896370-1-maxime.coquelin@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 3.4.1 on 10.11.54.1 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org rte_smp_rmb() is deprecated, use the new API instead as suggested in rte_atomic header. Signed-off-by: Maxime Coquelin --- drivers/baseband/fpga_5gnr_fec/rte_fpga_5gnr_fec.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/drivers/baseband/fpga_5gnr_fec/rte_fpga_5gnr_fec.c b/drivers/baseband/fpga_5gnr_fec/rte_fpga_5gnr_fec.c index efc1d3a772..314c87350e 100644 --- a/drivers/baseband/fpga_5gnr_fec/rte_fpga_5gnr_fec.c +++ b/drivers/baseband/fpga_5gnr_fec/rte_fpga_5gnr_fec.c @@ -2661,7 +2661,7 @@ vc_5gnr_dequeue_ldpc_enc_one_op_cb(struct fpga_5gnr_queue *q, struct rte_bbdev_e 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); @@ -2690,7 +2690,7 @@ agx100_dequeue_ldpc_enc_one_op_cb(struct fpga_5gnr_queue *q, struct rte_bbdev_en 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); @@ -2722,7 +2722,7 @@ vc_5gnr_dequeue_ldpc_dec_one_op_cb(struct fpga_5gnr_queue *q, struct rte_bbdev_d 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 vc_5gnr_print_dma_dec_desc_debug_info(desc); @@ -2768,7 +2768,7 @@ agx100_dequeue_ldpc_dec_one_op_cb(struct fpga_5gnr_queue *q, struct rte_bbdev_de 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 agx100_print_dma_dec_desc_debug_info(desc); From patchwork Thu Feb 22 16:21:13 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Maxime Coquelin X-Patchwork-Id: 137038 X-Patchwork-Delegate: maxime.coquelin@redhat.com Return-Path: X-Original-To: patchwork@inbox.dpdk.org Delivered-To: patchwork@inbox.dpdk.org Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id C2E3143B78; Thu, 22 Feb 2024 17:21:26 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 141E040A84; Thu, 22 Feb 2024 17:21:25 +0100 (CET) Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) by mails.dpdk.org (Postfix) with ESMTP id 65BD54027F for ; Thu, 22 Feb 2024 17:21:24 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1708618884; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=nSMU2dHsyKthg0VoB7SMBG5VkLDNvOI9PZb5YgPe31w=; b=KR5hbthqlvxWzl0fMxvR00aljt2ROZAdzgXSuG/qfVaLPjSGEngRAK8I9L795yk1eqHa0/ 6+aBgip3Wl9PwLj7+n2BoyTZS+nlJ1OUH5tJqXBgvdsNApLZUtRccwUrZDXVstNMfsCWiY LbRS3r94m9jNyzBM2S0csHGdchB14A0= Received: from mimecast-mx02.redhat.com (mimecast-mx02.redhat.com [66.187.233.88]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-355-FDYkQBMdMs-fWP6gga2Aqw-1; Thu, 22 Feb 2024 11:21:20 -0500 X-MC-Unique: FDYkQBMdMs-fWP6gga2Aqw-1 Received: from smtp.corp.redhat.com (int-mx01.intmail.prod.int.rdu2.redhat.com [10.11.54.1]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 2160483BA90; Thu, 22 Feb 2024 16:21:20 +0000 (UTC) Received: from max-p1.redhat.com (unknown [10.39.208.17]) by smtp.corp.redhat.com (Postfix) with ESMTP id 3F03C24E4; Thu, 22 Feb 2024 16:21:18 +0000 (UTC) From: Maxime Coquelin 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 Subject: [PATCH 2/2] baseband/fpga_lte_fec: use new barrier API Date: Thu, 22 Feb 2024 17:21:13 +0100 Message-ID: <20240222162113.1896370-2-maxime.coquelin@redhat.com> In-Reply-To: <20240222162113.1896370-1-maxime.coquelin@redhat.com> References: <20240222162113.1896370-1-maxime.coquelin@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 3.4.1 on 10.11.54.1 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org rte_smp_rmb() is deprecated, use the new API instead as suggested in rte_atomic header. Signed-off-by: Maxime Coquelin --- 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 +