From mboxrd@z Thu Jan 1 00:00:00 1970 From: Jerin Jacob Subject: Re: [PATCH] i40e: Fix eth_i40e_dev_init sequence on ThunderX Date: Thu, 10 Nov 2016 17:41:18 +0530 Message-ID: <20161110121116.GA8110@localhost.localdomain> References: <1478779467-35123-1-git-send-email-skoteshwar@caviumnetworks.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Cc: , , , To: Satha Rao Return-path: Received: from NAM02-CY1-obe.outbound.protection.outlook.com (mail-cys01nam02on0075.outbound.protection.outlook.com [104.47.37.75]) by dpdk.org (Postfix) with ESMTP id 35A80590E for ; Thu, 10 Nov 2016 13:11:45 +0100 (CET) Content-Disposition: inline In-Reply-To: <1478779467-35123-1-git-send-email-skoteshwar@caviumnetworks.com> List-Id: patches and discussions about DPDK List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" On Thu, Nov 10, 2016 at 04:04:27AM -0800, Satha Rao wrote: > i40e_asq_send_command: rd32 & wr32 under ThunderX gives unpredictable > results. To solve this include rte memory barriers > > Signed-off-by: Satha Rao > --- > drivers/net/i40e/base/i40e_adminq.c | 5 ++++- > 1 file changed, 4 insertions(+), 1 deletion(-) > > diff --git a/drivers/net/i40e/base/i40e_adminq.c b/drivers/net/i40e/base/i40e_adminq.c > index 0d3a83f..1038a95 100644 > --- a/drivers/net/i40e/base/i40e_adminq.c > +++ b/drivers/net/i40e/base/i40e_adminq.c > @@ -832,6 +832,7 @@ enum i40e_status_code i40e_asq_send_command(struct i40e_hw *hw, > } > > val = rd32(hw, hw->aq.asq.head); > + rte_rmb(); use rte_smp_rmb() variant to avoid performance regression on x86 > if (val >= hw->aq.num_asq_entries) { > i40e_debug(hw, I40E_DEBUG_AQ_MESSAGE, > "AQTX: head overrun at %d\n", val); > @@ -929,8 +930,10 @@ enum i40e_status_code i40e_asq_send_command(struct i40e_hw *hw, > (hw->aq.asq.next_to_use)++; > if (hw->aq.asq.next_to_use == hw->aq.asq.count) > hw->aq.asq.next_to_use = 0; > - if (!details->postpone) > + if (!details->postpone) { > wr32(hw, hw->aq.asq.tail, hw->aq.asq.next_to_use); > + rte_wmb(); ditto > + } > > /* if cmd_details are not defined or async flag is not set, > * we need to wait for desc write back > -- > 2.7.4 >