From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from na01-by2-obe.outbound.protection.outlook.com (mail-by2on0092.outbound.protection.outlook.com [207.46.100.92]) by dpdk.org (Postfix) with ESMTP id 7E6B58E7D for ; Thu, 10 Dec 2015 17:37:13 +0100 (CET) Authentication-Results: spf=none (sender IP is ) smtp.mailfrom=Jerin.Jacob@caviumnetworks.com; Received: from localhost.localdomain.localdomain (122.166.129.221) by BLUPR0701MB1715.namprd07.prod.outlook.com (10.163.85.141) with Microsoft SMTP Server (TLS) id 15.1.337.19; Thu, 10 Dec 2015 16:37:09 +0000 From: Jerin Jacob To: Date: Thu, 10 Dec 2015 22:06:16 +0530 Message-ID: <1449765378-29563-3-git-send-email-jerin.jacob@caviumnetworks.com> X-Mailer: git-send-email 2.1.0 In-Reply-To: <1449765378-29563-1-git-send-email-jerin.jacob@caviumnetworks.com> References: <1449417564-29600-1-git-send-email-jerin.jacob@caviumnetworks.com> <1449765378-29563-1-git-send-email-jerin.jacob@caviumnetworks.com> MIME-Version: 1.0 Content-Type: text/plain X-Originating-IP: [122.166.129.221] X-ClientProxiedBy: MAXPR01CA0058.INDPRD01.PROD.OUTLOOK.COM (25.164.146.158) To BLUPR0701MB1715.namprd07.prod.outlook.com (25.163.85.141) X-Microsoft-Exchange-Diagnostics: 1; BLUPR0701MB1715; 2:CCdRYKdF/X6Qw7+2Gx0LbpFW4dg01hiYESDnTCJtiR5o6q64NPfRWrlQBviGA3f6b4sIdXeypXwuL+EsPuLJ5l1kODA5sMFvxMiQE7DBCTuGryywsuniS0yRrU7izid2bFMvLVSW5rB8EZtyTzzq7Q==; 3:gX0CpmFy9AhAzQMivgvEkf7BlAOmdDejlfPbFBOVqCCsRrUSappFT5Hfv0+AUNR8tjazlE19u/AnEo4QLkblwZ0vrrjY6CLwMZPJ7FGA/hLOUZHrukHTshCUD1Ughqv0; 25:HbYF7swsKwgTJaPjAAlAjYMpFPnqKaUJd8NSmm70DU6LsmvhVmfTf0JqT6Ov7lU0dV++aUlpsD5DJUO39o1vAHSM7MiNEWNyN2GY+uTK5CT6XfblPZr1cf4jFL3gu2G2B+TiZxd6DMWqK+R6l/tRBAC/9qp4OMMo8no7iAPsn1QHBF5E/mMMRjqgBrJmWd5XsD2e7sNBykcQvEe6LsUphaJJsF5lH6sfa5+mJwdo0DhC3we0uFRqO2XdqLjEC919UpYQsN0EeOTUqMJLCfsOGg== X-Microsoft-Antispam: UriScan:;BCL:0;PCL:0;RULEID:;SRVR:BLUPR0701MB1715; X-Microsoft-Exchange-Diagnostics: 1; BLUPR0701MB1715; 20:lHJsTAaJcYGsUvH7ovBD1y7FlnFMFYyjimfpOlcBefUABtVst6BM0kCKzFdyE/BTp1nie7wbcyuRFHr4WH2cX4KH8/emoYKuTqFRSWCK08dlFPZO87MKYDbQj8/6QQMAaqV+YO6ziruKfZwHF9IFZR/rtUyNSDntfao46Ozmy12TLnMclq/taigi9In7yImqvrNJQASZ8J9yF1zK54P1wMkvzuZ5jkJnYbS1c4Cuvi1fHblaVb5i4Wirq9P9wXVnmOu6Ulr5B6uc2kCCZxvpxjt/+rkL7fU1sltdSGVz6LqiGNUll2BfoJUfz/NHXm5xzfcX5ej8mTlAf+n4HBkaDczRcOIJ9LkZkjg/YzIlcRqMeaMIvpqG9WelCBhWIFXN4PjQMBlMq5HunMbKJJ5n6YvQKQJ2JOEk+19qI0KFReHjDAVPe33kbmBGa7l3Mb08UhsxAkl0OWRU0saX0tN78By3NviUw5wsgutUR/Qjrxe90zxfZI1bIbLh/Wz0eTqSi39nXdGPMKWymVb1kPXOpxZhGpagbhjZvROltprzq2ONS9IqrAC7MdyD6Kdl9SfTrZ7V8xfDwjX6w0SwAaDk5Hh9hLAf/5JgWn+BAZLBWsM= X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:(236414709691187); X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(601004)(2401047)(520078)(8121501046)(5005006)(10201501046)(3002001); SRVR:BLUPR0701MB1715; BCL:0; PCL:0; RULEID:; SRVR:BLUPR0701MB1715; X-Microsoft-Exchange-Diagnostics: 1; BLUPR0701MB1715; 4:gWFHFvLSJmPSUqEnZpSpA5xxiGqK3o4tAu9Hd5uFFnfeYs9IwbjxPDJbLbjcIPFNwAsaeonVA7Tx4lKMW1c2JOioywCOMy7Gh3d2/cf4a7wHOQ5013leWp47QjEGpL1vr2VnOFfpqgBk+svz5c2ISMufpZtnVJmkMjQDCk6TU1Vz++V5nY5DQ1bC3SnHsh9MIKOcmDeS7l3lRZoAG5dD+1LE1zAvW96c+b2FgOSInpSWe/VadrAG/nyCGXit5sOkCcoRe7ebD6yJG0vQKPHannYCNbNVbGZ6mrYG4PWZUNMj4F2FSmN8W0iW9yQnyXXJJpBy6WrKKJTTh0v0MjQmFQXQ2eQdpLwUha58Bqq6/0szKBEjtgiQ5OyvxuxcdG0vJiMNdrHVvnlmIYKS5A98oWkwfpEd+0MO0y2z/03TeKeezIjZ0A8iAYMELnKeEQPN X-Forefront-PRVS: 078693968A X-Forefront-Antispam-Report: SFV:NSPM; SFS:(10009020)(6009001)(6069001)(189002)(199003)(97736004)(229853001)(5004730100002)(40100003)(586003)(5003940100001)(1096002)(105586002)(6116002)(5008740100001)(2950100001)(3846002)(4001430100002)(36756003)(189998001)(106356001)(86362001)(122386002)(107886002)(77096005)(92566002)(42186005)(2351001)(33646002)(48376002)(50226001)(66066001)(81156007)(76176999)(47776003)(5001960100002)(19580395003)(50986999)(19580405001)(110136002)(101416001)(87976001)(50466002); DIR:OUT; SFP:1101; SCL:1; SRVR:BLUPR0701MB1715; 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; BLUPR0701MB1715; 23:xin8R7PZqGWBC/P0j8D5KZd8eYtP0hg62DUVNEk?= =?us-ascii?Q?In1SOZ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rAHIHIHQZ?= =?us-ascii?Q?Lg4tvhKbLHnmEbt2A7nAwaqR5lsjYQgybDztAcA6qDu2GY87DawWsTOcrj1D?= =?us-ascii?Q?pyeZzt7PLUxeDIcn2/sNrKWAvSjnf0xXwNobH4jh+cy0SiFA+Y9F8tGe1l93?= =?us-ascii?Q?2kcynW/1gv9olzLf6y/ItxWSsCu8qMSM9TWtaGWfJWXt/90zTHmXG5dvPiZP?= =?us-ascii?Q?4Q3t9q6FP8/I=3D?= X-Microsoft-Exchange-Diagnostics: 1; BLUPR0701MB1715; 5:eYXOG09KWOtrffQvGP2/PK9i1DeTrwb6iGXWyvFZzMhkv/Z9aTAwdeHRPsN4VrBLYZ3OsNN+mFvc32FpfJ3KmODupC0SZNds9hgxwscjyD+JOGzDsFVLCV2siQ9CGbkaFLKq1VbhqducPkpF8qCQbg==; 24:ZD8DhAqoPMliWRnBPBcsNhUdb+Ag2J1T5s4a3Betllki3VjrnfGxaXMIFC+H8eoD6XguqNbwNSYb5MzjsY6/N0/hBH5hDbT8Jo0yWsUfbLg= SpamDiagnosticOutput: 1:23 SpamDiagnosticMetadata: NSPM X-OriginatorOrg: caviumnetworks.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 10 Dec 2015 16:37:09.2024 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-Transport-CrossTenantHeadersStamped: BLUPR0701MB1715 Subject: [dpdk-dev] [PATCH v2 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: Thu, 10 Dec 2015 16:37:14 -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