From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from NAM03-DM3-obe.outbound.protection.outlook.com (mail-dm3nam03on0082.outbound.protection.outlook.com [104.47.41.82]) by dpdk.org (Postfix) with ESMTP id EB12F7E6A; Wed, 18 Apr 2018 17:31:07 +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=XUU2K74EkpQbOR2iwhwNATKO+FFJZ2i9f1WE/NBBRDs=; b=Vc5A8wT0pRTfUTD/sIArACTmleusGPmQDH4rGTLT0eo3EdhfJFjWN+V7LxTcvqfmjNtS/d1npp5tYNCwJY7XBgUIvnHy8MBkOzJ7FjGythutWSRb2fXjyCYJZ4TrpCYlFe4UiZNVQYenNr/encxZRgESQSl9/aWY18hhstQ8AsU= Authentication-Results: monjalon.net; dkim=none (message not signed) header.d=none;monjalon.net; dmarc=none action=none header.from=caviumnetworks.com; Received: from localhost.localdomain (111.93.218.67) by DM5PR07MB3466.namprd07.prod.outlook.com (2603:10b6:4:67::21) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P256) id 15.20.675.11; Wed, 18 Apr 2018 15:31:02 +0000 From: Pavan Nikhilesh To: thomas@monjalon.net, jerin.jacob@caviumnetworks.com, techboard@dpdk.org Cc: dev@dpdk.org, Pavan Nikhilesh Date: Wed, 18 Apr 2018 21:00:34 +0530 Message-Id: <20180418153035.5972-1-pbhagavatula@caviumnetworks.com> X-Mailer: git-send-email 2.17.0 MIME-Version: 1.0 Content-Type: text/plain X-Originating-IP: [111.93.218.67] X-ClientProxiedBy: SG2PR06CA0095.apcprd06.prod.outlook.com (2603:1096:3:14::21) To DM5PR07MB3466.namprd07.prod.outlook.com (2603:10b6:4:67::21) X-MS-PublicTrafficType: Email X-Microsoft-Antispam: UriScan:; BCL:0; PCL:0; RULEID:(7020095)(4652020)(5600026)(4534165)(4627221)(201703031133081)(201702281549075)(2017052603328)(7153060)(7193020); SRVR:DM5PR07MB3466; X-Microsoft-Exchange-Diagnostics: 1; DM5PR07MB3466; 3:pLacqrhMEdAZyW9NbFaJ6P2Kkk42BzkfQBh7EvAFkF0ZtldFsjcKHFKF7vyQMXOb8R1TGf/04HsiRIM0+7ImQgMnCFCabgEgTChbcQ5pt8tda9Q9gVbKvYhhTHZVRw7o9qjVcmNS9i2Z4DHNodyETk51jzhdCVykNdsEXn5Q9K0o6U3p+jLzejiOCvPcCt+CWbv3zJ0Q+ESAqtw3hwcqH6UjO6MZu1zBseowGNN2q6d3LUx/wo2didYriOnd1T9H; 25:06LznuFEtAS5LZHzPQn0c9ppWOAVGqiZFbHDMaIjzCy7PXBQxETbboGLa2X3+rkqEOcB8RD/CUPfx1pa1E3TsO54gmltVPG2EExVRm9WjZT6sjVC1/SH7scckFFd6LcJMzotKkYLv+PrUHzxf2H9BTVzB1oT50VVn8xgjTlfj1bbR/HUo4J+I1WvIlAjTcyL3IwI8fpkGyuAtesbZGTJPnKS4UWkcAsJR5Wl21wBfJtf0sxfLPksynTBT48AG7h4KFE3e2WpbL4bu4gv+HWHF4GK2N8OFmI/u847Wr7wWofI78o7ROPjoQB4qM5aEb9sVNPRJJ9+iyW6/iTn8D2RZg==; 31:HJXUZ4lhQ/FGIjAE040sYw8l8XmtzqDWCDDgQzxqNHg6+NEAVdwrx6kqDVDBWCmzWuIUqSUPuBDQrs7ahM0F6xN1lvXZpXkWpubn336/mSvFdLAMHB/q3oEVuaONYs1VvuOoFdnGSsHEO1XzJ3CPHlxnx2iUVbR8415e8IQ/fBFZC2LksOncQszHh0NchY3XL1J+aQXtYSb6klMObEUyXn42hPChIHsnxCBLxP5yon8= X-MS-TrafficTypeDiagnostic: DM5PR07MB3466: X-Microsoft-Exchange-Diagnostics: 1; DM5PR07MB3466; 20:65kv7jXxtj5Xo181jIqY4TbtwBLa39AiYw2HbPi9EzrchOVkqrEQ/3wtNPV9A6afmN4NtJ7yJK14biuU9d27mMVLUwBS4HqrzyPey0RDAi6HFy08ssG/kGmKEG/V9BvYj1D/GHSQwDy9oPBhzC3SURTQWoEmlFGI/G6PW40MBbHm8h5K8sIXdaoRmiBe+FowHNBRDy4ww2u6n/zN8NGsuaP3sQB8n1moJRdq+riiT7QFUaIVeam6STTxLCw+YOAa+4JYcT07xMXhNl40lzSZ+Dt3sDCJjiiO5Za6tWxqZ/DvwJZc19yJgYo7GznSLOqSBmT61SVv8fwB6eNsGpPVqUWQ5HnE3A5RBvs00OvnfN7rusTx7rUk8w6sJaM0InSyWw2AXxsCKmP1e97A+16aROBui5VbMk9feuudh17JMa5xND5JdtovZHvTOsRs3CcEBPd9/yyD0i8YR+hFs1pIJCzHz3lGRzlESJlhhw3EooFn70Sa7DXIJG+dnBqqK+Znjsq8uYgvhHWcbiPc76BG5h5l+5II+0KU2heY7B3Qezdn8Kjt5i7v109Gx4Bo5yt15C4QDpgYVE86TJF3aT3fSZsvJufNkBHIzaMsSfSI8wI=; 4:UjF/NI7N0kLSj2YmphEiGiTIL2TdUilK0/4X62H9Jjtq8JQgVXHjnPe5xik1RgbK2yyZJRnQaKxT3uDOvy4P4OOvWRF0yIcwX6jwhHJnKMYqJM9LLy7yRee6lG3arpsiBgBJxQqZX5XiEJ4cMNDztNhekSzW2gJrfm/RSlmhIvTyKf0CmoQ450J12TnxtnEzb04NsnTQoJ4kWwW/gdAiDn8F9H9YX72tobdmf+MnY68FBrdjcOTTyLWkH6SssLUEOKNkhC0TfCA/4TXJUMDqhQ== X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:; X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(8211001083)(6040522)(2401047)(8121501046)(5005006)(3231232)(944501327)(52105095)(93006095)(3002001)(10201501046)(6041310)(20161123560045)(20161123558120)(20161123562045)(201703131423095)(201702281528075)(20161123555045)(201703061421075)(201703061406153)(20161123564045)(6072148)(201708071742011); SRVR:DM5PR07MB3466; BCL:0; PCL:0; RULEID:; SRVR:DM5PR07MB3466; X-Forefront-PRVS: 06469BCC91 X-Forefront-Antispam-Report: SFV:NSPM; SFS:(10009020)(6069001)(39380400002)(366004)(346002)(39860400002)(376002)(6512007)(66066001)(25786009)(2906002)(107886003)(53936002)(6116002)(1076002)(6486002)(16526019)(4326008)(956004)(50226002)(186003)(2616005)(72206003)(26005)(5660300001)(42882007)(8936002)(476003)(1857600001)(478600001)(50466002)(48376002)(16586007)(6506007)(386003)(7736002)(8676002)(305945005)(47776003)(6666003)(36756003)(81166006)(42262002); DIR:OUT; SFP:1101; SCL:1; SRVR:DM5PR07MB3466; H:localhost.localdomain; FPR:; SPF:None; LANG:en; MLV:sfv; X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1; DM5PR07MB3466; 23:zVa2b+XhRClo95wnohYB0Gm+Xf0XIuSyH0tXz7ZqI?= =?us-ascii?Q?/QMSwfV7iqtZ7y54f4+mLG72Wr0okHDI4hgMQeKfHxdr9nuQsqdk8u2B2rma?= =?us-ascii?Q?nQFEWb4UNNrgTKaaR4xtQ+5OLQn0RPLhZwaSDRkfTFPPODju2nAdKgHbEtX+?= =?us-ascii?Q?dbMGfXlOU+GCRQixtaVzA1lCESKpzsrLwgWhdxTyqS+t8lIsDc5P0vJYdnbW?= =?us-ascii?Q?cENW4yO8EMH0ny19xkqI0ABi7Jdjp7hpOpKNE7ZaYb20NU3eKLfEsQO4HeIT?= =?us-ascii?Q?MlwKE0/+mOhKkihuZO8Qm/A18AV2yJz0PtBAgYt3TWUVoMi+yDqYvQrTqRgu?= =?us-ascii?Q?AnAj4d9O0IjsP8GYCevQhwBk+JgCS6wmFgXO0EPFzNd550FMqykmTbk5vDPi?= =?us-ascii?Q?h/wSe5/f7diHH4NPGv8iKfObUzqZ7s0aaE0Imu9RF0RchyeJkKrA+07P3njo?= =?us-ascii?Q?KoOGVX8vkmVubAptsetLmEGTxtWlSqQWrWkF+rBzFOSn/vnlOrTeMk/xaj8X?= =?us-ascii?Q?FJBjXdwFpQgMl4/SOKXr+KPtUvLwmztJGA8xc+CdIhY51Qc2Ib8LOvcGgD6m?= =?us-ascii?Q?ZMLLiotQ/CL8kyi6y9GVjAwMqhD1Qmm4fOILhlxQOsRzmx8QI9TWjnM4ySl7?= =?us-ascii?Q?XjTUi+1353zikLjHxaDyUrUHJzkEjoX2xt+Tvh+8KO9lPrOFB6spSRApC8bZ?= =?us-ascii?Q?t3aTvSSCTiQaUc38lLIzwktjSowrE9M0aIbWsKAPOJs1Zn+pHlyORNvANwbZ?= =?us-ascii?Q?wKn5vJuRhdrLCpaOH7mZ2SXqEbUAUva3DeGr5cLoX0hm8offS2Q7atDweEli?= =?us-ascii?Q?LkNPG3KsBwvn/tb6uV2WIAKBvflr6ICcoHLaLxvYanjngBYFZBrp//IE7wNx?= =?us-ascii?Q?uAnQv9UCnksX9SM375hlLwg/Y0G963mEYEc+dPp7ZcplGDK5+4C9r6b496ws?= =?us-ascii?Q?UfKk3AqIC1EzP3kHcumvzt9eebkumffVTOyTfVavQ=3D=3D?= X-Microsoft-Antispam-Message-Info: bbrl70tx0JXSNFsjJJriU5CBt26Mm4psSKCiQve0La051wQivzKUNBdwDVP37DoSKpsga8At1zTW7X3sqydLlQWnIKOjwr6dAhv75TQbicGH5n8vZlru+EJbXl0DiHvHhtC8Vo2N87luDc1+mJzAzW1B+nOjkLPz5Dqj6TMkU6WuO4E0iOOrsvN7+ZR9Labr X-Microsoft-Exchange-Diagnostics: 1; DM5PR07MB3466; 6:HHS6uLI6sPLuLq720ohK1KxPl1Qy9MCil6jmUv+6OKNpAMa4Hi5DLxMO2izsIdCyx3FK/GTQYlEQp+1j7J1fN74ef9TTmqCyB8eW0AORic8GobcO7OdNpVqYM06iGzSMvvKoklEdvc+ZO3Xd9VM1COgC7GdQs8vh74S4KdV+nYa08p9Zm8m2GpEuWbOiLuTTbP+A1iiQb2Hf8OAt1We4d7XSRbiJd0otwC30XleBVvbDW31lfBTm5+k8h0xSSMESd55FGA2YjX6q3R/7+9keNknd7aBpTPjCIUzNVxp7j/1beLqmOj7OGsOr8bHFLp04CicYwEGNf4MgP6ugZI4toSC6oZCPdFJbuhjgjd23DxoAZweLSMia55gMKasUnpPSKEBcPFmp6Cweg+stfv/MyPbVGgo1n6n7y8Ute/pZz9nyN+kX2DXsQJHeazfFsPyxNqYqSnls1+hPBkSmYVlKRw==; 5:sPla74iyaP+Y2NgXSp2w/obyK5fYPSRdZhtM5YRYmy7bTKQ634KFFFMdwsmFP+WIW0r3ffWFt8V0gWVbDTh/gU89pOAw3U7rpynuNXBJz1gc2ANA0DBcrbZ77ROx3bGNXONv3ASJgkWxPw8nHSkrZba2YQrM1GUQ08+4QqEeZzg=; 24:2xGp3RkDyq0NlOkdJHbjDOGSyUmUmqlmphpu1cMD3buBbnhZXxSQc+du0bBligmThpoooqOtLRTTd63+foOyGiVGTTzcBpbLkolmJEGw3yI= SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-Microsoft-Exchange-Diagnostics: 1; DM5PR07MB3466; 7:fzmJCltA6+SBUbZn5udTVbCgdW9Q1dzYEpX3Ct6jsXqf0IzsUO/Y6d0UdQsyno6Ezq6dyohmdA4Bo23AKwCoUpA8c5ai+yVNiQkmM88gt6Qk1563hjj2eMSeEe99tlH5YlXGOSas45+TYTLRJw9q+FFn6vi7VethdlkoQBMh1I9b2TqIvW2Rp/QWVr1iuI1J8tk8RpT5wLElOhL5GTWM2kHU9n9/F97ry/rfj7gsOe0oh///RHcYciA9ffmhuhgI X-MS-Office365-Filtering-Correlation-Id: 91dbec3e-9de2-4a14-1dc2-08d5a54166fe X-OriginatorOrg: caviumnetworks.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 18 Apr 2018 15:31:02.1398 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 91dbec3e-9de2-4a14-1dc2-08d5a54166fe X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 711e4ccf-2e9b-4bcf-a551-4094005b6194 X-MS-Exchange-Transport-CrossTenantHeadersStamped: DM5PR07MB3466 Subject: [dpdk-dev] [PATCH 1/2] eal: add macro to mark variable mostly read only 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: Wed, 18 Apr 2018 15:31:08 -0000 Add macro to mark a variable to be mostly read only and place it in a separate section. Signed-off-by: Pavan Nikhilesh --- Group together mostly read only data to avoid cacheline bouncing, also useful for auditing purposes. lib/librte_eal/common/include/rte_common.h | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/lib/librte_eal/common/include/rte_common.h b/lib/librte_eal/common/include/rte_common.h index 6c5bc5a76..f2ff2e9e6 100644 --- a/lib/librte_eal/common/include/rte_common.h +++ b/lib/librte_eal/common/include/rte_common.h @@ -114,6 +114,11 @@ static void __attribute__((constructor(prio), used)) func(void) */ #define __rte_noinline __attribute__((noinline)) +/** + * Mark a variable to be mostly read only and place it in a separate section. + */ +#define __rte_read_mostly __attribute__((__section__(".read_mostly"))) + /*********** Macros for pointer arithmetic ********/ /** -- 2.17.0