From mboxrd@z Thu Jan 1 00:00:00 1970 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) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=CAVIUMNETWORKS.onmicrosoft.com; s=selector1-cavium-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version; bh=WE/tl4pFcEYUlEpjDGr6kS3jT+tQ6ubC/MlmLwouOuc=; b=PryCU8SHFrwKbif4NPNy30yOJv7BWlli0c8ZBQXfjzOswxaxiG7k0O/JOtrK6taTttbpUW2UAzEtmnfoLrHS9m3NeGGLFMjcQbCkpFmPse75dluRpejZCKJRCLCPAVU7dpXtlNNZn4DWLQiVJsDSpUIR3213GjfcURNryG5CU78= Authentication-Results: spf=none (sender IP is ) smtp.mailfrom=Jerin.Jacob@cavium.com; Received: from localhost.localdomain (111.93.218.67) by BY1PR0701MB1721.namprd07.prod.outlook.com (10.162.111.140) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P384) id 15.1.693.12; Thu, 10 Nov 2016 12:11:38 +0000 Date: Thu, 10 Nov 2016 17:41:18 +0530 From: Jerin Jacob To: Satha Rao CC: , , , 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" Content-Disposition: inline In-Reply-To: <1478779467-35123-1-git-send-email-skoteshwar@caviumnetworks.com> User-Agent: Mutt/1.7.1 (2016-10-04) X-Originating-IP: [111.93.218.67] X-ClientProxiedBy: PN1PR01CA0057.INDPRD01.PROD.OUTLOOK.COM (10.164.136.157) To BY1PR0701MB1721.namprd07.prod.outlook.com (10.162.111.140) X-Microsoft-Exchange-Diagnostics: 1; BY1PR0701MB1721; 2:zALTLtmngF8n4X+fnntJTnqsjrcGVXbZPb9Osdi4wYXN6dhtpJX38QkgC91qBwtt+2nWs1pfxjgrBIrdM9IvOJ6ZGYh3HFDdoK8Ie140ub7kykEy9oRdKGUTt3ZQuB06bOsGc2Ei7/1LfNhqz3+ztwrD5qgICQNA3Hiv0dfAAnE=; 3:GajuqSr2tH4YJiQ9qq7WsNb3rutPu5mjqP527hOgdE7s1J1rR11HcljVXrfOABi2r4KBi0WgiKFYMha4YQwYgy3Zw3nqEjOASmq4H2S7Ux1evEygdo7dFS41FcyFuIR/OKj46XwOkDVSbLqQ5cEQ36EaYug5/xAM2Esl0lrP4Ek= X-MS-Office365-Filtering-Correlation-Id: b58a2add-37ae-4272-f43b-08d40962bb36 X-Microsoft-Antispam: UriScan:; BCL:0; PCL:0; RULEID:(22001); SRVR:BY1PR0701MB1721; X-Microsoft-Exchange-Diagnostics: 1; BY1PR0701MB1721; 25:yuVoBPcvX88KRAulDBeJbF2bCrSt/y4DeriQKvcNclLl0L/DZywCAtP6fK3Tp83nQp59A6nbDxpXRXs06HjTl8of5M81QyiVWpF2cK8NdHo/lSTrqWDCcbVTcqDB54wpk8Ga763pfbMk/de8T0gCmJsDL5OAVVIM6dK3MozA9V8VwXasoSBTjwldeNjsqO7L5g/0iT32ZF1G2n6IdJBICwFGSX0N1vdTsdB5g4SNgWfeQZpnZZ+caLWPm3mNlE9ozLmB5x5ML39xOxwq9DCRFmWKSuyjOJpPWc/pYoK30UZkeirEjcTQ8No9JAOltEL+Z0qEvSnraNjDn1UDiOQqa8ndB1duCxtnOnxzq+jRjIhwUvRpurQ06L8YxfoFZOwElpCzQuQCcTUW+XfSlj2H8uih7D7pxPRqwBqDdQauwwLnHe6ogm3ldBVQH66JQ9iO0R7JcVMIBwxbrWZ6JZzlm82Y7Vpr+W1naJw+oLCKGS5nLS1Zbv4K2YYZSYhnUsQYj30VJh3u9Rzz5REdnGs0TyEEqucJImyafijhx+v5kV1llIxLCAUObXN1uuoILKMI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v2MkFY5LU7Pws4eeQ7X+mCNUpZuEXTd7Do86GMcSDqyPAhr0nEiWswMyxOuW8F82fdBjZSSEpxKXcACasM= X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:; X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(6040176)(601004)(2401047)(5005006)(8121501046)(10201501046)(3002001); SRVR:BY1PR0701MB1721; BCL:0; PCL:0; RULEID:; SRVR:BY1PR0701MB1721; X-Microsoft-Exchange-Diagnostics: 1; BY1PR0701MB1721; 4:1MlPnpF7pPH67fZRHMJXkhreIYYYYkyCeBxJNdyzDuVH9I8STUT7CWnoJ29l9/860v9Z2indXo740IYDVjo6DnPeo7V8jODr420t0mc4Y7zwfVpUxIo5VU/UuEdlGsI6BrSQTtk9Di+RFaVo2LnkD3C2jYud9Nvm4aRsErk/MSECTKdQ4ahelgMuyFEXGZZwZcNfMX42jO9XOz2HwZiFxkSbMfxaIK9wBa/Gz7yF25GT2DOOHvdhD0TRCxr1a+j2nCRO6TA7iHIzCvxAql6pytA7BeFuF7bF52RxMwmP6wHQJcc7askymieovgbMyq2YiWGCxDxT4XatD/dSf3LqwQYnDxTFAUI9Zrw9jzfGXV7yVKJFQMFBxwd9A+cxYgXCjx3rc+uVqQVjFr2ii4X8DA== X-Forefront-PRVS: 01221E3973 X-Forefront-Antispam-Report: SFV:NSPM; SFS:(10009020)(4630300001)(6009001)(6069001)(7916002)(199003)(24454002)(189002)(3846002)(6116002)(6636002)(6666003)(6862003)(42882006)(2950100002)(9686002)(586003)(7736002)(305945005)(110136003)(7846002)(61506002)(2906002)(66066001)(83506001)(229853002)(1076002)(47776003)(189998001)(5009440100003)(68736007)(5660300001)(4326007)(23726003)(50986999)(105586002)(33656002)(106356001)(54356999)(101416001)(42186005)(4001350100001)(97756001)(97736004)(50466002)(76176999)(92566002)(81156014)(81166006)(46406003)(8676002)(77096005)(7099028)(18370500001)(15760500001); DIR:OUT; SFP:1101; SCL:1; SRVR:BY1PR0701MB1721; H:localhost.localdomain; FPR:; SPF:None; PTR:InfoNoRecords; A:1; MX:1; LANG:en; Received-SPF: None (protection.outlook.com: cavium.com does not designate permitted sender hosts) X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1; BY1PR0701MB1721; 23:3kpZsnNAQ1WFdipMk+kT2oPewfa1xpkVCbIWKt+?= =?us-ascii?Q?QSt4oyUEU7wl/MaGKda8xheV/iHRTpAW3yE84eVjz+vKPr0VjgXWFmJoTUPU?= =?us-ascii?Q?ygxiTJa2FniPeJtE/GXFTZze78l5mbRrjofomVu97rH6lhkZtfsSKx99AN3H?= =?us-ascii?Q?i3me7sDuZIkpqluj7NpLPjjmUYdq2xCP9VxbQduTVltzur/bhBC4dADxGgzB?= =?us-ascii?Q?ONRuQ5P7uF4r62jVbElFibYd2PrI17KE30CPtjC+NlMAF0UZk5dVcEL1BLIt?= =?us-ascii?Q?nPP8ofghDQaAgixfGFqMqwJLxI7hiBbmlI0FE2L4NtiCpUgfqEWF7n9gqRti?= =?us-ascii?Q?Sa3sW3sm/AJzfwEgpMh4a5yOWOsY1I8VHpaxm6Ee1KxAGNp2rbFXxBCe/GMV?= =?us-ascii?Q?cKekzlS3UtfqDwcZDwSW8cjEtOyRoyJEZ7k65QOj0TLmWKDfV1TsDKfSTjH5?= =?us-ascii?Q?fKnCnyrEoLIvLoHolqgBWTZq8gZl5DKz9MdV4JAO9CKZAKxXqR7NhnPhmPEK?= =?us-ascii?Q?i/Xms90gnNw6DXhihQDjKAjSCYSxEumT8Iuz+ACgwnjtH/3HuXTrJe8no3Fo?= =?us-ascii?Q?S8TvZYNN33GR8+Z61pAS3vbi1mxfHLJvVSp4CX7RVA9foUwwb9hjdd7zb9IK?= =?us-ascii?Q?I8AIUyg8W/OrpEpCJxAoVVR4DeHdxGNiLnOOb1uUg1dGUbugyzfseTUTjkDG?= =?us-ascii?Q?GRK5ryuqYFoaC1R+YTXevxU9mtLvu5dxl9OOQbUPzyDBWFTLNaWY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M3BhQR4chp; 5:dsLSvp8oQ8NNim+3bmB2IwOrxLtb/2H/1RvvzaplCZSl7cI5QbLlz9XqD6+k/clU1NaeNaQu/ehCptHePTIrt0TXa1T9SME/rBFuvpMKirenN4n3yd6L+2lbnE+kBTp7hPQ/MER114J+qJWgqjSTQg==; 24:oPm1MXaOmKOrbeE8ooLFg5hOKrpoRLNiFNNmK0zyuyhR3b0vtmgnnwiTMX8/SIv+Ru4tGMjBOKaHBoE617QERbROxPjqkA2WQF5Hsewg3is= SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-Microsoft-Exchange-Diagnostics: 1; BY1PR0701MB1721; 7:pwxnFraWPBIcNYggq/0LELfjMuH9CZ29TDuRRjBpy19PoYlCtELGN0ila5zhnapsr2mpcJP3IyEif6iJnxiV8jjFbO3gM5vIjcY7Q49IRqPeOwWGyyv6aDNFZ/2h7Yq9unS8IO6u1+5IJr4AXTmN1PeVZRCU/BMeRaHSXmZwQoIsLHJyDIcHKPMo0+J1vz8COHeJxuyu6MW8TulF3IM2TkAuBtoQ4IRxKa+fG5vrnx40RmHA/Dew6+XaGBSK1CxczHXI23G4OY7LgtyyjnpzaEN2i4yLlBwrHd6U0aDOXgrPGJCjIg1FBeawSgLzTIC3qRqiG41B/733szh+XJ0SMoo0Bc4YQ9ERfgMllqnTNtc= X-OriginatorOrg: caviumnetworks.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 10 Nov 2016 12:11:38.2548 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-Transport-CrossTenantHeadersStamped: BY1PR0701MB1721 Subject: Re: [dpdk-dev] [PATCH] i40e: Fix eth_i40e_dev_init sequence on ThunderX X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: patches and discussions about DPDK List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 10 Nov 2016 12:11:45 -0000 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 >