From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from NAM02-BL2-obe.outbound.protection.outlook.com (mail-bl2nam02on0055.outbound.protection.outlook.com [104.47.38.55]) by dpdk.org (Postfix) with ESMTP id 45D0C58DB for ; Thu, 10 Nov 2016 13:05:42 +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=q425xIvv+g13kNjeTUOaj7wKm49MsZqGmASryDRvPT0=; b=TwfgKNXmydhd73aUENSn9nhGrMrYX9Iu1ByYiYKHt/pWkMnZDocsjigVav78cZPjI1MCnbsSev4cLJ+0oUTloqLvinTzfmaPJmDI8BDYzMGaSPg69H1P4KuGw+ZgpR+rZe/h9vgfa5NntmM16LOxdFqgiuX2jI6j5J6Q75rpnqc= Authentication-Results: spf=none (sender IP is ) smtp.mailfrom=Satha.Rao@cavium.com; Received: from tns2.caveonetworks.com (50.233.148.156) by CY4PR07MB2838.namprd07.prod.outlook.com (10.169.252.16) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P384) id 15.1.707.6; Thu, 10 Nov 2016 12:05:39 +0000 From: Satha Rao To: CC: , , , , Satha Rao Date: Thu, 10 Nov 2016 04:04:27 -0800 Message-ID: <1478779467-35123-1-git-send-email-skoteshwar@caviumnetworks.com> X-Mailer: git-send-email 2.7.4 MIME-Version: 1.0 Content-Type: text/plain X-Originating-IP: [50.233.148.156] X-ClientProxiedBy: DM5PR10CA0017.namprd10.prod.outlook.com (10.172.33.27) To CY4PR07MB2838.namprd07.prod.outlook.com (10.169.252.16) X-Microsoft-Exchange-Diagnostics: 1; CY4PR07MB2838; 2:mTayS6UmfRFQYWgmwKyfQW9z0kNeTZD5ARNOsMn7EXwfXOfpa2sQcTnS0ltF77LsP+ngWudrDQAkINIBsCSPCGrG3uVW/rTdPkzTSjCFs1vmTdnNR++acEOFgtunsAbxKRci8ZL+/pXS33kYCVDf1Ned3HmusZiNq/VmPGIIRXw=; 3:hFShhRIhk8bULrzYeiy0X2w8Ukht0smtqKSiOZAQmPJaCmgxAXeJOqWSM0ETEixfrQGVeE5YUwEMMLNmpyZuoqKBAOm6rcH9GqZvaGJGHfxXzPxc0ozAm25148woiMzkX+woXKPeaCFaasVDwuyAyPCfWSnSwz3rZvYll3n+mRQ=; 25:k5zKs1kddgdVmwXhDVGfm2ecUvZJ3qQEZu8AkVThPVHmYxqKmpig/lTPGiMMdGUlUw/8Hfh6wYpWfS1sZXMFUTLEFgOgRyAOF+EQ8rTW8kYFnS7jIiwiGyJeoQ96okEH0CuONuB+muuNDLDdI/X7TMkj3amYulsyv3dikbtL9I03/nwHPIQSXYFFoDcrXTSdvdgyWuNRrDUc7GhMejQHi8EoSZyvisvKws/s4xwq+EDlaW3vPv6R3+VQH05kTYqFDjiT3Rfw+MXw0iLovinQOCC5uakag5HieOUNs6XaACbhsJZNldCTz6H12ZlOjppzfxmAo/NK1NUCMHbtdT6uSlvTkgqcvyWNEF/wIuAqCKHFVOp/iJcos3YbTf5DmHSH0SsElAlVbRn3FrhG3zgI+gIQSZxX/2+0GAeVby4Zh8DxxGY+J9OoENow/Z+dPx1p X-MS-Office365-Filtering-Correlation-Id: bc627566-fc63-4c4e-b95f-08d40961e37d X-Microsoft-Antispam: UriScan:;BCL:0;PCL:0;RULEID:(22001);SRVR:CY4PR07MB2838; X-Microsoft-Exchange-Diagnostics: 1; CY4PR07MB2838; 31:P6QBJwhG2HBLWzlkHGoDfYt0r7mlVujwmUAWHA+W3GIMsjNqzZUNnhkzI0YvjeuEl4GcOPvVuLkfKeKSqkQhtwIaAe4QiRJxS/ISbqC2kssf4uSJVeOHbcX2tFb+t8lem5xN+GNuaa3XZbFdoP5tpG9T1KMAFSOt9b1p6C/rwz6darATRNi3RLJaORRJ4rafco/cMWdwquWLv7TjocHy7MRLsq0xaFUZap04rY+YsKIj1XZmQ4oHzKFXpCZy5Bnj8qR1VjIXH7VKBm8s/0e9Vw==; 20:l2/RIV5Y4SqNP50zs9g8BX31lL/kpopfmuBJAQ3twbW8X4WA7x1GTiFd7k14O/G5MOZtPO+XRkeRvK/Bi3wMoCIkMonrhfsZxtuEf2fDLTYShFtIe0nK80bBON3X0WvKSgq5sXiK+A6ouXeEkphPEAsxdaHBN0JKisIdcanw/wx+UXBNt8+nwqXPD9XFKOXc3cbxfF0E9Z5bCaswTBtGxQHw37On/O3Ib0NkfB1QED7KjmEYPTEm6lOuWzLrwM+SJzatgjRdlwbbPI1uAasp5X+uagoK9EFpU94WPPjUWSTSYxTREBkEzv3oWMxBhstVcc6DuDEBa13k5EHuODSdZEa+lsbaAuSPB86FzZgO1rwu8RvSc4kq+mV4L75exkETsOd1dnOPFwlih2qrFQQv+XE9wDeD1BXdlbMo12SufNgnq/zSwVCb/TdvUq6KTUwo23Ld05/ep+pfYijsO4JiocIri6O50iXCV6J3nOlWClfCbE8yO6j3SLVpUYNeZ/DO3Uaeze9XJIrRKdl9H0e3/u8+H4+nQfD+bjX1jku4f9VCrLyDVtCS8DXxBIDLA2Z1DuFqL0mld1cYhzDweW9JNBnrjL3lFYR7HZo+WQ6aEH0= 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:CY4PR07MB2838; BCL:0; PCL:0; RULEID:; SRVR:CY4PR07MB2838; X-Microsoft-Exchange-Diagnostics: 1; CY4PR07MB2838; 4:sW0elvknJmbYFR6gEtI75/FM04VmGvCHSyO0QzevTyMQOUMDwqbQiBWD9CsZb4bWvOWkjmqeNrbMDmtRAk/FBdYUVXg13czniwtVrfV3pTjiUVIfB6fllecrillpsyKAx9HB0/gIpNRBUQYSAbup7tGzmdwgKWgKZHWK2Wv580xB8/asPGZNuKutNi0tuBrWJXlRAMV0CkucvBf+fV4tVC2i7XSnw3ba9stx6hmrplbrBMxQRojqCgkGPCvBUN6IhfhCp0GbU6tCBlTUH2UfeCAeb6olPF+tuPM1648ULatgSIh2oReNZpBqgwknUe/cqsmBHrU1ztq38rYZcXgjSvArhjIeLQzrWiRkf1jwX0PdQsFsbrK3Tspr4D12Vv1kkS++mXA/ngWgLDt+vdIecg== X-Forefront-PRVS: 01221E3973 X-Forefront-Antispam-Report: SFV:NSPM; SFS:(10009020)(4630300001)(6009001)(7916002)(199003)(189002)(97736004)(77096005)(4001430100002)(92566002)(5003940100001)(189998001)(107886002)(47776003)(2351001)(66066001)(50466002)(48376002)(42186005)(53416004)(106356001)(36756003)(105586002)(69596002)(110136003)(3846002)(33646002)(6916009)(42882006)(6666003)(5660300001)(6116002)(7846002)(7736002)(305945005)(68736007)(101416001)(50226002)(4326007)(2906002)(50986999)(81166006)(586003)(81156014)(8676002)(15760500001); DIR:OUT; SFP:1101; SCL:1; SRVR:CY4PR07MB2838; H:tns2.caveonetworks.com; 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; CY4PR07MB2838; 23:/p9Di5oGs11c1X66d9XRM1SYRTy/P0bEc8AF71Bxf?= =?us-ascii?Q?IS4E8jqlVWZE9Sb3LChQvFHcFMMLM4NZWuN2oYhx+rL+Kwcxr/zq4lDBSq7+?= =?us-ascii?Q?uCE3dwf0p7eGmWi5uFgzNqR0YXpurwpTToeu0tKv4r0Va3S2DzAb5eQMHg99?= =?us-ascii?Q?Fgxu5rzx+0BTxubBZGmxMnHv1ka5oHpYfpwhNduqj+SsM2G9JMd3TGFIDuls?= =?us-ascii?Q?Wcaq9FXL6JWg6JV03v5ndMT4j9Y1sMOTikLMM6VB9cbfYXThuZysLqtScqK9?= =?us-ascii?Q?iwzeX3Nh2ybD63IwLR1oKXcwT4aHqZQitabxM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works.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 10 Nov 2016 12:05:39.2061 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-Transport-CrossTenantHeadersStamped: CY4PR07MB2838 Subject: [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:05:43 -0000 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(); 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(); + } /* if cmd_details are not defined or async flag is not set, * we need to wait for desc write back -- 2.7.4