From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id E500D43F6C for ; Thu, 2 May 2024 22:49:21 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id DA4FC402D7; Thu, 2 May 2024 22:49:21 +0200 (CEST) Received: from mgamail.intel.com (mgamail.intel.com [198.175.65.11]) by mails.dpdk.org (Postfix) with ESMTP id 306F1402B2; Thu, 2 May 2024 22:49:19 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1714682959; x=1746218959; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=X7H3n+cfp1WvAjJNy7V3T+W2CzpJGrVwOIkX8OushEs=; b=JI1QlSSlJ38VubeADPduZbcFnx2tFjRwain33c6x9DmqpZ/Fy4wVDnE2 jrQB6U037/iE7cExaooaBFRnuIi9RwTs+HhFuNaXUNo1PCZw91QA+02ms AqJpeg4Iasj34ULnggChZhSHV/HilvNKC2wNbiWrn/LhWeV1jsW0pH5+X XxfGthl+6BYKrpSxU8Rxei/X1+Ccf7q5m+o5W5yD1kBbi8kfsk6qEkEJK NTvgiouT5q72nSTMeHxSCzWDl+jt1SPrdV8qmSpnH+wHtfOe2l67Y3bgW HRfWwFH2x3+IJbuIcFilYOGO5YAeNzS/p5Lbc/5wayh2xNTDJD3RnPfwa g==; X-CSE-ConnectionGUID: Pup8fYqYTFmz3bj4KLjEng== X-CSE-MsgGUID: IOxd7fsCTF60PK7TK8oYkA== X-IronPort-AV: E=McAfee;i="6600,9927,11062"; a="21032746" X-IronPort-AV: E=Sophos;i="6.07,247,1708416000"; d="scan'208";a="21032746" Received: from orviesa008.jf.intel.com ([10.64.159.148]) by orvoesa103.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 02 May 2024 13:49:18 -0700 X-CSE-ConnectionGUID: E7sj/XEzSHq+VdOjgfFnzQ== X-CSE-MsgGUID: WlD/rIk0T5O4YDHPYv2WeA== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.07,247,1708416000"; d="scan'208";a="27838115" Received: from unknown (HELO csl-npg-qt0.la.intel.com) ([10.233.181.103]) by orviesa008.jf.intel.com with ESMTP; 02 May 2024 13:49:18 -0700 From: Hernan Vargas To: dev@dpdk.org, gakhil@marvell.com, trix@redhat.com, maxime.coquelin@redhat.com Cc: nicolas.chautru@intel.com, qi.z.zhang@intel.com, Hernan Vargas , stable@dpdk.org Subject: [PATCH v2 1/5] baseband/acc: fix memory barrier Date: Thu, 2 May 2024 13:45:44 -0700 Message-Id: <20240502204548.236729-2-hernan.vargas@intel.com> X-Mailer: git-send-email 2.37.1 In-Reply-To: <20240502204548.236729-1-hernan.vargas@intel.com> References: <20240502204548.236729-1-hernan.vargas@intel.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-BeenThere: stable@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: patches for DPDK stable branches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: stable-bounces@dpdk.org Moving memory barrier so that dequeue thread can be in sync with enqueue thread. Fixes: 32e8b7ea35dd ("baseband/acc100: refactor to segregate common code") Cc: stable@dpdk.org Signed-off-by: Hernan Vargas --- drivers/baseband/acc/acc_common.h | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/drivers/baseband/acc/acc_common.h b/drivers/baseband/acc/acc_common.h index fddeb0737b8b..e249f37e38fe 100644 --- a/drivers/baseband/acc/acc_common.h +++ b/drivers/baseband/acc/acc_common.h @@ -1112,6 +1112,9 @@ acc_dma_enqueue(struct acc_queue *q, uint16_t n, req_elem_addr, (void *)q->mmio_reg_enqueue); + q->aq_enqueued++; + q->sw_ring_head += enq_batch_size; + rte_wmb(); /* Start time measurement for enqueue function offload. */ @@ -1122,8 +1125,6 @@ acc_dma_enqueue(struct acc_queue *q, uint16_t n, queue_stats->acc_offload_cycles += rte_rdtsc_precise() - start_time; - q->aq_enqueued++; - q->sw_ring_head += enq_batch_size; n -= enq_batch_size; } while (n); -- 2.37.1