From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from na01-bn1-obe.outbound.protection.outlook.com (mail-bn1bbn0100.outbound.protection.outlook.com [157.56.111.100]) by dpdk.org (Postfix) with ESMTP id 3E07D8E63 for ; Mon, 14 Dec 2015 05:33:50 +0100 (CET) Authentication-Results: spf=none (sender IP is ) smtp.mailfrom=Jerin.Jacob@caviumnetworks.com; Received: from localhost.localdomain.localdomain (122.167.202.21) by BLUPR0701MB1714.namprd07.prod.outlook.com (10.163.85.140) with Microsoft SMTP Server (TLS) id 15.1.337.19; Mon, 14 Dec 2015 04:33:46 +0000 From: Jerin Jacob To: Date: Mon, 14 Dec 2015 10:02:54 +0530 Message-ID: <1450067576-18803-3-git-send-email-jerin.jacob@caviumnetworks.com> X-Mailer: git-send-email 2.1.0 In-Reply-To: <1450067576-18803-1-git-send-email-jerin.jacob@caviumnetworks.com> References: <1449765378-29563-1-git-send-email-jerin.jacob@caviumnetworks.com> <1450067576-18803-1-git-send-email-jerin.jacob@caviumnetworks.com> MIME-Version: 1.0 Content-Type: text/plain X-Originating-IP: [122.167.202.21] X-ClientProxiedBy: MA1PR01CA0009.INDPRD01.PROD.OUTLOOK.COM (25.164.117.16) To BLUPR0701MB1714.namprd07.prod.outlook.com (25.163.85.140) X-Microsoft-Exchange-Diagnostics: 1; BLUPR0701MB1714; 2:pFcsdOfDWS/yh5ZQ9GjwKGYoAYUe0jeqg/6UwDoA46ojSQmGY+vFPG2QjTCZdCYa3CxsDpEhoVUWCeXweu60mdQv2P6C5jrEpOlL+zN3R2kuYujR7fDUey0AkbSOLShW2BSzQ1oMwm08JNobC4JEoQ==; 3:z4ZQcEDx4Ha2f4uyT268Bk89jBNJWJjWvOxYuqkJCNUu6mK3L8/vFjnq/IlF7hztn+REt/F95/jnpsVrG1TrlXb0/HcmWe/AlAjjetHAXDTS2/kWcBLc8zNVNBlGijXy; 25:Xtf/IvBiPsqhVqyVHWsV6kRwppEv3Wkw7SXfaCf339bi8GmELFTEUR+Y8bYovBsTBw9KKw+j8l2Ov5duTqRHBo0UJHCxWwv711Vpalmw+jxzNwtEVuHkFnrZN8KVvbPFBej8PtLsgT5zpXKs8VgA3P3obiY36+BU/gw3Q+H40v6W/tScwaQ40lnow69ZB8T54uodLy45+CAueH3AEQe7jj0YXrbNQ8U9E0K44mIia/93GyHw1KPxvIZlDXue4Uq1PV9DCRXTVx0amzOmnY/U7A== X-Microsoft-Antispam: UriScan:;BCL:0;PCL:0;RULEID:;SRVR:BLUPR0701MB1714; X-Microsoft-Exchange-Diagnostics: 1; BLUPR0701MB1714; 20:Zd9A+GCXEsiiPn0QyC6TFCCXmj6qfjk1GdB1wrPdWUpP/NvFVbMdxOIVw/+/HPBRc45tttgc6M4LG0H59V9DWio3914OExSnaxBvmAVrHP88hhbKTPjlHdBp5a9L4wwC3PRwRaN3mSTwrzLDNGcxqTaVkqkm8n6YCZGznsaXu2DITmwmmCPy1aqvGtzBLv70rsTquiXYuVvuzwbQWxytzSYjR0t12oWBjqfZOczIgPlDvoisGER187tktdjx4pv+YJvQ7j5SgPZhJUY9D4kx1tzYJvY+C4uG7INw9y4nh6wMnbqmqULviCRRueEMQsrJvcuoE6/fJN1nqnFVQccYu5E+4nZoTr95LxyH0G3ucLV6mRaeIeGqBclizUBVfxRD7i9jvLoaQI/qXCtVhiu2phhrbHs268fB9rXZ+VVaA6eh2YisvsYZbXXkknurI2PBuLtcdLmKT2Qfl0wHMYXuPvtSHuxFyKLAdX/AkDsnZN9YJfBr6shhxdAqn1T3L5k+erQiUH7NgZYCS9C1dheh0RER5Rbf/u93zscuYLcK/TlgPhneGkdY9aTzcwm7Bi2aOKbUppfjOxCxMPN8ifpikVD3kADDl2nHM7ia0AgyzRw= X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:(236414709691187); X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(601004)(2401047)(5005006)(520078)(8121501046)(3002001)(10201501046); SRVR:BLUPR0701MB1714; BCL:0; PCL:0; RULEID:; SRVR:BLUPR0701MB1714; X-Microsoft-Exchange-Diagnostics: 1; BLUPR0701MB1714; 4:69weIVB+tUyc1zILeO69GyzgcdtMIAkx7e0GjGRX42bFGXN87k5r1NckLD/86+0a0gAQb8TC+lVRJXYqCJ1M+A4D+qu1lpu0y7y1bI4OfZPMKZl1T2bxdCWthYWflyi8aoj1tZRXk9x5qoxGpeGUyQkOZGLl6jHuWorOx+VNSZYEMfIj1PbkLOnKJguDH+eM3L84U5ImqgccXBhckIahhHQzmX7UF4BizZFEiUH63zk6tz9g4jxTSFfx+1ZfAL0gdp0iOk6q6tAwcskx7ZPACkMxwn6bXmzWo0n3PM1ROua/tHgoHl1Q+lzeszDFzUlhBT/xJnXbRiIkyXkcmvxKTmPeegK5/oE5tNKHLOGILOixg72gJ68qdJQCNpZ7SnnsWCNe7hZr4vb3EMdCyWtHVN+3Vh07995+z+Kx5TO+Q0THN4LRMHINI/WTZSqXMc7l X-Forefront-PRVS: 0790FB1F33 X-Forefront-Antispam-Report: SFV:NSPM; SFS:(10009020)(6069001)(6009001)(189002)(199003)(48376002)(19580395003)(42186005)(77096005)(50466002)(1096002)(50226001)(66066001)(47776003)(2950100001)(5001960100002)(5004730100002)(36756003)(189998001)(101416001)(5008740100001)(4001430100002)(110136002)(6116002)(586003)(3846002)(107886002)(106356001)(105586002)(40100003)(19580405001)(33646002)(5003940100001)(87976001)(229853001)(122386002)(76176999)(81156007)(97736004)(92566002)(50986999)(86362001)(2351001)(7099028); DIR:OUT; SFP:1101; SCL:1; SRVR:BLUPR0701MB1714; H:localhost.localdomain.localdomain; FPR:; SPF:None; PTR:InfoNoRecords; MX:1; A:1; LANG:en; Received-SPF: None (protection.outlook.com: caviumnetworks.com does not designate permitted sender hosts) X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1; BLUPR0701MB1714; 23:o9Ots2AMlaARGly/BmOujnjLz9gsWyQhJWCE/85?= =?us-ascii?Q?QIEe26jyVeZPnXYWSx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xSXSjNc18Xjmx5AF4oWzqq5Fr++nAKcdVMNA6oWmjVRzpXaIomoF/9xwMu?= =?us-ascii?Q?HxOlcB78FSlhFIBDAU4t8su2v+iwWnR2qG5zjUzw4NlwYtPI0SjWknhCLe7+?= =?us-ascii?Q?fRSxo1ENoaX5wuf8ggfqwWfK9++RdlGWArnApoxNdoo/0/IZjDorP3ViF/QQ?= =?us-ascii?Q?aBnDQnGpC9htjBTtb6s3TNphF0v7P7JCf?= X-Microsoft-Exchange-Diagnostics: 1; BLUPR0701MB1714; 5:iy7dBdbxqxjAeq3ZB714HwJuhWdeYY7RFW6WewvtWNwiAB9Jrub1X333SrZQ62FN1ybycEeeTiB5cekBP4q/2KO9wYtE5r5thnFOnMpOIOxWEzJiFz1kpwghKxM2w0D7+UXjPFVfDLx1A0JnS2AcEQ==; 24:wU9bV6/hbWupYMeMT2alE7k7hh8xK67ctdR54LB600TwcX9YMheQhMHakqAidfn7PVbXPIezymwMFDvCCY7y/lW//kla3ou7rLe7+t8zbtI= SpamDiagnosticOutput: 1:23 SpamDiagnosticMetadata: NSPM X-OriginatorOrg: caviumnetworks.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 14 Dec 2015 04:33:46.8279 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-Transport-CrossTenantHeadersStamped: BLUPR0701MB1714 Subject: [dpdk-dev] [PATCH v3 2/4] mbuf: fix performance/cache resource issue with 128-byte cache line targets 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, 14 Dec 2015 04:33:50 -0000 No need to split mbuf structure to two cache lines for 128-byte cache line size targets as it can fit on a single 128-byte cache line. Signed-off-by: Jerin Jacob --- app/test/test_mbuf.c | 2 +- lib/librte_eal/linuxapp/eal/include/exec-env/rte_kni_common.h | 4 +++- lib/librte_mbuf/rte_mbuf.h | 2 +- 3 files changed, 5 insertions(+), 3 deletions(-) diff --git a/app/test/test_mbuf.c b/app/test/test_mbuf.c index b32bef6..c99b82d 100644 --- a/app/test/test_mbuf.c +++ b/app/test/test_mbuf.c @@ -930,7 +930,7 @@ test_failing_mbuf_sanity_check(void) static int test_mbuf(void) { - RTE_BUILD_BUG_ON(sizeof(struct rte_mbuf) != RTE_CACHE_LINE_SIZE * 2); + RTE_BUILD_BUG_ON(sizeof(struct rte_mbuf) != RTE_CACHE_MIN_LINE_SIZE * 2); /* create pktmbuf pool if it does not exist */ if (pktmbuf_pool == NULL) { diff --git a/lib/librte_eal/linuxapp/eal/include/exec-env/rte_kni_common.h b/lib/librte_eal/linuxapp/eal/include/exec-env/rte_kni_common.h index bd1cc09..be51916 100644 --- a/lib/librte_eal/linuxapp/eal/include/exec-env/rte_kni_common.h +++ b/lib/librte_eal/linuxapp/eal/include/exec-env/rte_kni_common.h @@ -72,6 +72,8 @@ #define RTE_CACHE_LINE_SIZE 64 /**< Cache line size. */ #endif +#define RTE_CACHE_MIN_LINE_SIZE 64 /**< Minimum Cache line size. */ + /* * Request id. */ @@ -122,7 +124,7 @@ struct rte_kni_mbuf { uint16_t data_len; /**< Amount of data in segment buffer. */ /* fields on second cache line */ - char pad3[8] __attribute__((__aligned__(RTE_CACHE_LINE_SIZE))); + char pad3[8] __attribute__((__aligned__(RTE_CACHE_MIN_LINE_SIZE))); void *pool; void *next; }; diff --git a/lib/librte_mbuf/rte_mbuf.h b/lib/librte_mbuf/rte_mbuf.h index f234ac9..c973e9b 100644 --- a/lib/librte_mbuf/rte_mbuf.h +++ b/lib/librte_mbuf/rte_mbuf.h @@ -814,7 +814,7 @@ struct rte_mbuf { uint16_t vlan_tci_outer; /**< Outer VLAN Tag Control Identifier (CPU order) */ /* second cache line - fields only used in slow path or on TX */ - MARKER cacheline1 __rte_cache_aligned; + MARKER cacheline1 __rte_cache_min_aligned; union { void *userdata; /**< Can be used for external metadata */ -- 2.1.0