From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from na01-bl2-obe.outbound.protection.outlook.com (mail-bl2on0064.outbound.protection.outlook.com [65.55.169.64]) by dpdk.org (Postfix) with ESMTP id F22B54CE6 for ; Mon, 2 May 2016 10:08:22 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=CAVIUMNETWORKS.onmicrosoft.com; s=selector1-caviumnetworks-com; h=From:To:Date:Subject:Message-ID:Content-Type:MIME-Version; bh=0C+Dw8vF8kN5QlteoMKCeGv3EozsFY3ojoj4kZhAE8I=; b=wo6mNGjlX0fn87EhySoTpXJQt/WGsCqwOLzzGEGeHD6rE0i6PVjDL0wPLF+7gct2WLwqX45SlmZbYco2BAFYB7aEHKpT9LDjRp+RdbYyFQt7gDcusud7byxMTzSdC2EZWy2vfVajtMFniTjSWu7bU1fDxkquOsRa5l2MQBN/Mh0= Authentication-Results: dpdk.org; dkim=none (message not signed) header.d=none;dpdk.org; dmarc=none action=none header.from=caviumnetworks.com; Received: from localhost.caveonetworks.com (122.166.152.97) by BLUPR0701MB1713.namprd07.prod.outlook.com (10.163.85.14) with Microsoft SMTP Server (TLS) id 15.1.485.9; Mon, 2 May 2016 08:08:20 +0000 From: Jerin Jacob To: CC: , Jerin Jacob Date: Mon, 2 May 2016 13:37:45 +0530 Message-ID: <1462176465-21562-1-git-send-email-jerin.jacob@caviumnetworks.com> X-Mailer: git-send-email 2.1.0 MIME-Version: 1.0 Content-Type: text/plain X-Originating-IP: [122.166.152.97] X-ClientProxiedBy: PN1PR01CA0032.INDPRD01.PROD.OUTLOOK.COM (10.164.137.39) To BLUPR0701MB1713.namprd07.prod.outlook.com (10.163.85.14) X-MS-Office365-Filtering-Correlation-Id: dba73c3f-f425-44be-d84c-08d37260eda3 X-Microsoft-Exchange-Diagnostics: 1; BLUPR0701MB1713; 2:7IosYqwl2VvyezdTCmQXcOn3DJC8ux6mwS9/aRc2EheSrUJNWa+UMbjpLhVUd2O6oaf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1pxBsfgLxjdEB/qp4TVstbo1bxjfH1Xl0a2LdTksWVU/jhhxgxDzO6wRj9UpY8OP3iSaSBJJBrPh7arnA7G8= X-Microsoft-Exchange-Diagnostics: 1; BLUPR0701MB1713; 20:/UIgQJVHcI/Fc5ZXgYxgj8m50lmpb48x8HLgpl3VfAJU63Jh+goZnzyI1des5eV5bzGerhrf17o4EoZvY+4dBs60wZW5Sm6KIJX7Xis3OnmtfAtipde6VNVYq3wxpCFWTbp9NzlOB8a/Ssxfk7eAvi2twxNYi5uAp5IvVRFsBlS5JI3JxpL4fDg9r1UC9Od0abxzyTo92M0SIfu/gpJBUZUs6435VetXyWagRYW2bas1p7bnexOMFGywTINXq9f/b17B2XQ1HLPVFFJZ4VI+Z4xBU2PNFxersNqZkJh6JgVV/16pxulSkMXR6PlaFw6Ob/RvdzmWG44Stk3WpObHa7FBW73gyNAhEHXgxV3CElz9xiQqpqh0VHcfWnbV0fmBHRiK0TUZXEI1V4A379eXErbfg4YR/yUVt+Sp6ystBluT8E47wTfrtcaXdM3FLjN/QBD5IiJXRBeKd4NvgsNSLM+/nJq+fHPAvW14ZRtF4xpFezrgwYY7wnlEuIwf+PbMkjALdNPsj1M8DvxBXxQJ035CVVQlxIRA6W0iTIsowx+kHntsnGFBPAgAZPU76LeVeNVdb7Q2k/peLQLuYNpHlsvHP4UgutavH1a9Q8AdrkA= X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:; X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(9101521092)(601004)(2401047)(8121501046)(5005006)(10201501046)(3002001); SRVR:BLUPR0701MB1713; BCL:0; PCL:0; RULEID:; SRVR:BLUPR0701MB1713; X-Microsoft-Exchange-Diagnostics: 1; BLUPR0701MB1713; 4:eLKMx+OTGnMU0XMWTGD6P7LnvgsD5myFGJUw5HQQfOLaeIEo/Shw1qUZ0Yqi4yiPLYEyxaXsR4XcQ+dv8dTgeW5BX7Y2/9ib5iKbjX9Jo9YhESpgm5MPFXbWheWgliJ9c+llG9jYWUkAbine+JNFtAm+IUBC20IOjVmiSOyHwjUzV8wipWZlJK1bgCN6RBGWInk6MaTt5S+AHmfOSj3zdyrZCuHtRljhRGulF0In0gyxcREmqc6Jav5KEfr1NVSyYelyKy3d0O549clTPmhFQ0goTClbOVMJzM4xK1HTRfxo2NQJkRXpOAp18JwUqTIm4XncycprtUmrc2M+enAsqhe8Jj9B9K8uZvjKt5fj4H9KruqUJgbULqFlfWfeVyNqLs20/l22J9PdhWZMDfdPDw== X-Forefront-PRVS: 0930AAFAD9 X-Forefront-Antispam-Report: SFV:NSPM; SFS:(10009020)(4630300001)(6069001)(6009001)(2351001)(3846002)(1096002)(229853001)(586003)(6116002)(5004730100002)(77096005)(5003940100001)(66066001)(47776003)(4326007)(5890100001)(19580405001)(92566002)(42186005)(5008740100001)(110136002)(50466002)(86362001)(36756003)(81166005)(50226002)(19580395003)(4001430100002)(53416004)(76506005)(50986999)(48376002)(107886002)(189998001)(33646002)(2906002); DIR:OUT; SFP:1101; SCL:1; SRVR:BLUPR0701MB1713; H:localhost.caveonetworks.com; FPR:; SPF:None; MLV:sfv; LANG:en; X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1; BLUPR0701MB1713; 23:4rZU2ZG/F2wRrJFiS9HZLH3lUz/kwVpk2DhLq7n?= =?us-ascii?Q?W5EOe4Bloof1JKPC57q5wn1Yyr5GG+G1F8pxdj8DzjH5gOdPaPWpKqbpLP/u?= =?us-ascii?Q?PUOxR/c8ySTvxKQcoq/aTDkXrWj4rFs0cgNrgOeQ0mOWGlntNmj5OoAVBInv?= =?us-ascii?Q?x6GE/hbQsdEZr6JsXEVju/G2VWhd/83erjWDGCGpjTeeJ67ebXO/wH2Mt0me?= =?us-ascii?Q?51TwFzFpQQ2J08G6spc1onbX87sLfdZizWuxmpQphfcpJui7pHSQDoHTqbAw?= =?us-ascii?Q?9/PqbPLV2Bq4qtHpkrMZgmnpT2ozHUUAH181rPTq/l6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Er13lXL72c/ZGycfXKZ0WwhM6CZdDzlRhp5WUjcyheL/zPKzVXyzbm9bwhEGZWFjDXNoWFIJH7o=; 7:tLFpiKIYZqNgdSSr4hTXulcr+HyAFL2AdP1XcwnyFNPnOxTF4dAJ30ItJ9oBZdZTmM1Bzh3eHNv9cWzZ6bzH5TzFme6i7sYdmTlkxZPoUltUZn8121hs47k+kUWpbzIJvLp1CYFm0+gtWPG0DpBdvR+jqU+op7NoFyaEfrVfRM/N2Du8ksJtZLd/Bm5dAK8E SpamDiagnosticOutput: 1:23 SpamDiagnosticMetadata: NSPM X-OriginatorOrg: caviumnetworks.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 02 May 2016 08:08:20.1235 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-Transport-CrossTenantHeadersStamped: BLUPR0701MB1713 Subject: [dpdk-dev] [PATCH] ethdev: make struct rte_eth_dev cache aligned 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: Mon, 02 May 2016 08:08:23 -0000 Elements of struct rte_eth_dev used in the fast path. Make struct rte_eth_dev cache aligned to avoid the cases where rte_eth_dev elements share the same cache line with other structures. Signed-off-by: Jerin Jacob --- lib/librte_ether/rte_ethdev.c | 2 +- lib/librte_ether/rte_ethdev.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/librte_ether/rte_ethdev.c b/lib/librte_ether/rte_ethdev.c index a31018e..04f492d 100644 --- a/lib/librte_ether/rte_ethdev.c +++ b/lib/librte_ether/rte_ethdev.c @@ -70,7 +70,7 @@ #include "rte_ethdev.h" static const char *MZ_RTE_ETH_DEV_DATA = "rte_eth_dev_data"; -struct rte_eth_dev rte_eth_devices[RTE_MAX_ETHPORTS]; +struct rte_eth_dev rte_eth_devices[RTE_MAX_ETHPORTS] __rte_cache_aligned; static struct rte_eth_dev_data *rte_eth_dev_data; static uint8_t nb_ports; diff --git a/lib/librte_ether/rte_ethdev.h b/lib/librte_ether/rte_ethdev.h index 8519ff6..e359dda 100644 --- a/lib/librte_ether/rte_ethdev.h +++ b/lib/librte_ether/rte_ethdev.h @@ -1630,7 +1630,7 @@ struct rte_eth_dev { struct rte_eth_rxtx_callback *pre_tx_burst_cbs[RTE_MAX_QUEUES_PER_PORT]; uint8_t attached; /**< Flag indicating the port is attached */ enum rte_eth_dev_type dev_type; /**< Flag indicating the device type */ -}; +} __rte_cache_aligned; struct rte_eth_dev_sriov { uint8_t active; /**< SRIOV is active with 16, 32 or 64 pools */ -- 2.1.0