From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from NAM03-BY2-obe.outbound.protection.outlook.com (mail-by2nam03on0067.outbound.protection.outlook.com [104.47.42.67]) by dpdk.org (Postfix) with ESMTP id 6CB6D68A1 for ; Thu, 11 May 2017 12:11:31 +0200 (CEST) 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=l9iyvbde/HfaqmlnPZ5MgZmEjbn+SX/cKzqfsN5UPDg=; b=NpRRmCleAW3OBvB+McJWcFiCo1OcLus/FXANE+JzllVT3vybYeigpW8NIXdml47Z3nUoXvH6ltgvQacgSWMSAWgAACXAXOPQp5VRrwJ+GOc1yBUOTbkT/gqcSm+7S0xLuokTPmDKp0KC0eSsOfOQwH1/ZeU1TZ7CEfIf4SrySNU= Authentication-Results: dpdk.org; dkim=none (message not signed) header.d=none;dpdk.org; dmarc=none action=none header.from=caviumnetworks.com; Received: from jerin.domain.name (111.93.218.67) by BLUPR0701MB1716.namprd07.prod.outlook.com (10.163.85.142) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.1075.11; Thu, 11 May 2017 10:11:26 +0000 From: Jerin Jacob To: dev@dpdk.org Cc: thomas@monjalon.net, jianbo.liu@linaro.org, viktorin@rehivetech.com, Jerin Jacob , Bruce Richardson , Konstantin Ananyev Date: Thu, 11 May 2017 15:40:44 +0530 Message-Id: <20170511101046.26456-4-jerin.jacob@caviumnetworks.com> X-Mailer: git-send-email 2.12.2 In-Reply-To: <20170511101046.26456-1-jerin.jacob@caviumnetworks.com> References: <20170511101046.26456-1-jerin.jacob@caviumnetworks.com> MIME-Version: 1.0 Content-Type: text/plain X-Originating-IP: [111.93.218.67] X-ClientProxiedBy: PN1PR01CA0070.INDPRD01.PROD.OUTLOOK.COM (10.164.136.170) To BLUPR0701MB1716.namprd07.prod.outlook.com (10.163.85.142) X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 99625d1f-3d93-47fc-9022-08d49856175b X-Microsoft-Antispam: UriScan:; BCL:0; PCL:0; RULEID:(22001)(201703131423075)(201703031133081); SRVR:BLUPR0701MB1716; X-Microsoft-Exchange-Diagnostics: 1; BLUPR0701MB1716; 3:2Pye2AAN1TbCLRBGpiCof/QBWyDXTzpKmrh9Syi6xxzvTaqJV01mN8xEXU1WufOPTWnSdMqZqtaFT+r4fXDg8B7sQr5wrCKfVmV2h6WxkyJgfMgvDLn9NV5d8ohuw4u81M/54YGhNUVB+/JNbv/P9HkCwc0xvmk5US9C3VoX4wK0NmkRVRd9iOuhsRLKgP6CWk8z5RtnyXFymFzD/8RzuGlvFHJJSCx7KxNI4h7mFfyl+XkJF9noDIThHYeEyiO8lDLz2jcRWVmU7/Q05YhFV9gm3NT9KeO6iX+gVWSqhRYER8lQo8uVOQ64fKqOn4T/tk1R2e1mcXx8ADuPghPtRQ==; 25:vxrIHJt8YMpGH10mBNxO/cLNXBE1maLASjWSktjAFX83Hgh+S/2KBKbDmlejULYQRChXjO2KX+nSbv3ynD7Qp/WlZBV+Qv0GFsfbeuVxe/CpyyfLkgfIa9pcKikimoXU/0txhTKX7GwKOZm32PmKBGjyTpEuyp+XwBsKUiVhPP/uTn/Fvmg/vNmySYas5A9Jexijb4qpXLMRxK3XULBLnEVuyRjcAkejUiBH2n+wiu5v53HF/sxUmMJ32cOzHeBfrDb/vvvuzOJ3NzOUkJ1tnS+wcVoJGMDmjig/zZmYQvc9rr4AKHUqtb58sPdO5qxsEnLQkGZhT/P5vF/1zzIVp/qtpkBFNx+BQ4gg0rJctnXhaxewQl7AhEy+wQ0tZ5lcIFRzaiN8VYB3rRJ8thzVlnle/hJ6qZfSKEbMgAEp5ypIke9awzOtvq8UexPHQrnMJKlUzFdTmFgoKG8bpt1Wb8gW4xbn5BlTbJsMnEx0ox8= X-Microsoft-Exchange-Diagnostics: 1; BLUPR0701MB1716; 31:osa/U1movZP/PysuF1KVUDwSydj78J6vLvWmGihTsgmWScy2tfXUmIYYu7WI7Y2PPjBvLKpULVXMJn18eosdKaAnkFFZ9JU2GIFHV2eROo9gU4aou2D+z//f4c/80ffp4tMjUwhILbbvCbqjd+IBOgP8F6GXWDxYYw4FkwaKeNFS2CbCVJkTQLgJ8pIWgzY7US/PYb/xRIxoar1anIE/TagH0sGUlO6pyNti5+LA9bo=; 20:Rmjv7RDabbN9dEMJwjRgY2dgvdeXvSy/wHLGkUDT9+Fs2eh80Cx3+KuKDjeL25AW98H+aIAd1A95xFnmKIz49aJTpVnPPFmFoUlkEYeiPWgCJaVzn1WDYwAeD4pU3o/XjRph+Cy5pRHm9uy9XFl9lntqHNws4rqqQBAMwJ2O4dJZ2nzBrjG58fpg9KIybDK8sBYucCzFhSh/m7kCNFwZtN3gTewSVaNFtLEBrZ5e2ENql9NrZJ+YKsk1TYj1ZOv04USvs9yLFL3mewZpa6w9opwUQX8VT8vJZ4+ZuSfDFEghbu1CRATqL3aoEwcSz5ZY+4/Lgzpz8HbmqbnUSgbAnQmoYIEiChtCo/KDOQ/3F6TXZLMCYt0SN72WvdAVMVe781YXzeNluQ6wQ9ATRtZlOWEotLKIsehaSmXB7qvpOFziLr/6BpaHW1Wjr7/8Miagy62Zz2swmrroa6L00j57hdGPnqWGEF0v4jrZ0ee0/4oUe6/+YvnYw+VYHa8fkT5X5xcrvPJWFl5Ui/d6ST2/NX2OluRR00epajB1RyySu/FNuZZ4aKtu2h4+0GT+IirH4AaXqqG22DGbut6J4uZe3qTpjZKlE4llMDqUdmjev0Y= X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:(228905959029699); X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(6040450)(601004)(2401047)(5005006)(8121501046)(3002001)(93006095)(10201501046)(6041248)(20161123555025)(20161123562025)(20161123560025)(20161123564025)(20161123558100)(201703131423075)(201702281528075)(201703061421075)(201703061406153)(6072148); SRVR:BLUPR0701MB1716; BCL:0; PCL:0; RULEID:; SRVR:BLUPR0701MB1716; X-Microsoft-Exchange-Diagnostics: 1; BLUPR0701MB1716; 4:BIUFvOrp86Q8Id1uS2Mi82UfT9biUsOdloZQU8sxgAtxo5eMYsNKDVM93g3cm7cIQhFkYoKrnjaIr75VuJRObGZsxY7dpCIfUTBjGXgvZujZrei5O/sDfy1Ax32+AzXWHWp1ylXakRndgLzWAd/qof2Fa/NIvTRWmJQCIod1NmdJYvdn7UIEBiz/PNCP954JM28/rBewuZTF8vEmaTelIIWmbF5cL0B/yILrJQJP0oUScxQwz0fMmVpf2UoSinMxczERdp2O40PvXKY2GYbGpr5g4CeEfi+tCxz20cXz21DWyoTHUI1PYJaSejAyjSPQ2kStJJlP+1hMkP7Dv+pq4hRYDIKtzlFpjKokYvXv97sJplGrB8YA1hfvHcGuFLlbWwLS1qOG2vJGsd5cyB5JmPTV8/Oa/LLKzZKryyou9ttcae4Yleuy89yh5kBUMz3Gy8o1P6FOMdInKhvGinaaMkDS/MZmG14eFa3kHWtWbhy4gvAKkb/Pm56Dx9i+dL1kBtOxrdg19UcrP6+pOUcjv0GWDlhctePApNK6ITBK68zz+QfcoACmM4N7MJqWghuMY63x6Tkwuw8dWV51CwyaDSGp+p0U9lgaaGBRw98Jh23IanBBfmkogngwkColcTYyzW7E98L+4jXPthZ/b++m/fjVwKRQ4BbbRWBwNqXKheQUy1LsTdU0MUI+Ts9O6GACdsRBg1n1ly4PPMBPcnqrugu4Wn5Y0LqZCE8ezgOmfqYyXVKYe4yVYpFKSnhUBoRNT0QWCWbu0YkC5g6Ew1YCsfGFcFhUAhLl9phcp6tVQksxoE/OP9q44acId3HPfdMu X-Forefront-PRVS: 0304E36CA3 X-Forefront-Antispam-Report: SFV:NSPM; SFS:(10009020)(4630300001)(6009001)(39840400002)(39450400003)(39850400002)(39400400002)(39410400002)(5009440100003)(2361001)(3846002)(110136004)(2351001)(478600001)(38730400002)(189998001)(25786009)(4326008)(72206003)(6512007)(36756003)(53936002)(305945005)(7736002)(54906002)(2906002)(1076002)(8676002)(50226002)(50466002)(6116002)(48376002)(5003940100001)(76176999)(50986999)(66066001)(6486002)(47776003)(33646002)(6666003)(42882006)(53416004)(81166006)(5660300001)(6506006)(2950100002)(42186005)(6916009); DIR:OUT; SFP:1101; SCL:1; SRVR:BLUPR0701MB1716; H:jerin.domain.name; FPR:; SPF:None; MLV:sfv; LANG:en; X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1; BLUPR0701MB1716; 23:FT5HOH0IYxTCA9TCM6IxqZ1dRhWgUAaG7dxn79e?= =?us-ascii?Q?uD3eNQSDb2NBq1kM/D/U3wk68XIrQqeAy4r06fsV1qmY0KGcBtK6S93oP0rB?= =?us-ascii?Q?7zH8L1Ia2EvN7n1O3Gm85/XYr0uBo31PgP06MV3dujJQtWd9iRWvPKU/Iy1I?= =?us-ascii?Q?wsGUuWFiRkBiRlijyr8boiQLNazwLZPlKhslGLtEEmOJi5PMc0GpLqdZwpyo?= =?us-ascii?Q?ms9rYkLee7iN8f/5G7dws25Dwq4T9ogrkmiP1CJRusOjisnxy9lAd7ItsaYV?= =?us-ascii?Q?fo3eIhku5F1UHcqlx1BtRlqkcri0QjwSJXouVWvw7BQ00Ns3lR1Lxc1P4/Vj?= =?us-ascii?Q?nXxeWkW7LwfzVllWII8BU8VgcVvpGAclWdAghGl/oJaboji9Y6eTwoPTNcMH?= =?us-ascii?Q?JVF9ZAq7cOS96RXkCFmy5upqxRteX+yrmXPxIwXlgi+xGDqYD6a8NA3vflLW?= =?us-ascii?Q?tRgzSvN99Ugyj4M1w/0l1mImeibw4MB1a56n3LFfitVyyFlEHGX2M6YsLBeG?= =?us-ascii?Q?pIDjZ6EwzYJYtM8rd+9ZfoXojU43nYzMYUdD4meHXWGjl3ycQHKVuNEox4bD?= =?us-ascii?Q?DrGdbkV4tORgW1XlEj/tgfIT4kPnOeo02jJuz0VkLW02ENNp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mnjLbi8mzJceezRplVpfYlHa9xcQDb730atFBl/EgKpFmrefGp9iHy3L4W905bwW+/sqTKDuRACiLOvJFLo+Qv7w/RUYoHR4xft5PGOcBzbvXeCy6srkBeWat78RCFlDAu9Mek7ozz0zaNWCsH8secJQ9BbAIULep4ZtpPSf4fH31WnnO1pm/t+t7FcXvTVC+BcyKu2KM8hEdCjeWdCZQ0Dw==; 5:QyV/dVzJU4GO5UQTf0lTkR8kr/6tTCAxxVv5LetqWchAjfMwPMCart2+xQf5SGOQnY+jJiglZ3qpvgRmF1KAR0lopgjxDV2DaTgjyYUQY0ELRchB37gSoS7dn1Aev5u4SqShtS7a423NgHM5eGbYBQ==; 24:PjFrjZ9Eo19UfYKFxg27DjsqS8eQplHtA3sT+R6Sta364/YH1uyJTYsS1UyYjNxtl8Peu7cO++k1zSM42AH1wYi/bejEV8BWd1EywHrqqN0= SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-Microsoft-Exchange-Diagnostics: 1; BLUPR0701MB1716; 7:Uj0SaB8zr2GVloha8R4i8w0qwKo19rYR27hzUkjAHIsDPGUvrikdF1zshHAj0uWPrGcjtM0SK4C4WZn6So2tjjHMfT67WToGGj8VxL3cJeYw7rcSRO4rLlJSmcsBlZGnc8aZkPZBEHXetT7LTJVZQZMrTUm2hs0SpWMwjhRPi1pUeCQMzBPZn97Xkbbx/iZ/tT/nfC4VnJ2yPt5bt1HNNcMmnGpurcNCAi+IF9AlLxKI5126l8RIWq1+BY0IFmTdf9S/6YZC+f8sGwSNgObLnatbZbjU5AGd7uIgYZq97dGUbbFYXBDDuDV8C/yKtsQBzWtH0EmhbFpfD/QHJ4l7Hg== X-OriginatorOrg: caviumnetworks.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 11 May 2017 10:11:26.4442 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-Transport-CrossTenantHeadersStamped: BLUPR0701MB1716 Subject: [dpdk-dev] [PATCH 4/6] eal/x86: rte pause implementation for x86 X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 11 May 2017 10:11:32 -0000 The patch does not provide any functional change for x86 with respect to existing rte_pause() definition. CC: Bruce Richardson CC: Konstantin Ananyev Signed-off-by: Jerin Jacob --- lib/librte_eal/common/include/arch/x86/rte_pause.h | 59 ++++++++++++++++++++++ 1 file changed, 59 insertions(+) create mode 100644 lib/librte_eal/common/include/arch/x86/rte_pause.h diff --git a/lib/librte_eal/common/include/arch/x86/rte_pause.h b/lib/librte_eal/common/include/arch/x86/rte_pause.h new file mode 100644 index 000000000..22b879a7b --- /dev/null +++ b/lib/librte_eal/common/include/arch/x86/rte_pause.h @@ -0,0 +1,59 @@ +/*- + * BSD LICENSE + * + * Copyright(c) Cavium. All rights reserved. + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in + * the documentation and/or other materials provided with the + * distribution. + * * Neither the name of Cavium nor the names of its + * contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR + * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT + * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT + * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#ifndef _RTE_PAUSE_X86_H_ +#define _RTE_PAUSE_X86_H_ + +#ifdef __cplusplus +extern "C" { +#endif + +#include "generic/rte_pause.h" + +#ifdef __SSE2__ +#include +static inline void rte_pause(void) +{ + _mm_pause(); +} +#else +static inline void rte_pause(void) +{ +} +#endif + +#ifdef __cplusplus +} +#endif + +#endif /* _RTE_PAUSE_X86_H_ */ -- 2.12.2