From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from NAM02-CY1-obe.outbound.protection.outlook.com (mail-cys01nam02on0077.outbound.protection.outlook.com [104.47.37.77]) by dpdk.org (Postfix) with ESMTP id 22ECF2A5E for ; Tue, 28 Feb 2017 12:35:42 +0100 (CET) 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=V5eEwg7ekp9TKLLXxB5XonDujvz1Zha9BUCAD/1jklM=; b=HprXmrHRvs5nx3i5/J0Ks6i75VTPAEijzQgkYQNmJbjyPeSXVBgaj+9jp5Qw4c6GNKu1GbdLuP4yfzBuJcCicGW1CzjlAWHFlt1I1M8nFJteYalongoq45B0ifc3AVHhhzjczWVWGRNEr7kl7i4y3yvJS6Q4w+Dpnz8bKe8On6E= Authentication-Results: spf=none (sender IP is ) smtp.mailfrom=Jerin.JacobKollanukkaran@cavium.com; Received: from localhost.localdomain (171.48.16.70) by BN3PR0701MB1717.namprd07.prod.outlook.com (10.163.39.16) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P384) id 15.1.933.12; Tue, 28 Feb 2017 11:35:37 +0000 Date: Tue, 28 Feb 2017 17:05:13 +0530 From: Jerin Jacob To: Bruce Richardson Cc: olivier.matz@6wind.com, dev@dpdk.org Message-ID: <20170228113511.GA28584@localhost.localdomain> References: <20170223172407.27664-1-bruce.richardson@intel.com> <20170223172407.27664-2-bruce.richardson@intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20170223172407.27664-2-bruce.richardson@intel.com> User-Agent: Mutt/1.7.1 (2016-10-04) X-Originating-IP: [171.48.16.70] X-ClientProxiedBy: MAXPR01CA0068.INDPRD01.PROD.OUTLOOK.COM (10.164.146.168) To BN3PR0701MB1717.namprd07.prod.outlook.com (10.163.39.16) X-MS-Office365-Filtering-Correlation-Id: 1e2c10b4-5b41-4df6-26ca-08d45fcdec55 X-Microsoft-Antispam: UriScan:; BCL:0; PCL:0; RULEID:(22001); SRVR:BN3PR0701MB1717; X-Microsoft-Exchange-Diagnostics: 1; BN3PR0701MB1717; 3:qzu9pxk7uaQQ9nbh4CpghJbIooaRKPdP4PWTGSkpAR9EdlbodaMAlSHjEmha+QmwxXzRrg5Owv8K3fUdR/jrxIiwiGLESa0ivDm7gkHohTbJ2huX3C6fJ9MXIfjCf2TAd236hJ9qepqYHG4NTA/FumZ/98DnNTH/Pz7wWdcaHvu/Ys5l0rQXJPriIlAm1P0ThsutCqgqKh92O1mDeuMzgHurKwGj92BjRw+r8C7inykhx2PfqL13VUHSL0Bdm78J7OcjXTMP80kQt7EmAjn4Eg==; 25:9Fao8Af5m7V9anIa3q7U/bpqf2lWk6moVqJIUfs9Y2+yDS+F3DsFDr4bgxbNBXGTTI/OGfgq2HNKupU3/KiGLlrYP+Z8HIDBFV4yRGfSNilPabuKh0GAtd2ptm+IV5AKFyL0NzAbT4D04Pzh3+/TXe6cFsmF+wyFqMUBoyqGXi1MgaMm+kiEX6nv4di4YFGON9waFbU0nzzrNfGdR+BiY5nXDR/LH2873cMR+0umX0Y8BtNG5wEYwe75EqUgdMuZQihwBtJWTe3H9nkH0GYytoT7WcwC+49MdphL59/sHVXHSe40iR/VtTqMraG4LoYJlfaoOoO/0g9Fvp6vkSnZbpsCRceKq9PuWQ2IwESHTNR8i1RBvhQpv74gPHjwpRZc2DszsrNSo0jNMff65S5I7OwFQKY8jsgUw5QszaUjBGCeC+k3yVBjg2s0Mns58CfFBS35VKyEfNca4IkoNh052A== X-Microsoft-Exchange-Diagnostics: 1; BN3PR0701MB1717; 31:eXDWSV5U4UbGYJ86pbiP7TCh+FY0+BOkb7MLPIZa14Lq6S7QT5L1S7xvboVThktS1PyC69unBSEELgs0exO2S+we5vbj4ZpcjlhePM62/nTYQ6Cpg8r+7n2c3sB5Hv/QqKXFMBsqbtpP6uiKWAyg4Tm6E/zIDUIY1yLTN0mA39uwuHJUlLB/hg6EGwT2XFoK4wERRGzJ9i+5G9KSxskVDAcFGyOemKebpdaNy+IUgdobGwU7ju/HXfWSiTwX0R8Bs49+W22Y98o52k5GL98pffL2eSvrP7/gzN9AyZY9Dmo=; 20:1V8LNJKfGxkHz3V1XmZgchV67FAQ626fHmqSOFzJTcmyG4REtXfzTjuoiaTzLUPXX59TzmkSVTtq6VefZ2nkx/LSQtqDtzmF2sSKomOmuf9aiE3U2tbq+7ujr0xvFyW1iS9j8lbGxrS5b4u9refglKVHSd+wo8Hah39UWSykfMygpQIhiNTAQ2NH9+U0p8XDhaVZAQfvgfQnFkXi3aH1HnoZNo75tp2JjgS82HrE2NfuaheDIvitdSSPQRi24bPvitkO32XQFT18O+MLOBekbRSwUa2Zq8WKdYSpRZokch6okMEDRzsypfZl33RZvf2Rw/if4ZRo+grUVKjV9Nn6qv3x1pJIxvkJRBOLNfH4Zx8GknxxkLkvSWtg+4PtuWvGtXEaXF1FN7h9NYaeCE2XjH/Fobx1eP23trI0sRh0KS4fS8JC35QVk2EN+/bxU0b9Xkj6aW17DTWVS3RQTHvgXq6yWYPni2DZXOPqZRiE6mciXvhkHMAHe5rCPR3Hk3LhpxYL98lmwPXWha14wXLAh0K/c8yxQSeuIH/bbJlGYKhQUW+NUUvMcZP/cvicGEoSbYqsDZefosSZHSVeoCdLV+GtQQNi01shBSZOxUzI8FI= X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:(228905959029699); X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(6040375)(601004)(2401047)(8121501046)(5005006)(3002001)(10201501046)(6041248)(20161123558025)(20161123564025)(20161123562025)(20161123555025)(20161123560025)(6072148); SRVR:BN3PR0701MB1717; BCL:0; PCL:0; RULEID:; SRVR:BN3PR0701MB1717; X-Microsoft-Exchange-Diagnostics: 1; BN3PR0701MB1717; 4:eG4nAh2oO/f5x16BI2WH9k2XyFi54c8XLkjPY1jp4DWQSqdzlfpDs1g5a+z98QGllEZMKh2aGAbFTCPJwTwJWKSYUFjxXdTUDQkPvkjN8CImuV06RQXbdYFooiGLvw6i1W0SY3tFJ4Zc7lLS6SoCrGYdzKbcSyaKFEC9Hof/u0ZJQhaAILhSV/G4s/gbqdDPgYNUJNu07wmVpEEF5bkUpPFhIafOBsKTdYZRDU9p8ChBomMkFRgn809Z/PFrUeNiGobqsL3yLiCRZE1X5NsoYpplW0xC2Abs5q4vs7zQMiIJzYEIPvHQNQO3f3ueOptuqVwsQ2g8aqZx4g/B6KsCAKLQ/Cc9GMzZWdaS480OqKZ5yIecVDrnueqNJWPpIak19tS6VVwYhdaF9H0KdLdKcynWh1lbHGEXiPOcdG3lV98K0qenejZdM/FtaRowTwtHpZHJ3pT4JmB7lyyOPLIrIZfW4LYKqQ/iqdg2c/h1DC+BCckub4+aZzL5cTtu4B6z9ADLh5qet/9L/zIW+YeFdv2dnFBkpG5xFnHvDYHUfOcxundLgoVdh722+DUyEeCWuzvOeTLhNi0QErw3yTmEz2VVq6LB4o1IVtujUl7Z46nVS1BrhkBiRms2390ZA91ybDrYdHGgZAQN4i/UGVtZQQ== X-Forefront-PRVS: 0232B30BBC X-Forefront-Antispam-Report: SFV:NSPM; SFS:(10009020)(4630300001)(6009001)(6069001)(7916002)(39450400003)(24454002)(199003)(189002)(97736004)(38730400002)(110136004)(42186005)(6246003)(53936002)(305945005)(101416001)(105586002)(106356001)(189998001)(2950100002)(92566002)(6666003)(33656002)(61506002)(6916009)(54356999)(42882006)(76176999)(50986999)(5660300001)(81156014)(7736002)(8676002)(81166006)(55016002)(66066001)(3846002)(6116002)(9686003)(25786008)(4001350100001)(50466002)(23726003)(83506001)(47776003)(1076002)(2906002)(229853002)(575784001)(68736007)(6506006)(18370500001); DIR:OUT; SFP:1101; SCL:1; SRVR:BN3PR0701MB1717; H:localhost.localdomain; FPR:; SPF:None; PTR:InfoNoRecords; A:1; MX:1; LANG:en; Received-SPF: None (protection.outlook.com: cavium.com does not designate permitted sender hosts) X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1; BN3PR0701MB1717; 23:Rl6Akifq2mAtKEswCk7fXb2YQPzBspKKqCLu6ZE?= =?us-ascii?Q?i+amMLMA9Xl6qaJeo7fO0kc41oKgyKR/FZkeG0FRXS2d4prjd2S1iLS/rlMI?= =?us-ascii?Q?i3u8URojatKI96YuOfAZzpNT+ppY+23+tfL3YkRu+mTMjhLffzkhmUE5HMMT?= =?us-ascii?Q?2axcrqi6ecLyrDO2WgSZL4+F2srBwDvAFJ/V3WPubpbNHWh0k+StomrGSNuI?= =?us-ascii?Q?AfEjUUMMZtkPQThWMWL7MDTPCVv/+pDywGMIxJD7gY/BerqaDFYY/sE0maYH?= =?us-ascii?Q?WxkMuyHl3j2SNwMiMUOW0EHJvCIIXH1yIXj5EsbdmqI2i6zyv5qAiUJAH4mV?= =?us-ascii?Q?ZvrEzi3JJ+L6ffkg85GZsb07h85j8D8GZ41rIQoHKRecPBXEvsro3RXmWkhl?= =?us-ascii?Q?v8c0eGvkuaV1c2URVT8qweXhTYEF9yUFb8NnqhH7uL1sSbNnIsfkUc6S8aoQ?= =?us-ascii?Q?WFvhxMl3rCIv5TWGyBt1nnKxTg0UbCHeNZKDR5zhdgDYvDe46GkNSj5p8AJH?= =?us-ascii?Q?AFwJgsJFDBpFHltnCaYQH5tbCVwZRXuYGsHxOknfv+Su5J7YR5eXO66zYAAI?= =?us-ascii?Q?74ozeKB6k+TZZv7LEZr1O2oGe2DLW+hv9LIh3H15xPXRDOxiJT6GBRmRt+6r?= =?us-ascii?Q?0q2N+k3GQ0KBxPsqy1DQgnKrR0f7gqkDkC61TzX+/46m3c0dR7xN84adEJnp?= =?us-ascii?Q?RWAYBiEtqsvcP8+tV41ycedqzaUKdmZaxHj7R08y+OjaH7+I5vg/XMEyvJsm?= =?us-ascii?Q?i9Owqxx1bLtjibnYPwiNQSvt4o2esCbvCYiad0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k/+S1VImLk6tIur4OQyXhtgJji+5TD9zs4D2e3OoVZn8gxtJ2JaCFrVbuOISsI31byIjiYaLKMCKUAgU/jv6LcRBP2MIgA1cuxJZVQ==; 24:pmedgsMD1ElsjyOmGovDD/ZYcSKci42SJWc6LSdz5sEM+dWzYpsCEgw30pwmG/L4QVh73NP7YipWOBushdzc1M+rS2L1W6Nb2xHiqa/C1N4= SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-Microsoft-Exchange-Diagnostics: 1; BN3PR0701MB1717; 7:VhfDtULzqApjPXSMSvYVX8JI7SHx1R+0R5PwaRV1kmuz1i4xr/lTQ9Y8DgXbtXGrWg6mm8IEhEaw016+98s3sV8SK8kbb6P93sqA7xarKZnlq1Y2IYTzWhDJnL8AQ6d6+T+05yCurHAolcWvg/+++XrLGBsA2NGYb0/HLq1SwXZEO0SBVgh3GmF1UgezvD5Lq+gktMfvxEytpeCvOBtO7f88lQ6LgQ5BqAGEzdmeaZym1Mad+DWIi31mqU2uRGgUyl2yZe7B0RkdOpMAkAUT8Ne1CV4dEgs8oHliVkJSCsTBEqjv2dTtWqAgBjHf7KHIeThh4iOrYrSV3tyKG0q0pg== X-OriginatorOrg: caviumnetworks.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 28 Feb 2017 11:35:37.8371 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-Transport-CrossTenantHeadersStamped: BN3PR0701MB1717 Subject: Re: [dpdk-dev] [PATCH v1 01/14] ring: remove split cacheline build setting 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: Tue, 28 Feb 2017 11:35:43 -0000 On Thu, Feb 23, 2017 at 05:23:54PM +0000, Bruce Richardson wrote: > Users compiling DPDK should not need to know or care about the arrangement > of cachelines in the rte_ring structure. Therefore just remove the build > option and set the structures to be always split. For improved > performance use 128B rather than 64B alignment since it stops the producer > and consumer data being on adjacent cachelines. > > Signed-off-by: Bruce Richardson > --- > config/common_base | 1 - > doc/guides/rel_notes/release_17_05.rst | 6 ++++++ > lib/librte_ring/rte_ring.c | 2 -- > lib/librte_ring/rte_ring.h | 8 ++------ > 4 files changed, 8 insertions(+), 9 deletions(-) > > diff --git a/config/common_base b/config/common_base > index aeee13e..099ffda 100644 > --- a/config/common_base > +++ b/config/common_base > @@ -448,7 +448,6 @@ CONFIG_RTE_LIBRTE_PMD_NULL_CRYPTO=y > # > CONFIG_RTE_LIBRTE_RING=y > CONFIG_RTE_LIBRTE_RING_DEBUG=n > -CONFIG_RTE_RING_SPLIT_PROD_CONS=n > CONFIG_RTE_RING_PAUSE_REP_COUNT=0 > > # > diff --git a/doc/guides/rel_notes/release_17_05.rst b/doc/guides/rel_notes/release_17_05.rst > index e25ea9f..ea45e0c 100644 > --- a/doc/guides/rel_notes/release_17_05.rst > +++ b/doc/guides/rel_notes/release_17_05.rst > @@ -110,6 +110,12 @@ API Changes > Also, make sure to start the actual text at the margin. > ========================================================= > > +* **Reworked rte_ring library** > + > + The rte_ring library has been reworked and updated. The following changes > + have been made to it: > + > + * removed the build-time setting ``CONFIG_RTE_RING_SPLIT_PROD_CONS`` > > ABI Changes > ----------- > diff --git a/lib/librte_ring/rte_ring.c b/lib/librte_ring/rte_ring.c > index ca0a108..4bc6da1 100644 > --- a/lib/librte_ring/rte_ring.c > +++ b/lib/librte_ring/rte_ring.c > @@ -127,10 +127,8 @@ rte_ring_init(struct rte_ring *r, const char *name, unsigned count, > /* compilation-time checks */ > RTE_BUILD_BUG_ON((sizeof(struct rte_ring) & > RTE_CACHE_LINE_MASK) != 0); > -#ifdef RTE_RING_SPLIT_PROD_CONS > RTE_BUILD_BUG_ON((offsetof(struct rte_ring, cons) & > RTE_CACHE_LINE_MASK) != 0); > -#endif > RTE_BUILD_BUG_ON((offsetof(struct rte_ring, prod) & > RTE_CACHE_LINE_MASK) != 0); > #ifdef RTE_LIBRTE_RING_DEBUG > diff --git a/lib/librte_ring/rte_ring.h b/lib/librte_ring/rte_ring.h > index 72ccca5..04fe667 100644 > --- a/lib/librte_ring/rte_ring.h > +++ b/lib/librte_ring/rte_ring.h > @@ -168,7 +168,7 @@ struct rte_ring { > uint32_t mask; /**< Mask (size-1) of ring. */ > volatile uint32_t head; /**< Producer head. */ > volatile uint32_t tail; /**< Producer tail. */ > - } prod __rte_cache_aligned; > + } prod __rte_aligned(RTE_CACHE_LINE_SIZE * 2); I think we need to use RTE_CACHE_LINE_MIN_SIZE instead of RTE_CACHE_LINE_SIZE for alignment here. PPC and ThunderX1 targets are cache line size of 128B > + } prod __rte_aligned(RTE_CACHE_LINE_SIZE * 2); > > /** Ring consumer status. */ > struct cons { > @@ -177,11 +177,7 @@ struct rte_ring { > uint32_t mask; /**< Mask (size-1) of ring. */ > volatile uint32_t head; /**< Consumer head. */ > volatile uint32_t tail; /**< Consumer tail. */ > -#ifdef RTE_RING_SPLIT_PROD_CONS > - } cons __rte_cache_aligned; > -#else > - } cons; > -#endif > + } cons __rte_aligned(RTE_CACHE_LINE_SIZE * 2); > > #ifdef RTE_LIBRTE_RING_DEBUG > struct rte_ring_debug_stats stats[RTE_MAX_LCORE]; > -- > 2.9.3 >