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 73448454DF; Mon, 24 Jun 2024 12:04:17 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id D276140E4D; Mon, 24 Jun 2024 12:03:15 +0200 (CEST) Received: from mgamail.intel.com (mgamail.intel.com [192.198.163.13]) by mails.dpdk.org (Postfix) with ESMTP id 2B40640DCA for ; Mon, 24 Jun 2024 12:02:34 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1719223354; x=1750759354; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=PGr0HG9TkKjKZTmgdnPuhBMWMPRcbPMHJPXZK/vNC04=; b=Q3hcw60L5msAtJzS8I+mhLV0StWhpnrsPEE5LUHD4apJ4x0SjqXniRAo 5qMcp+QEaziA/ZIsmUJ2z0REvlP4WG22bto1fcYbyn0rFDAK/3Wxlo7xT cUo7t5ograQl8CL205bGjDg5H6V0rAnqasro1jic4rtLMgqSEBChHHoKf jUWOJ5IubC4c7HZr5e+c6prfzIVCmHpS8iGgt94kN817TfjnqGVW4vd2/ pvtvBPO7t3592KrBEX9hrdPXnddPlcClBAWIWIBhZw4Pj8NXmfBdWWk/V buuDbyURr92P6EZlNfkYSqLv5DrbOioaCuoAocBY46/CJLABP7diW8+vI g==; X-CSE-ConnectionGUID: eYh+xhZdSfSfrWs2tvF3pA== X-CSE-MsgGUID: y620xsTeSz214vTEnC4qTg== X-IronPort-AV: E=McAfee;i="6700,10204,11112"; a="19086448" X-IronPort-AV: E=Sophos;i="6.08,261,1712646000"; d="scan'208";a="19086448" Received: from fmviesa001.fm.intel.com ([10.60.135.141]) by fmvoesa107.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 24 Jun 2024 03:02:33 -0700 X-CSE-ConnectionGUID: T2/fU/rxTFux8MXnUf/YHg== X-CSE-MsgGUID: Yojdw75YT+ely++iNTo/vQ== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.08,261,1712646000"; d="scan'208";a="74479161" Received: from unknown (HELO npf-hyd-clx-03..) ([10.145.170.182]) by fmviesa001.fm.intel.com with ESMTP; 24 Jun 2024 03:02:31 -0700 From: Soumyadeep Hore To: bruce.richardson@intel.com, anatoly.burakov@intel.com Cc: dev@dpdk.org Subject: [PATCH v5 15/21] common/idpf: add wmb before tail Date: Mon, 24 Jun 2024 09:16:38 +0000 Message-ID: <20240624091644.2404658-16-soumyadeep.hore@intel.com> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20240624091644.2404658-1-soumyadeep.hore@intel.com> References: <20240618105722.2326987-22-soumyadeep.hore@intel.com> <20240624091644.2404658-1-soumyadeep.hore@intel.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit 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 Introduced through customer's feedback in their attempt to address some bugs this introduces a memory barrier before posting ctlq tail. This makes sure memory writes have a chance to take place before HW starts messing with the descriptors. Signed-off-by: Soumyadeep Hore --- drivers/common/idpf/base/idpf_controlq.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/common/idpf/base/idpf_controlq.c b/drivers/common/idpf/base/idpf_controlq.c index 65e5599614..4f47759a4f 100644 --- a/drivers/common/idpf/base/idpf_controlq.c +++ b/drivers/common/idpf/base/idpf_controlq.c @@ -604,6 +604,8 @@ int idpf_ctlq_post_rx_buffs(struct idpf_hw *hw, struct idpf_ctlq_info *cq, /* Wrap to end of end ring since current ntp is 0 */ cq->next_to_post = cq->ring_size - 1; + idpf_wmb(); + wr32(hw, cq->reg.tail, cq->next_to_post); } -- 2.43.0