From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from dpdk.org (dpdk.org [92.243.14.124]) by inbox.dpdk.org (Postfix) with ESMTP id BB043A034F; Wed, 13 May 2020 02:55:58 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 1DC521BFA4; Wed, 13 May 2020 02:55:58 +0200 (CEST) Received: from EUR05-VI1-obe.outbound.protection.outlook.com (mail-vi1eur05on2069.outbound.protection.outlook.com [40.107.21.69]) by dpdk.org (Postfix) with ESMTP id A8A231BFA2 for ; Wed, 13 May 2020 02:55:56 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=armh.onmicrosoft.com; s=selector2-armh-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=K5VEZXRXs2l2VVzDga7Ukue0RTgroLVZR6ndLXFavo4=; b=YO7y36IgF8jThrga7RCxnro5Fl/k7ZTTcDt32zD6TX/Qrfab8Ch7nx7lKEOa418VBgHGFpVMD4u8ul5K7+SCpjMeuy7FJICphAu3OFkzXPnEYkttC/PWVjfg1KLHaJkyYbupFBQ6+feSQVQS3eGLqP6Px3MCt2XSXeElNihc4Cs= Received: from AM5PR0701CA0023.eurprd07.prod.outlook.com (2603:10a6:203:51::33) by AM0PR08MB4465.eurprd08.prod.outlook.com (2603:10a6:208:139::15) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.2979.34; Wed, 13 May 2020 00:55:54 +0000 Received: from AM5EUR03FT032.eop-EUR03.prod.protection.outlook.com (2603:10a6:203:51:cafe::68) by AM5PR0701CA0023.outlook.office365.com (2603:10a6:203:51::33) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3000.11 via Frontend Transport; Wed, 13 May 2020 00:55:54 +0000 Authentication-Results: spf=pass (sender IP is 63.35.35.123) smtp.mailfrom=arm.com; dpdk.org; dkim=pass (signature was verified) header.d=armh.onmicrosoft.com;dpdk.org; dmarc=bestguesspass action=none header.from=arm.com; Received-SPF: Pass (protection.outlook.com: domain of arm.com designates 63.35.35.123 as permitted sender) receiver=protection.outlook.com; client-ip=63.35.35.123; helo=64aa7808-outbound-1.mta.getcheckrecipient.com; Received: from 64aa7808-outbound-1.mta.getcheckrecipient.com (63.35.35.123) by AM5EUR03FT032.mail.protection.outlook.com (10.152.16.84) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.2979.27 via Frontend Transport; Wed, 13 May 2020 00:55:54 +0000 Received: ("Tessian outbound 4cdf5642225a:v54"); Wed, 13 May 2020 00:55:54 +0000 X-CR-MTA-TID: 64aa7808 Received: from 63cb3b69e330.1 by 64aa7808-outbound-1.mta.getcheckrecipient.com id 07C275FC-5A80-439D-86DA-C5620636CEA2.1; Wed, 13 May 2020 00:55:48 +0000 Received: from EUR04-VI1-obe.outbound.protection.outlook.com by 64aa7808-outbound-1.mta.getcheckrecipient.com with ESMTPS id 63cb3b69e330.1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384); Wed, 13 May 2020 00:55:48 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=OnG0eNVQ9Yt/HKtfHxDAesf8D23Yh4vgQcszwRyttjXVYe0qftlXRA84ZqiXsNB28GO0YKcKCMJUKBqidUpLdwTid8udFZTTqabIvi6gAXeulrH6iFNO+tSmDdsDDjvcMwdZkjT5JwW1X0zO4AtAkSMia0e0xodCEhF3sdeRmaVIgxd6105HAI3sbMEcKyBLGlAwO3Pex/mnSwKRn+31N4k8uX81KUQUhU2cpcFgGQKE7f7PB6nG7xTfY0hEjMB6vWXKvC+RBkCJj04msW+kDU6ErhxaFnE3VHEpxSfEUjL4hD7JdmVRYlIFWkx4KPrQnj0bLSceCUwC2qozUero3w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=K5VEZXRXs2l2VVzDga7Ukue0RTgroLVZR6ndLXFavo4=; b=f5avtxpHWY7JBuQyjH44eJ5av1lvUphMWvGc8RPPmpFKyazvIkvk53IBlXagoza8Iz0ckv/lDKlHWlPmlOe+svvaqQaL0PzLJNqeAoCGxi+pbaqIdW7pDffvO5zLpt/iYxipc0s6xF3Uw5slMf3CNeCvAYKSQu83Ttiib0V1L4G/hrfBFlY1jK7wpEawVVPgasA9cN3o90rTU9U2oIyxvHNCH3NUJutB5t8mHzSL3eZcowwIk699KSeS8rTv9Ga8GJQzd927kG3k7TlPhFxPKx3btjbGGGL/mN9ah5qIrDR5YzJwc9wc6Tg9KQWXKPDIOwQkcC8svJcexqWMl3fNrg== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=arm.com; dmarc=pass action=none header.from=arm.com; dkim=pass header.d=arm.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=armh.onmicrosoft.com; s=selector2-armh-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=K5VEZXRXs2l2VVzDga7Ukue0RTgroLVZR6ndLXFavo4=; b=YO7y36IgF8jThrga7RCxnro5Fl/k7ZTTcDt32zD6TX/Qrfab8Ch7nx7lKEOa418VBgHGFpVMD4u8ul5K7+SCpjMeuy7FJICphAu3OFkzXPnEYkttC/PWVjfg1KLHaJkyYbupFBQ6+feSQVQS3eGLqP6Px3MCt2XSXeElNihc4Cs= Received: from DBBPR08MB4646.eurprd08.prod.outlook.com (2603:10a6:10:f5::16) by DBBPR08MB4505.eurprd08.prod.outlook.com (2603:10a6:10:cf::11) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.2979.28; Wed, 13 May 2020 00:55:46 +0000 Received: from DBBPR08MB4646.eurprd08.prod.outlook.com ([fe80::1870:afc4:b90f:609d]) by DBBPR08MB4646.eurprd08.prod.outlook.com ([fe80::1870:afc4:b90f:609d%5]) with mapi id 15.20.3000.016; Wed, 13 May 2020 00:55:46 +0000 From: Honnappa Nagarahalli To: "Ananyev, Konstantin" , "dev@dpdk.org" CC: "aconole@redhat.com" , nd , Honnappa Nagarahalli , nd Thread-Topic: [PATCH] test/ring: code rework to reduce compilation time Thread-Index: AQHWHk+l64WNWhz7zUq1AmUBfvaQkqiQx4EwgAD3R4CAAcSWIIAF6VGAgAAjvcCAAAWbAIAAPWnggAAOHQCAA9EGEIAAUPUAgACIt8CABEfCgIACcYVA Date: Wed, 13 May 2020 00:55:45 +0000 Message-ID: References: <20200429175714.31141-1-konstantin.ananyev@intel.com> In-Reply-To: Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-ts-tracking-id: 5fd9e7f0-f677-4c8f-bf8c-a32d12f21dd1.0 x-checkrecipientchecked: true Authentication-Results-Original: intel.com; dkim=none (message not signed) header.d=none;intel.com; dmarc=none action=none header.from=arm.com; x-originating-ip: [70.113.25.165] x-ms-publictraffictype: Email X-MS-Office365-Filtering-HT: Tenant X-MS-Office365-Filtering-Correlation-Id: fd03a18e-54c1-4d81-f9a6-08d7f6d863a9 x-ms-traffictypediagnostic: DBBPR08MB4505:|DBBPR08MB4505:|AM0PR08MB4465: x-ms-exchange-transport-forked: True X-Microsoft-Antispam-PRVS: x-checkrecipientrouted: true nodisclaimer: true x-ms-oob-tlc-oobclassifiers: OLM:9508;OLM:9508; x-forefront-prvs: 0402872DA1 X-MS-Exchange-SenderADCheck: 1 X-Microsoft-Antispam-Untrusted: BCL:0; X-Microsoft-Antispam-Message-Info-Original: PCyM/Ym1WhKnFWy6R3xloJlupClmMvDQthp6eh8fO0TeD5yxeV323yfVIFs2DNKvd4zNC8t7J/7BHt9T+zBQGxgyNJwA6IILatTADSa9etxN/FtSd1oMOutXnoCMYcKnucJ50VwpX0yhcHNeKdz1ljzJLXN+XGfDkn2T2R3nlMOSfVFhnLWD8Xz99YNrtFEP56rwRN8j8K+Pe8FATpWB7wj8ibCeN9P2msE0g+d/68Nne2OeB5Zb0QsxbncrQB8fp+lp9JuYQ7F86u5q1Jbaj+fHE0JYQZasShmnlX6lTsQ3tAd9OIU95DCcxAGAG/FTfzxNWlz4nIz9PWgiLa0l4TTc2k+MvuX8X4JQTvFOY7uAjoEwqR3yA0FBNL2vcRJzQ5v70CK1H0fHVo9GtKBJURYSW9i/dcDNjSpq6BJQrN6EKtcOjXjnEaFq8+pJE8WVig+/7bSZyi4mwRK2tOfXcTSS8nJ4LKqm8bW4ojbP/GxUe3VjXV/5oZI19+y+e0UyaQYMew3k2KhlsxaDWMNDY2tnSB0Gd2sZhzFTMgjL9ND5VDCH/5Ckpnybnovh6Pae96a/JCi8U/wHYoCGiqsgOimNFHAh1YAKEjJ+QCZn93BvMXnhKlxRVcg/UA4F7Fp6 X-Forefront-Antispam-Report-Untrusted: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:DBBPR08MB4646.eurprd08.prod.outlook.com; PTR:; CAT:NONE; SFTY:; SFS:(4636009)(396003)(39850400004)(136003)(376002)(346002)(366004)(33430700001)(66446008)(66946007)(64756008)(66476007)(30864003)(4326008)(71200400001)(54906003)(5660300002)(52536014)(76116006)(2906002)(478600001)(33440700001)(9686003)(316002)(7696005)(6506007)(86362001)(33656002)(66556008)(26005)(8676002)(186003)(110136005)(966005)(8936002)(55016002)(21314003)(579004)(559001); DIR:OUT; SFP:1101; x-ms-exchange-antispam-messagedata: 823IvoqAPSxnatHvzkt/0lHlbfSKCyZR9xpkrqHP3ZZJoWn3rr9RroLb0Eag+HAbRQYo1Bx6oMMVfHqN+9v3n61v8ZrgtsfGYRt0MP+q7sNF3Aq6zdpShUU4ve+m4+taZ7zIaOOTiXu3rpaKnlU9hsa2wX5+uu27giShtMdqiWrMalN4KmUJHQvvDdd5pe0Tfe5anzfQQErGMSZByuErp74eHQEDrFQ3BKNQistp3lhZUrsTALlngPzUeoQi2ATHhYfHmkWX64aYhuOxVpoIutRi7tgAHPNxMpG6WC9pQuvGH6F/POMhub6paLSWvXdaymYq3oLHDzweS+sCFA3rz1LXd6iYBeO5/ph3hoEcOWqV5UQmtgKHutsVUrmz7fWy48LCLpHug+wK1sVg29XgdMzcFeyPUMk2eIwJKXkaCjJcX9/J/EvhdVBBVTB/M0FVOjIic0/KaVSoFh3tAq6Hydnk6kUtIDfucOprao/EwbkX0Q3wfeAvI7xLd1aJ4ZlT Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-MS-Exchange-Transport-CrossTenantHeadersStamped: DBBPR08MB4505 Original-Authentication-Results: intel.com; dkim=none (message not signed) header.d=none;intel.com; dmarc=none action=none header.from=arm.com; X-EOPAttributedMessage: 0 X-MS-Exchange-Transport-CrossTenantHeadersStripped: AM5EUR03FT032.eop-EUR03.prod.protection.outlook.com X-Forefront-Antispam-Report: CIP:63.35.35.123; CTRY:IE; LANG:en; SCL:1; SRV:; IPV:CAL; SFV:NSPM; H:64aa7808-outbound-1.mta.getcheckrecipient.com; PTR:ec2-63-35-35-123.eu-west-1.compute.amazonaws.com; CAT:NONE; SFTY:; SFS:(4636009)(396003)(136003)(39860400002)(346002)(376002)(46966005)(33430700001)(186003)(81166007)(966005)(82740400003)(356005)(86362001)(26005)(110136005)(6506007)(8936002)(70586007)(54906003)(70206006)(5660300002)(47076004)(4326008)(336012)(7696005)(30864003)(316002)(8676002)(82310400002)(33656002)(55016002)(478600001)(33440700001)(36906005)(9686003)(52536014)(2906002)(21314003)(579004)(559001); DIR:OUT; SFP:1101; X-MS-Office365-Filtering-Correlation-Id-Prvs: af1ddc4b-2898-46f4-461c-08d7f6d85ee6 X-Forefront-PRVS: 0402872DA1 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: /vhGoSU2bYX/rvxIz162yfB7mGdVb89Hd8Z6nftqYCRfn/0R9d2qmT50JvahMD8STOoR8NkS15qv9uWxHkbJmI/v4QfyibqH7+WWEmRs7qNMGzjPbyfFcWeP4NoVMlZmyVP28EW28GkPOvAHUWj/SHqe5049MvsywuUTME/lOPMemtBLLSDKPqyE0P4Ywe9oEE7eaEYcxNQxF/uwhrI73oP7QPo5C6Q4NKYXjCELzZQLqSp6UEBii18leSQ2MCp3gDwueT7/twXmrYNLnLCM8hzHzlbzBCz+QNjOkyVVUaSCJzpwae1KC89lEfxj3T81+4LfMrjF5NOrlDHKcyErTiHfjDDLzDF+waQUQ1pXT/TbE6+IATBMXZshQV/9Ma3xHYTuv81D37ylItC99fTuLbDvl1g8YjmzemZg3/QGmch6lT3nOU51amOude/4F9VvaZO8ZmAsfKea+d1gCLCwijh7wsfgT61Ptl34SsccXOucxBHZeD/Q3DexcU7+hyxd2vtaQb/tEoNFTInCsUknQHAUk852/u6dp6dtB88wg/JVMD6NdCXTB2oMgSycwrOEQcBggYnzhlVo1Xmx9z7XnjzalkaCUuQ0LCS3jKidy7DpZ9Vn6KhhWTsJhvz9d+8d0iuugkRCleA4ESxU5n3xRPxprfcW3RBKyFX+kJ/iKR7hHKoay1Xb/ER2Y8I+ZqLi X-OriginatorOrg: arm.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 13 May 2020 00:55:54.0837 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: fd03a18e-54c1-4d81-f9a6-08d7f6d863a9 X-MS-Exchange-CrossTenant-Id: f34e5979-57d9-4aaa-ad4d-b122a662184d X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=f34e5979-57d9-4aaa-ad4d-b122a662184d; Ip=[63.35.35.123]; Helo=[64aa7808-outbound-1.mta.getcheckrecipient.com] X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: AM0PR08MB4465 Subject: Re: [dpdk-dev] [PATCH] test/ring: code rework to reduce compilation time 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: , Errors-To: dev-bounces@dpdk.org Sender: "dev" >=20 > > > > > > > > > > > > > > > > > > > > > > > Hi Konstantin, > > > > > > > > > > > > I like the way the tests are organized and it > > > > > > > > > > > > looks > > > good. > > > > > > > > > > > > > > > > > > > > > > > > I am just wondering about the way it is being teste= d here. > > > > > > > > > > > > The intent to write the test cases the way they > > > > > > > > > > > > are currently is to mimic how the APIs would be use= d > mostly. > > > > > > > > > > > > IMO, the APIs would be used with a constant > > > > > > > > > > > value for element size so that the compiler will > > > > > > > > > > > throw away the unwanted code (in the functions where > > > > > > > > > > > the actual copy is being > > > > > done). > > > > > > > > > > > > > > > > > > > > > > > > With your method here, it looks to me like all the > > > > > > > > > > > > branches in the copy > > > > > > > > > > > functions are kept and the branch decisions are done > > > > > > > > > > > at run > > > time. > > > > > > > > > > > > Is my understanding correct? > > > > > > > > > > > > > > > > > > > > > > You mean branching on esize[] values? > > > > > > > > > > Yes > > > > I was wondering where is the confusion. I interpreted as referring > > > > to the esize parameter in rte_ring_xxx_elem APIs. Anyway, please se= e > below. > > > > > > > > > > > > > > > > > > > > > > > > > Actually from what I've seen that happens for both ca= ses: > > > > > > > > > > > before and after the patch (gcc 7.3 -O3). > > > > > > > > > > I did not look at the generated code. If it is > > > > > > > > > > happening with your patch too, I > > > > > > > > > think we can go with your patch. > > > > > > > > > > > > > > > > > > Just to clarify, what I meant: > > > > > > > > > For both binaries (without the patch and with the patch) > > > > > > > > > inside > > > > > > > > > test_ring() I see runtime branches on esize value. > > > > > > > > > Literally the code that corresponds to: > > > > > > > > > if (esize =3D=3D 8) {...} > > > > > > > > > else if (esize =3D=3D 16) {...} else {...} > > > > > > I am not concerned about the functions in test_ring.c. > > > > > > > > > > > > > > Do you see this in the actual ring library functions? > > > > > > > > > > > > > > Which ones? AFAIK all ring dequeue/enqueue functions are > > > > > > > inline right > > > > > now. > > > > > > Please see below. > > > > > > > > > > > > > > > > > > > > > I want to make sure that the library functions > > > > > > > > '__rte_ring_enqueue_elems' and '__rte_ring_dequeue_elems' > > > > > > > > are > > > > > optimized. > > > > > > Each enqueue/dequeue function ultimately calls these 2 function= s. > > > > > > > > > > Yes, and then each instance of enqueue/dequeue functions that is > > > > > used by upper layer would be in-lined. > > > > > So what upper layer function (library or app) you asked me to che= ck? > > > > I am not bothered much about upper layer functions. I looked at > > > > the > > > generate code for the function __rte_ring_enqueue_elems. > > > > Existing code has the if checks for 8 and 16. > > > > Your patch also has the checks. > > > > My patch does not have the checks as it passes the constants > > > > directly > > > without using esize[] array in functions test_ring_burst_bulk_tests4. > > > > > > For test_burst_bulk_test[1-4] - yes, for other test functions it is s= till there. > > Agree. This should give coverage for some at least. > > > > > Though I don't think it is that important for functional test cases. > > > Anyway, I think we dragged away a bit in our discussion, so with > > > what patch should we go ahead? > > Agree, we dragged it. I tried to merge both the solutions (use your > > patch and constant esize), I was not successful. My guess, function poi= nters > are not allowing for the optimization. >=20 > I think it can be done pretty easily by replacing loop over esize[], with > particular constant value in each of test_ring_burst_bulk_tests[1-4] fun= ctions. > I.E: >=20 > test_ring_burst_bulk_tests2(unsigned int test_idx) > struct rte_ring *r; > void **src =3D NULL, **cur_src =3D NULL, **dst =3D NULL, **cur_ds= t =3D NULL; > int ret; > - unsigned int i; > - > - for (i =3D 0; i < RTE_DIM(esize); i++) { > - test_ring_print_test_string(test_enqdeq_impl[test_idx].de= sc, > - test_enqdeq_impl[test_idx].api_type, esize[i]); > .... >=20 > + const int elem_size =3D 4; > + > + test_ring_print_test_string(test_enqdeq_impl[test_idx].desc, > + test_enqdeq_impl[test_idx].api_type, elem_size); >=20 > I just not very fond of idea to reduce number of test-cases, just because > compiler wasn't able to do some optimizations we hoped it would. I had tried a similar variant, it did not work. This does not work as well.= I am trying on Arm machines, did not try x86. >=20 > > > > > My preference is 69559, as it compiles faster and doesn't reduce > > > test coverage, but I can live with both. > > test_burst_bulk_test[1-4] more or less call the same APIs. Spreading > > the size variation across four of them should be ok. It will test the w= ay it will > be used. > > > > > Konstantin > > > > > > > > > > > > > > > > > > The compiler here should remove the 'if (esize =3D=3D 8) {...} > > > > > > else if (esize =3D=3D > > > > > > 16) {...} else {...}' with just the required piece of code > > > > > > depending on the > > > > > 'esize'. > > > > > > If we can validate that for at least one ring library function > > > > > > used in this patch, we should be good. > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > Probably gcc wasn't able to remove it because we use > > > > > > > > > esize[] instead of hard- coded values, might be there is > > > > > > > > > some other reason, I don't know > > > > > > > for sure. > > > > > > > > > As it is a functional (not performance) test, I didn't di= g further. > > > > > > > > The esize[] array is declared as a const. The compiler > > > > > > > > should be able to see > > > > > > > that it is a compile time constant. > > > > > > > > > > > > > > That was my expectation too, but that not what I am seeing. > > > > > > > > > > > > > > > > > > > > > > > > > > But, can you do similar change to test_ring_perf.c to > > > > > > > > > > keep it consistent? > > > > > > > > > > > > > > > > > > In principle it is doable, but needs extra care. > > > > > > > > > We need to make sure that compiler will be able to > > > > > > > > > inline functions via pointers. > > > > > > > > > AFAIK, gcc does that with -O3', but not with '-O2'. > > > > > > > > If the unwanted code is not removed during compilation, we > > > > > > > > will see it > > > > > > > affect the performance numbers. > > > > > > > > > > > > > > Exactly. > > > > > > > The last thing I want - someone who uses older version of > > > > > > > compiler, etc., will start to see lower performance numbers > > > > > > > with that > > > test. > > > > > > > > > > > > > > > > Don't know what the story with clang and different > > > > > > > > > versions of the > > > > > > > compiler. > > > > > > > > > Is there any real need for that? > > > > > > > > > On my box test_ring_perf.c compilation takes ~8s. > > > > > > > > > Konstantin > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > Main intention in my changes was to avoid using > > > > > > > > > > > test_ring_enqueue/test_ring_dequeue, > > > > > > > > > > > as it seems too many branches here and it takes > > > > > > > > > > > compiler a lot of effort to resolve all of them at co= mpile > time. > > > > > > > > > > > So I replaced it with array of function pointers > > > > > > > > > > > (test_enqdeq_impl[]) and iterating over it. > > > > > > > > > > > That way compiler knows straightway which function to= use. > > > > > > > > > > > > > > > > > > > > > > > Can you please check this? > > > > > > > > > > > > https://patches.dpdk.org/patch/69567/ > > > > > > > > > > > > > > > > > > > > > > As I can see your approach reduces number of > > > > > > > > > > > test-cases by factor > > > > > of 5: > > > > > > > > > > > now each of test_ring_burst_bulk_tests[1-4] is > > > > > > > > > > > executed only with just one esize value, correct? > > > > > > > > > > Yes, basically test_ring_burst_bulk_tests[1-4] were > > > > > > > > > > covering different scenarios with the same APIs. So, > > > > > > > > > > distributed the esize across different test > > > > > > > > > functions. > > > > > > > > > > > > > > > > > > > > > In term of compilation speed - it helps. > > > > > > > > > > > On my box with (gcc 7.3 -O3) compiling test_ring.c t= akes: > > > > > > > > > > > orig code: ~100s > > > > > > > > > > > with 69567 (your patch): < 20s > > > > > > > > > > > with 69559 (my patch): < 10s > > > > > > > > > > > > > > > > > > > > > > Konstantin > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > -----Original Message----- > > > > > > > > > > > > > From: Konstantin Ananyev > > > > > > > > > > > > > > > > > > > > > > > > > > Sent: Wednesday, April 29, 2020 12:57 PM > > > > > > > > > > > > > To: dev@dpdk.org > > > > > > > > > > > > > Cc: aconole@redhat.com; Honnappa Nagarahalli > > > > > > > > > > > > > ; Konstantin > > > > > > > > > > > > > Ananyev > > > > > > > > > > > > > Subject: [PATCH] test/ring: code rework to > > > > > > > > > > > > > reduce compilation time > > > > > > > > > > > > > > > > > > > > > > > > > > Rework test code to reduce code complexity for > > > > > > > > > > > > > the compiler and bring down compilation time and > > > > > > > > > > > > > memory > > > > > consumption. > > > > > > > > > > > > > > > > > > > > > > > > > > Signed-off-by: Konstantin Ananyev > > > > > > > > > > > > > > > > > > > > > > > > > > --- > > > > > > > > > > > > > app/test/test_ring.c | 373 > > > > > > > > > > > > > +++++++++++++++++++++++++++++-------------- > > > > > > > > > > > > > 1 file changed, 249 insertions(+), 124 > > > > > > > > > > > > > deletions(-) > > > > > > > > > > > > > > > > > > > > > > > > > > diff --git a/app/test/test_ring.c > > > > > > > > > > > > > b/app/test/test_ring.c index > > > > > > > > > > > > > e21557cd9..0ae97d341 100644 > > > > > > > > > > > > > --- a/app/test/test_ring.c > > > > > > > > > > > > > +++ b/app/test/test_ring.c > > > > > > > > > > > > > @@ -58,6 +58,181 @@ > > > > > > > > > > > > > > > > > > > > > > > > > > static const int esize[] =3D {-1, 4, 8, 16, 20}; > > > > > > > > > > > > > > > > > > > > > > > > > > +static const struct { > > > > > > > > > > > > > + const char *desc; > > > > > > > > > > > > > + uint32_t api_type; > > > > > > > > > > > > > + uint32_t create_flags; > > > > > > > > > > > > > + struct { > > > > > > > > > > > > > + unsigned int (*flegacy)(struct rte_ring *r, > > > > > > > > > > > > > + void * const *obj_table, unsigned int > > > n, > > > > > > > > > > > > > + unsigned int *free_space); > > > > > > > > > > > > > + unsigned int (*felem)(struct rte_ring *r, > > > > > > > > > > > > > +const void > > > > > > > > > *obj_table, > > > > > > > > > > > > > + unsigned int esize, unsigned int n, > > > > > > > > > > > > > + unsigned int *free_space); > > > > > > > > > > > > > + } enq; > > > > > > > > > > > > > + struct { > > > > > > > > > > > > > + unsigned int (*flegacy)(struct rte_ring *r, > > > > > > > > > > > > > + void **obj_table, unsigned int n, > > > > > > > > > > > > > + unsigned int *available); > > > > > > > > > > > > > + unsigned int (*felem)(struct rte_ring *r, > > > > > > > > > > > > > +void > > > > > > > > > *obj_table, > > > > > > > > > > > > > + unsigned int esize, unsigned int n, > > > > > > > > > > > > > + unsigned int *available); > > > > > > > > > > > > > + } deq; > > > > > > > > > > > > > +} test_enqdeq_impl[] =3D { > > > > > > > > > > > > > + { > > > > > > > > > > > > > + .desc =3D "MP/MC sync mode", > > > > > > > > > > > > Details about the tests are already printed by the > > > > > > > > > > > > function > > > > > > > > > > > 'test_ring_print_test_string'. This string should be > > > > > > > > > > > 'Test standard > > > > > ring'. > > > > > > > > > > > > > > > > > > > > > > > > > + .api_type =3D TEST_RING_ELEM_BULK | > > > > > > > > > > > > > TEST_RING_THREAD_DEF, > > > > > > > > > > > > > + .create_flags =3D 0, > > > > > > > > > > > > > + .enq =3D { > > > > > > > > > > > > > + .flegacy =3D rte_ring_enqueue_bulk, > > > > > > > > > > > > > + .felem =3D rte_ring_enqueue_bulk_elem, > > > > > > > > > > > > > + }, > > > > > > > > > > > > > + .deq =3D { > > > > > > > > > > > > > + .flegacy =3D rte_ring_dequeue_bulk, > > > > > > > > > > > > > + .felem =3D rte_ring_dequeue_bulk_elem, > > > > > > > > > > > > > + }, > > > > > > > > > > > > > + }, > > > > > > > > > > > > > + { > > > > > > > > > > > > > + .desc =3D "SP/SC sync mode", > > > > > > > > > > > > > + .api_type =3D TEST_RING_ELEM_BULK | > > > > > > > > > > > > > TEST_RING_THREAD_SPSC, > > > > > > > > > > > > > + .create_flags =3D RING_F_SP_ENQ | > > > RING_F_SC_DEQ, > > > > > > > > > > > > > + .enq =3D { > > > > > > > > > > > > > + .flegacy =3D rte_ring_sp_enqueue_bulk, > > > > > > > > > > > > > + .felem =3D > > > rte_ring_sp_enqueue_bulk_elem, > > > > > > > > > > > > > + }, > > > > > > > > > > > > > + .deq =3D { > > > > > > > > > > > > > + .flegacy =3D rte_ring_sc_dequeue_bulk, > > > > > > > > > > > > > + .felem =3D > > > rte_ring_sc_dequeue_bulk_elem, > > > > > > > > > > > > > + }, > > > > > > > > > > > > > + }, > > > > > > > > > > > > > + { > > > > > > > > > > > > > + .desc =3D "MP/MC sync mode", > > > > > > > > > > > > > + .api_type =3D TEST_RING_ELEM_BULK | > > > > > > > > > > > > > TEST_RING_THREAD_MPMC, > > > > > > > > > > > > > + .create_flags =3D 0, > > > > > > > > > > > > > + .enq =3D { > > > > > > > > > > > > > + .flegacy =3D rte_ring_mp_enqueue_bulk, > > > > > > > > > > > > > + .felem =3D > > > rte_ring_mp_enqueue_bulk_elem, > > > > > > > > > > > > > + }, > > > > > > > > > > > > > + .deq =3D { > > > > > > > > > > > > > + .flegacy =3D rte_ring_mc_dequeue_bulk, > > > > > > > > > > > > > + .felem =3D > > > rte_ring_mc_dequeue_bulk_elem, > > > > > > > > > > > > > + }, > > > > > > > > > > > > > + }, > > > > > > > > > > > > > + { > > > > > > > > > > > > > + .desc =3D "MP_RTS/MC_RTS sync mode", > > > > > > > > > > > > > + .api_type =3D TEST_RING_ELEM_BULK | > > > > > > > > > > > > > TEST_RING_THREAD_DEF, > > > > > > > > > > > > > + .create_flags =3D RING_F_MP_RTS_ENQ | > > > > > > > > > > > > > RING_F_MC_RTS_DEQ, > > > > > > > > > > > > > + .enq =3D { > > > > > > > > > > > > > + .flegacy =3D rte_ring_enqueue_bulk, > > > > > > > > > > > > > + .felem =3D rte_ring_enqueue_bulk_elem, > > > > > > > > > > > > > + }, > > > > > > > > > > > > > + .deq =3D { > > > > > > > > > > > > > + .flegacy =3D rte_ring_dequeue_bulk, > > > > > > > > > > > > > + .felem =3D rte_ring_dequeue_bulk_elem, > > > > > > > > > > > > > + }, > > > > > > > > > > > > > + }, > > > > > > > > > > > > > + { > > > > > > > > > > > > > + .desc =3D "MP_HTS/MC_HTS sync mode", > > > > > > > > > > > > > + .api_type =3D TEST_RING_ELEM_BULK | > > > > > > > > > > > > > TEST_RING_THREAD_DEF, > > > > > > > > > > > > > + .create_flags =3D RING_F_MP_HTS_ENQ | > > > > > > > > > > > > > RING_F_MC_HTS_DEQ, > > > > > > > > > > > > > + .enq =3D { > > > > > > > > > > > > > + .flegacy =3D rte_ring_enqueue_bulk, > > > > > > > > > > > > > + .felem =3D rte_ring_enqueue_bulk_elem, > > > > > > > > > > > > > + }, > > > > > > > > > > > > > + .deq =3D { > > > > > > > > > > > > > + .flegacy =3D rte_ring_dequeue_bulk, > > > > > > > > > > > > > + .felem =3D rte_ring_dequeue_bulk_elem, > > > > > > > > > > > > > + }, > > > > > > > > > > > > > + }, > > > > > > > > > > > > > + { > > > > > > > > > > > > > + .desc =3D "MP/MC sync mode", > > > > > > > > > > > > > + .api_type =3D TEST_RING_ELEM_BURST | > > > > > > > > > > > > > TEST_RING_THREAD_DEF, > > > > > > > > > > > > > + .create_flags =3D 0, > > > > > > > > > > > > > + .enq =3D { > > > > > > > > > > > > > + .flegacy =3D rte_ring_enqueue_burst, > > > > > > > > > > > > > + .felem =3D > > > rte_ring_enqueue_burst_elem, > > > > > > > > > > > > > + }, > > > > > > > > > > > > > + .deq =3D { > > > > > > > > > > > > > + .flegacy =3D rte_ring_dequeue_burst, > > > > > > > > > > > > > + .felem =3D > > > rte_ring_dequeue_burst_elem, > > > > > > > > > > > > > + }, > > > > > > > > > > > > > + }, > > > > > > > > > > > > > + { > > > > > > > > > > > > > + .desc =3D "SP/SC sync mode", > > > > > > > > > > > > > + .api_type =3D TEST_RING_ELEM_BURST | > > > > > > > > > > > > > TEST_RING_THREAD_SPSC, > > > > > > > > > > > > > + .create_flags =3D RING_F_SP_ENQ | > > > RING_F_SC_DEQ, > > > > > > > > > > > > > + .enq =3D { > > > > > > > > > > > > > + .flegacy =3D rte_ring_sp_enqueue_burst, > > > > > > > > > > > > > + .felem =3D > > > rte_ring_sp_enqueue_burst_elem, > > > > > > > > > > > > > + }, > > > > > > > > > > > > > + .deq =3D { > > > > > > > > > > > > > + .flegacy =3D rte_ring_sc_dequeue_burst, > > > > > > > > > > > > > + .felem =3D > > > rte_ring_sc_dequeue_burst_elem, > > > > > > > > > > > > > + }, > > > > > > > > > > > > > + }, > > > > > > > > > > > > > + { > > > > > > > > > > > > > + .desc =3D "MP/MC sync mode", > > > > > > > > > > > > > + .api_type =3D TEST_RING_ELEM_BURST | > > > > > > > > > > > > > TEST_RING_THREAD_MPMC, > > > > > > > > > > > > > + .create_flags =3D 0, > > > > > > > > > > > > > + .enq =3D { > > > > > > > > > > > > > + .flegacy =3D > > > rte_ring_mp_enqueue_burst, > > > > > > > > > > > > > + .felem =3D > > > rte_ring_mp_enqueue_burst_elem, > > > > > > > > > > > > > + }, > > > > > > > > > > > > > + .deq =3D { > > > > > > > > > > > > > + .flegacy =3D > > > rte_ring_mc_dequeue_burst, > > > > > > > > > > > > > + .felem =3D > > > rte_ring_mc_dequeue_burst_elem, > > > > > > > > > > > > > + }, > > > > > > > > > > > > > + }, > > > > > > > > > > > > > + { > > > > > > > > > > > > > + .desc =3D "MP_RTS/MC_RTS sync mode", > > > > > > > > > > > > > + .api_type =3D TEST_RING_ELEM_BURST | > > > > > > > > > > > > > TEST_RING_THREAD_DEF, > > > > > > > > > > > > > + .create_flags =3D RING_F_MP_RTS_ENQ | > > > > > > > > > > > > > RING_F_MC_RTS_DEQ, > > > > > > > > > > > > > + .enq =3D { > > > > > > > > > > > > > + .flegacy =3D rte_ring_enqueue_burst, > > > > > > > > > > > > > + .felem =3D > > > rte_ring_enqueue_burst_elem, > > > > > > > > > > > > > + }, > > > > > > > > > > > > > + .deq =3D { > > > > > > > > > > > > > + .flegacy =3D rte_ring_dequeue_burst, > > > > > > > > > > > > > + .felem =3D > > > rte_ring_dequeue_burst_elem, > > > > > > > > > > > > > + }, > > > > > > > > > > > > > + }, > > > > > > > > > > > > > + { > > > > > > > > > > > > > + .desc =3D "MP_HTS/MC_HTS sync mode", > > > > > > > > > > > > > + .api_type =3D TEST_RING_ELEM_BURST | > > > > > > > > > > > > > TEST_RING_THREAD_DEF, > > > > > > > > > > > > > + .create_flags =3D RING_F_MP_HTS_ENQ | > > > > > > > > > > > > > RING_F_MC_HTS_DEQ, > > > > > > > > > > > > > + .enq =3D { > > > > > > > > > > > > > + .flegacy =3D rte_ring_enqueue_burst, > > > > > > > > > > > > > + .felem =3D > > > rte_ring_enqueue_burst_elem, > > > > > > > > > > > > > + }, > > > > > > > > > > > > > + .deq =3D { > > > > > > > > > > > > > + .flegacy =3D rte_ring_dequeue_burst, > > > > > > > > > > > > > + .felem =3D > > > rte_ring_dequeue_burst_elem, > > > > > > > > > > > > > + }, > > > > > > > > > > > > > + }, > > > > > > > > > > > > > +}; > > > > > > > > > > > > > + > > > > > > > > > > > > > +static unsigned int test_ring_enq_impl(struct > > > > > > > > > > > > > +rte_ring *r, void **obj, int esize, unsigned > > > > > > > > > int n, > > > > > > > > > > > > > + unsigned int test_idx) { > > > > > > > > > > > > > + if (esize =3D=3D -1) > > > > > > > > > > > > > + return > > > test_enqdeq_impl[test_idx].enq.flegacy(r, > > > > > > > > > > > > > +obj, > > > > > > > > > n, NULL); > > > > > > > > > > > > > + else > > > > > > > > > > > > > + return > > > test_enqdeq_impl[test_idx].enq.felem(r, > > > > > > > > > > > > > +obj, > > > > > > > > > esize, n, > > > > > > > > > > > > > + NULL); > > > > > > > > > > > > > +} > > > > > > > > > > > > > + > > > > > > > > > > > > > +static unsigned int test_ring_deq_impl(struct > > > > > > > > > > > > > +rte_ring *r, void **obj, int esize, unsigned > > > > > > > > > int n, > > > > > > > > > > > > > + unsigned int test_idx) { > > > > > > > > > > > > > + if (esize =3D=3D -1) > > > > > > > > > > > > > + return > > > test_enqdeq_impl[test_idx].deq.flegacy(r, > > > > > > > > > > > > > +obj, > > > > > > > > > n, NULL); > > > > > > > > > > > > > + else > > > > > > > > > > > > > + return > > > test_enqdeq_impl[test_idx].deq.felem(r, > > > > > > > > > > > > > +obj, > > > > > > > > > esize, n, > > > > > > > > > > > > > + NULL); > > > > > > > > > > > > > +} > > > > > > > > > > > > > + > > > > > > > > > > > > > static void** > > > > > > > > > > > > > test_ring_inc_ptr(void **obj, int esize, > > > > > > > > > > > > > unsigned int > > > > > > > > > > > > > n) { @@ > > > > > > > > > > > > > -203,8 +378,7 @@ test_ring_negative_tests(void) > > > > > > > > > > > > > * Random number of elements are enqueued and > > > dequeued. > > > > > > > > > > > > > */ > > > > > > > > > > > > > static int > > > > > > > > > > > > > -test_ring_burst_bulk_tests1(unsigned int > > > > > > > > > > > > > api_type, unsigned int > > > > > > > > > > > create_flags, > > > > > > > > > > > > > - const char *tname) > > > > > > > > > > > > > +test_ring_burst_bulk_tests1(unsigned int > > > > > > > > > > > > > +test_idx) > > > > > > > > > > > > > { > > > > > > > > > > > > > struct rte_ring *r; > > > > > > > > > > > > > void **src =3D NULL, **cur_src =3D NULL, **dst = =3D > > > > > > > > > > > > > NULL, **cur_dst =3D NULL; @@ -214,11 +388,13 @@ > > > > > > > > > test_ring_burst_bulk_tests1(unsigned > > > > > > > > > > > > > int api_type, unsigned int create_flags, > > > > > > > > > > > > > const unsigned int rsz =3D RING_SIZE - 1; > > > > > > > > > > > > > > > > > > > > > > > > > > for (i =3D 0; i < RTE_DIM(esize); i++) { > > > > > > > > > > > > > - test_ring_print_test_string(tname, api_type, > > > esize[i]); > > > > > > > > > > > > > + > > > > > > > > > > > > > > > > > > test_ring_print_test_string(test_enqdeq_impl[test_idx].d > > > > > > > > > esc, > > > > > > > > > > > > > + test_enqdeq_impl[test_idx].api_type, > > > esize[i]); > > > > > > > > > > > > > > > > > > > > > > > > > > /* Create the ring */ > > > > > > > > > > > > > r =3D > > > > > > > > > > > > > test_ring_create("test_ring_burst_bulk_tests", > > > > > > > esize[i], > > > > > > > > > > > > > - RING_SIZE, > > > SOCKET_ID_ANY, > > > > > > > > > > > > > create_flags); > > > > > > > > > > > > > + RING_SIZE, SOCKET_ID_ANY, > > > > > > > > > > > > > + > > > > > > > > > test_enqdeq_impl[test_idx].create_flags); > > > > > > > > > > > > > > > > > > > > > > > > > > /* alloc dummy object pointers */ > > > > > > > > > > > > > src =3D test_ring_calloc(RING_SIZE * 2, > > > > > > > > > > > > > esize[i]); @@ > > > > > > > > > > > > > -240,17 > > > > > > > > > > > > > +416,17 @@ test_ring_burst_bulk_tests1(unsigned > > > > > > > > > > > > > +int api_type, unsigned int > > > > > > > > > > > > > create_flags, > > > > > > > > > > > > > rand =3D RTE_MAX(rte_rand() % > > > RING_SIZE, > > > > > > > 1UL); > > > > > > > > > > > > > printf("%s: iteration %u, random > > > shift: %u;\n", > > > > > > > > > > > > > __func__, i, rand); > > > > > > > > > > > > > - ret =3D test_ring_enqueue(r, cur_src, > > > esize[i], > > > > > > > > > rand, > > > > > > > > > > > > > - > > > api_type); > > > > > > > > > > > > > + ret =3D test_ring_enq_impl(r, cur_src, > > > esize[i], > > > > > > > > > rand, > > > > > > > > > > > > > + > > > test_idx); > > > > > > > > > > > > > TEST_RING_VERIFY(ret !=3D 0); > > > > > > > > > > > > > > > > > > > > > > > > > > - ret =3D test_ring_dequeue(r, cur_dst, > > > esize[i], > > > > > > > > > rand, > > > > > > > > > > > > > - > > > api_type); > > > > > > > > > > > > > + ret =3D test_ring_deq_impl(r, cur_dst, > > > esize[i], > > > > > > > > > rand, > > > > > > > > > > > > > + > > > test_idx); > > > > > > > > > > > > > TEST_RING_VERIFY(ret =3D=3D rand); > > > > > > > > > > > > > > > > > > > > > > > > > > /* fill the ring */ > > > > > > > > > > > > > - ret =3D test_ring_enqueue(r, cur_src, > > > esize[i], > > > > > rsz, > > > > > > > > > > > > > - > > > api_type); > > > > > > > > > > > > > + ret =3D test_ring_enq_impl(r, cur_src, > > > esize[i], > > > > > > > > > rsz, > > > > > > > > > > > > > + > > > test_idx); > > > > > > > > > > > > > TEST_RING_VERIFY(ret !=3D 0); > > > > > > > > > > > > > > > > > > > > > > > > > > > > > TEST_RING_VERIFY(rte_ring_free_count(r) =3D=3D > > > > > > > 0); @@ > > > > > > > > > > > > > -259,8 +435,8 @@ > > > > > > > > > > > > > test_ring_burst_bulk_tests1(unsigned > > > > > > > > > > > > > int api_type, unsigned int create_flags, > > > > > > > > > > > > > TEST_RING_VERIFY(rte_ring_empty(r) > > > =3D=3D 0); > > > > > > > > > > > > > > > > > > > > > > > > > > /* empty the ring */ > > > > > > > > > > > > > - ret =3D test_ring_dequeue(r, cur_dst, > > > esize[i], > > > > > rsz, > > > > > > > > > > > > > - > > > api_type); > > > > > > > > > > > > > + ret =3D test_ring_deq_impl(r, cur_dst, > > > esize[i], > > > > > > > > > rsz, > > > > > > > > > > > > > + > > > test_idx); > > > > > > > > > > > > > TEST_RING_VERIFY(ret =3D=3D (int)rsz); > > > > > > > > > > > > > TEST_RING_VERIFY(rsz =3D=3D > > > > > > > rte_ring_free_count(r)); > > > > > > > > > > > > > TEST_RING_VERIFY(rte_ring_count(r) > > > =3D=3D 0); > > > > > > > @@ - > > > > > > > > > > > > > 294,8 +470,7 @@ > > > > > > > > > > > > > test_ring_burst_bulk_tests1(unsigned > > > > > > > > > > > > > int api_type, unsigned int create_flags, > > > > > > > > > > > > > * dequeued data. > > > > > > > > > > > > > */ > > > > > > > > > > > > > static int > > > > > > > > > > > > > -test_ring_burst_bulk_tests2(unsigned int > > > > > > > > > > > > > api_type, unsigned int > > > > > > > > > > > create_flags, > > > > > > > > > > > > > - const char *tname) > > > > > > > > > > > > > +test_ring_burst_bulk_tests2(unsigned int > > > > > > > > > > > > > +test_idx) > > > > > > > > > > > > > { > > > > > > > > > > > > > struct rte_ring *r; > > > > > > > > > > > > > void **src =3D NULL, **cur_src =3D NULL, **dst = =3D > > > > > > > > > > > > > NULL, **cur_dst =3D NULL; @@ -303,11 +478,13 @@ > > > > > > > > > test_ring_burst_bulk_tests2(unsigned > > > > > > > > > > > > > int api_type, unsigned int create_flags, > > > > > > > > > > > > > unsigned int i; > > > > > > > > > > > > > > > > > > > > > > > > > > for (i =3D 0; i < RTE_DIM(esize); i++) { > > > > > > > > > > > > > - test_ring_print_test_string(tname, api_type, > > > esize[i]); > > > > > > > > > > > > > + > > > > > > > > > > > > > > > > > > test_ring_print_test_string(test_enqdeq_impl[test_idx].d > > > > > > > > > esc, > > > > > > > > > > > > > + test_enqdeq_impl[test_idx].api_type, > > > esize[i]); > > > > > > > > > > > > > > > > > > > > > > > > > > /* Create the ring */ > > > > > > > > > > > > > r =3D > > > > > > > > > > > > > test_ring_create("test_ring_burst_bulk_tests", > > > > > > > esize[i], > > > > > > > > > > > > > - RING_SIZE, > > > SOCKET_ID_ANY, > > > > > > > > > > > > > create_flags); > > > > > > > > > > > > > + RING_SIZE, SOCKET_ID_ANY, > > > > > > > > > > > > > + > > > > > > > > > test_enqdeq_impl[test_idx].create_flags); > > > > > > > > > > > > > > > > > > > > > > > > > > /* alloc dummy object pointers */ > > > > > > > > > > > > > src =3D test_ring_calloc(RING_SIZE * 2, > > > > > > > > > > > > > esize[i]); @@ > > > > > > > > > > > > > -323,39 > > > > > > > > > > > > > +500,39 @@ test_ring_burst_bulk_tests2(unsigned > > > > > > > > > > > > > +int api_type, unsigned int > > > > > > > > > > > > > create_flags, > > > > > > > > > > > > > cur_dst =3D dst; > > > > > > > > > > > > > > > > > > > > > > > > > > printf("enqueue 1 obj\n"); > > > > > > > > > > > > > - ret =3D test_ring_enqueue(r, cur_src, esize[i]= , 1, > > > > > > > > > api_type); > > > > > > > > > > > > > + ret =3D test_ring_enq_impl(r, cur_src, > > > > > > > > > > > > > +esize[i], 1, > > > > > > > > > test_idx); > > > > > > > > > > > > > if (ret !=3D 1) > > > > > > > > > > > > > goto fail; > > > > > > > > > > > > > cur_src =3D test_ring_inc_ptr(cur_src, > > > > > > > > > > > > > esize[i], 1); > > > > > > > > > > > > > > > > > > > > > > > > > > printf("enqueue 2 objs\n"); > > > > > > > > > > > > > - ret =3D test_ring_enqueue(r, cur_src, esize[i]= , 2, > > > > > > > > > api_type); > > > > > > > > > > > > > + ret =3D test_ring_enq_impl(r, cur_src, > > > > > > > > > > > > > +esize[i], 2, > > > > > > > > > test_idx); > > > > > > > > > > > > > if (ret !=3D 2) > > > > > > > > > > > > > goto fail; > > > > > > > > > > > > > cur_src =3D test_ring_inc_ptr(cur_src, > > > > > > > > > > > > > esize[i], 2); > > > > > > > > > > > > > > > > > > > > > > > > > > printf("enqueue MAX_BULK objs\n"); > > > > > > > > > > > > > - ret =3D test_ring_enqueue(r, cur_src, esize[i]= , > > > > > > > > > MAX_BULK, > > > > > > > > > > > > > - api_type); > > > > > > > > > > > > > + ret =3D test_ring_enq_impl(r, cur_src, > > > > > > > > > > > > > +esize[i], > > > > > > > > > MAX_BULK, > > > > > > > > > > > > > + test_idx); > > > > > > > > > > > > > if (ret !=3D MAX_BULK) > > > > > > > > > > > > > goto fail; > > > > > > > > > > > > > cur_src =3D test_ring_inc_ptr(cur_src, > > > > > > > > > > > > > esize[i], > > > > > > > MAX_BULK); > > > > > > > > > > > > > > > > > > > > > > > > > > printf("dequeue 1 obj\n"); > > > > > > > > > > > > > - ret =3D test_ring_dequeue(r, cur_dst, esize[i]= , 1, > > > > > > > > > api_type); > > > > > > > > > > > > > + ret =3D test_ring_deq_impl(r, cur_dst, > > > > > > > > > > > > > +esize[i], 1, > > > > > > > > > test_idx); > > > > > > > > > > > > > if (ret !=3D 1) > > > > > > > > > > > > > goto fail; > > > > > > > > > > > > > cur_dst =3D test_ring_inc_ptr(cur_dst, > > > > > > > > > > > > > esize[i], 1); > > > > > > > > > > > > > > > > > > > > > > > > > > printf("dequeue 2 objs\n"); > > > > > > > > > > > > > - ret =3D test_ring_dequeue(r, cur_dst, esize[i]= , 2, > > > > > > > > > api_type); > > > > > > > > > > > > > + ret =3D test_ring_deq_impl(r, cur_dst, > > > > > > > > > > > > > +esize[i], 2, > > > > > > > > > test_idx); > > > > > > > > > > > > > if (ret !=3D 2) > > > > > > > > > > > > > goto fail; > > > > > > > > > > > > > cur_dst =3D test_ring_inc_ptr(cur_dst, > > > > > > > > > > > > > esize[i], 2); > > > > > > > > > > > > > > > > > > > > > > > > > > printf("dequeue MAX_BULK objs\n"); > > > > > > > > > > > > > - ret =3D test_ring_dequeue(r, cur_dst, esize[i]= , > > > > > > > > > MAX_BULK, > > > > > > > > > > > > > - api_type); > > > > > > > > > > > > > + ret =3D test_ring_deq_impl(r, cur_dst, > > > > > > > > > > > > > +esize[i], > > > > > > > > > MAX_BULK, > > > > > > > > > > > > > + test_idx); > > > > > > > > > > > > > if (ret !=3D MAX_BULK) > > > > > > > > > > > > > goto fail; > > > > > > > > > > > > > cur_dst =3D test_ring_inc_ptr(cur_dst, > > > > > > > > > > > > > esize[i], > > > > > > > MAX_BULK); > > > > > > > > > > > > > @@ > > > > > > > > > > > > > -390,8 +567,7 @@ > > > > > > > > > > > > > test_ring_burst_bulk_tests2(unsigned > > > > > > > > > > > > > int api_type, unsigned int create_flags, > > > > > > > > > > > > > * Enqueue and dequeue to cover the entire ring = length. > > > > > > > > > > > > > */ > > > > > > > > > > > > > static int > > > > > > > > > > > > > -test_ring_burst_bulk_tests3(unsigned int > > > > > > > > > > > > > api_type, unsigned int > > > > > > > > > > > create_flags, > > > > > > > > > > > > > - const char *tname) > > > > > > > > > > > > > +test_ring_burst_bulk_tests3(unsigned int > > > > > > > > > > > > > +test_idx) > > > > > > > > > > > > > { > > > > > > > > > > > > > struct rte_ring *r; > > > > > > > > > > > > > void **src =3D NULL, **cur_src =3D NULL, **dst = =3D > > > > > > > > > > > > > NULL, **cur_dst =3D NULL; @@ -399,11 +575,13 @@ > > > > > > > > > test_ring_burst_bulk_tests3(unsigned > > > > > > > > > > > > > int api_type, unsigned int create_flags, > > > > > > > > > > > > > unsigned int i, j; > > > > > > > > > > > > > > > > > > > > > > > > > > for (i =3D 0; i < RTE_DIM(esize); i++) { > > > > > > > > > > > > > - test_ring_print_test_string(tname, api_type, > > > esize[i]); > > > > > > > > > > > > > + > > > > > > > > > > > > > > > > > > test_ring_print_test_string(test_enqdeq_impl[test_idx].d > > > > > > > > > esc, > > > > > > > > > > > > > + test_enqdeq_impl[test_idx].api_type, > > > esize[i]); > > > > > > > > > > > > > > > > > > > > > > > > > > /* Create the ring */ > > > > > > > > > > > > > r =3D > > > > > > > > > > > > > test_ring_create("test_ring_burst_bulk_tests", > > > > > > > esize[i], > > > > > > > > > > > > > - RING_SIZE, > > > SOCKET_ID_ANY, > > > > > > > > > > > > > create_flags); > > > > > > > > > > > > > + RING_SIZE, SOCKET_ID_ANY, > > > > > > > > > > > > > + > > > > > > > > > test_enqdeq_impl[test_idx].create_flags); > > > > > > > > > > > > > > > > > > > > > > > > > > /* alloc dummy object pointers */ > > > > > > > > > > > > > src =3D test_ring_calloc(RING_SIZE * 2, > > > > > > > > > > > > > esize[i]); @@ > > > > > > > > > > > > > -420,15 > > > > > > > > > > > > > +598,15 @@ test_ring_burst_bulk_tests3(unsigned > > > > > > > > > > > > > +int api_type, unsigned int > > > > > > > > > > > > > create_flags, > > > > > > > > > > > > > > > > > > > > > > > > > > printf("fill and empty the ring\n"); > > > > > > > > > > > > > for (j =3D 0; j < RING_SIZE / MAX_BULK; j++) { > > > > > > > > > > > > > - ret =3D test_ring_enqueue(r, cur_src, > > > esize[i], > > > > > > > > > > > > > MAX_BULK, > > > > > > > > > > > > > - > > > api_type); > > > > > > > > > > > > > + ret =3D test_ring_enq_impl(r, cur_src, > > > esize[i], > > > > > > > > > > > > > MAX_BULK, > > > > > > > > > > > > > + > > > test_idx); > > > > > > > > > > > > > if (ret !=3D MAX_BULK) > > > > > > > > > > > > > goto fail; > > > > > > > > > > > > > cur_src =3D test_ring_inc_ptr(cur_src, > > > esize[i], > > > > > > > > > > > > > > > > > > > > MAX_BULK); > > > > > > > > > > > > > > > > > > > > > > > > > > - ret =3D test_ring_dequeue(r, cur_dst, > > > esize[i], > > > > > > > > > > > > > MAX_BULK, > > > > > > > > > > > > > - > > > api_type); > > > > > > > > > > > > > + ret =3D test_ring_deq_impl(r, cur_dst, > > > esize[i], > > > > > > > > > > > > > MAX_BULK, > > > > > > > > > > > > > + > > > test_idx); > > > > > > > > > > > > > if (ret !=3D MAX_BULK) > > > > > > > > > > > > > goto fail; > > > > > > > > > > > > > cur_dst =3D test_ring_inc_ptr(cur_dst, > > > esize[i], > > > > > > > @@ - > > > > > > > > > > > > > 465,21 +643,24 @@ > > > > > > > > > > > > > test_ring_burst_bulk_tests3(unsigned > > > > > > > > > > > > > int api_type, unsigned int create_flags, > > > > > > > > > > > > > * Enqueue till the ring is full and dequeue > > > > > > > > > > > > > till the ring becomes > > > > > > > empty. > > > > > > > > > > > > > */ > > > > > > > > > > > > > static int > > > > > > > > > > > > > -test_ring_burst_bulk_tests4(unsigned int > > > > > > > > > > > > > api_type, unsigned int > > > > > > > > > > > create_flags, > > > > > > > > > > > > > - const char *tname) > > > > > > > > > > > > > +test_ring_burst_bulk_tests4(unsigned int > > > > > > > > > > > > > +test_idx) > > > > > > > > > > > > > { > > > > > > > > > > > > > struct rte_ring *r; > > > > > > > > > > > > > void **src =3D NULL, **cur_src =3D NULL, **dst = =3D > > > > > > > > > > > > > NULL, **cur_dst > > > > > > > =3D NULL; > > > > > > > > > > > > > int ret; > > > > > > > > > > > > > unsigned int i, j; > > > > > > > > > > > > > - unsigned int num_elems; > > > > > > > > > > > > > + unsigned int api_type, num_elems; > > > > > > > > > > > > > + > > > > > > > > > > > > > + api_type =3D > > > > > > > > > > > > > +test_enqdeq_impl[test_idx].api_type; > > > > > > > > > > > > > > > > > > > > > > > > > > for (i =3D 0; i < RTE_DIM(esize); i++) { > > > > > > > > > > > > > - test_ring_print_test_string(tname, api_type, > > > esize[i]); > > > > > > > > > > > > > + > > > > > > > > > > > > > > > > > > test_ring_print_test_string(test_enqdeq_impl[test_idx].d > > > > > > > > > esc, > > > > > > > > > > > > > + test_enqdeq_impl[test_idx].api_type, > > > esize[i]); > > > > > > > > > > > > > > > > > > > > > > > > > > /* Create the ring */ > > > > > > > > > > > > > r =3D > > > > > > > > > > > > > test_ring_create("test_ring_burst_bulk_tests", > > > > > > > esize[i], > > > > > > > > > > > > > - RING_SIZE, > > > SOCKET_ID_ANY, > > > > > > > > > > > > > create_flags); > > > > > > > > > > > > > + RING_SIZE, SOCKET_ID_ANY, > > > > > > > > > > > > > + > > > > > > > > > test_enqdeq_impl[test_idx].create_flags); > > > > > > > > > > > > > > > > > > > > > > > > > > /* alloc dummy object pointers */ > > > > > > > > > > > > > src =3D test_ring_calloc(RING_SIZE * 2, > > > > > > > > > > > > > esize[i]); @@ > > > > > > > > > > > > > -496,8 > > > > > > > > > > > > > +677,8 @@ test_ring_burst_bulk_tests4(unsigned > > > > > > > > > > > > > +int api_type, unsigned int > > > > > > > > > > > > > create_flags, > > > > > > > > > > > > > > > > > > > > > > > > > > printf("Test enqueue without enough memory > > > > > > > space\n"); > > > > > > > > > > > > > for (j =3D 0; j < (RING_SIZE/MAX_BULK - 1); > > > > > > > > > > > > > j++) > > > { > > > > > > > > > > > > > - ret =3D test_ring_enqueue(r, cur_src, > > > esize[i], > > > > > > > > > > > > > MAX_BULK, > > > > > > > > > > > > > - > > > api_type); > > > > > > > > > > > > > + ret =3D test_ring_enq_impl(r, cur_src, > > > esize[i], > > > > > > > > > > > > > MAX_BULK, > > > > > > > > > > > > > + > > > test_idx); > > > > > > > > > > > > > if (ret !=3D MAX_BULK) > > > > > > > > > > > > > goto fail; > > > > > > > > > > > > > cur_src =3D test_ring_inc_ptr(cur_src, > > > esize[i], > > > > > > > @@ - > > > > > > > > > > > > > 505,7 +686,7 @@ > > > > > > > > > > > > > test_ring_burst_bulk_tests4(unsigned > > > > > > > > > > > > > int api_type, unsigned int create_flags, > > > > > > > > > > > > > } > > > > > > > > > > > > > > > > > > > > > > > > > > printf("Enqueue 2 objects, free entries =3D > > > > > > > > > > > > > MAX_BULK - > > > > > > > 2\n"); > > > > > > > > > > > > > - ret =3D test_ring_enqueue(r, cur_src, esize[i]= , 2, > > > > > > > > > api_type); > > > > > > > > > > > > > + ret =3D test_ring_enq_impl(r, cur_src, > > > > > > > > > > > > > +esize[i], 2, > > > > > > > > > test_idx); > > > > > > > > > > > > > if (ret !=3D 2) > > > > > > > > > > > > > goto fail; > > > > > > > > > > > > > cur_src =3D test_ring_inc_ptr(cur_src, > > > > > > > > > > > > > esize[i], 2); @@ > > > > > > > > > > > > > -517,8 > > > > > > > > > > > > > +698,8 @@ test_ring_burst_bulk_tests4(unsigned > > > > > > > > > > > > > +int api_type, unsigned int > > > > > > > > > > > > > create_flags, > > > > > > > > > > > > > else > > > > > > > > > > > > > num_elems =3D MAX_BULK; > > > > > > > > > > > > > /* Always one free entry left */ > > > > > > > > > > > > > - ret =3D test_ring_enqueue(r, cur_src, esize[i]= , > > > > > > > > > num_elems, > > > > > > > > > > > > > - api_type); > > > > > > > > > > > > > + ret =3D test_ring_enq_impl(r, cur_src, > > > > > > > > > > > > > +esize[i], > > > > > > > > > num_elems, > > > > > > > > > > > > > + test_idx); > > > > > > > > > > > > > if (ret !=3D MAX_BULK - 3) > > > > > > > > > > > > > goto fail; > > > > > > > > > > > > > cur_src =3D test_ring_inc_ptr(cur_src, > > > > > > > > > > > > > esize[i], > > > > > > > MAX_BULK - > > > > > > > > > > > > > 3); > > > > > > > > > > > @@ > > > > > > > > > > > > > -528,15 +709,15 @@ > > > > > > > > > > > > > test_ring_burst_bulk_tests4(unsigned > > > > > > > > > > > > > int api_type, unsigned int create_flags, > > > > > > > > > > > > > goto fail; > > > > > > > > > > > > > > > > > > > > > > > > > > printf("Test enqueue for a full entry\n"); > > > > > > > > > > > > > - ret =3D test_ring_enqueue(r, cur_src, esize[i]= , > > > > > > > > > MAX_BULK, > > > > > > > > > > > > > - api_type); > > > > > > > > > > > > > + ret =3D test_ring_enq_impl(r, cur_src, > > > > > > > > > > > > > +esize[i], > > > > > > > > > MAX_BULK, > > > > > > > > > > > > > + test_idx); > > > > > > > > > > > > > if (ret !=3D 0) > > > > > > > > > > > > > goto fail; > > > > > > > > > > > > > > > > > > > > > > > > > > printf("Test dequeue without enough > > > objects\n"); > > > > > > > > > > > > > for (j =3D 0; j < RING_SIZE / MAX_BULK - 1; j+= +) { > > > > > > > > > > > > > - ret =3D test_ring_dequeue(r, cur_dst, > > > esize[i], > > > > > > > > > > > > > MAX_BULK, > > > > > > > > > > > > > - > > > api_type); > > > > > > > > > > > > > + ret =3D test_ring_deq_impl(r, cur_dst, > > > esize[i], > > > > > > > > > > > > > MAX_BULK, > > > > > > > > > > > > > + > > > test_idx); > > > > > > > > > > > > > if (ret !=3D MAX_BULK) > > > > > > > > > > > > > goto fail; > > > > > > > > > > > > > cur_dst =3D test_ring_inc_ptr(cur_dst, > > > esize[i], > > > > > > > @@ - > > > > > > > > > > > > > 544,7 +725,7 @@ > > > > > > > > > > > > > test_ring_burst_bulk_tests4(unsigned > > > > > > > > > > > > > int api_type, unsigned int create_flags, > > > > > > > > > > > > > } > > > > > > > > > > > > > > > > > > > > > > > > > > /* Available memory space for the exact > > > MAX_BULK > > > > > > > entries > > > > > > > > > > > */ > > > > > > > > > > > > > - ret =3D test_ring_dequeue(r, cur_dst, esize[i]= , 2, > > > > > > > > > api_type); > > > > > > > > > > > > > + ret =3D test_ring_deq_impl(r, cur_dst, > > > > > > > > > > > > > +esize[i], 2, > > > > > > > > > test_idx); > > > > > > > > > > > > > if (ret !=3D 2) > > > > > > > > > > > > > goto fail; > > > > > > > > > > > > > cur_dst =3D test_ring_inc_ptr(cur_dst, > > > > > > > > > > > > > esize[i], 2); @@ > > > > > > > > > > > > > -554,8 > > > > > > > > > > > > > +735,8 @@ test_ring_burst_bulk_tests4(unsigned > > > > > > > > > > > > > +int api_type, unsigned int > > > > > > > > > > > > > create_flags, > > > > > > > > > > > > > num_elems =3D MAX_BULK - 3; > > > > > > > > > > > > > else > > > > > > > > > > > > > num_elems =3D MAX_BULK; > > > > > > > > > > > > > - ret =3D test_ring_dequeue(r, cur_dst, esize[i]= , > > > > > > > > > num_elems, > > > > > > > > > > > > > - api_type); > > > > > > > > > > > > > + ret =3D test_ring_deq_impl(r, cur_dst, > > > > > > > > > > > > > +esize[i], > > > > > > > > > num_elems, > > > > > > > > > > > > > + test_idx); > > > > > > > > > > > > > if (ret !=3D MAX_BULK - 3) > > > > > > > > > > > > > goto fail; > > > > > > > > > > > > > cur_dst =3D test_ring_inc_ptr(cur_dst, > > > > > > > > > > > > > esize[i], > > > > > > > MAX_BULK - > > > > > > > > > > > > > 3); > > > > > > > > > > > @@ > > > > > > > > > > > > > -816,22 +997,7 @@ static int > > > > > > > > > > > > > test_ring(void) { > > > > > > > > > > > > > int32_t rc; > > > > > > > > > > > > > - unsigned int i, j; > > > > > > > > > > > > > - const char *tname; > > > > > > > > > > > > > - > > > > > > > > > > > > > - static const struct { > > > > > > > > > > > > > - uint32_t create_flags; > > > > > > > > > > > > > - const char *name; > > > > > > > > > > > > > - } test_sync_modes[] =3D { > > > > > > > > > > > > > - { > > > > > > > > > > > > > - RING_F_MP_RTS_ENQ | > > > > > > > > > RING_F_MC_RTS_DEQ, > > > > > > > > > > > > > - "Test MT_RTS ring", > > > > > > > > > > > > > - }, > > > > > > > > > > > > > - { > > > > > > > > > > > > > - RING_F_MP_HTS_ENQ | > > > > > > > > > RING_F_MC_HTS_DEQ, > > > > > > > > > > > > > - "Test MT_HTS ring", > > > > > > > > > > > > > - }, > > > > > > > > > > > > > - }; > > > > > > > > > > > > > + unsigned int i; > > > > > > > > > > > > > > > > > > > > > > > > > > /* Negative test cases */ > > > > > > > > > > > > > if (test_ring_negative_tests() < 0) @@ -848,65 > > > > > > > > > > > > > +1014,24 @@ > > > > > > > > > > > > > test_ring(void) > > > > > > > > > > > > > * The test cases are split into smaller test c= ases to > > > > > > > > > > > > > * help clang compile faster. > > > > > > > > > > > > > */ > > > > > > > > > > > > > - tname =3D "Test standard ring"; > > > > > > > > > > > > > - > > > > > > > > > > > > > - for (j =3D TEST_RING_ELEM_BULK; j <=3D > > > > > TEST_RING_ELEM_BURST; > > > > > > > > > j <<=3D 1) > > > > > > > > > > > > > - for (i =3D TEST_RING_THREAD_DEF; > > > > > > > > > > > > > - i <=3D > > > > > > > > > TEST_RING_THREAD_MPMC; i > > > > > > > > > > > > > <<=3D 1) > > > > > > > > > > > > > - if (test_ring_burst_bulk_tests1(i | j, 0, > > > tname) > > > > > > > > > < 0) > > > > > > > > > > > > > - goto test_fail; > > > > > > > > > > > > > - > > > > > > > > > > > > > - for (j =3D TEST_RING_ELEM_BULK; j <=3D > > > > > TEST_RING_ELEM_BURST; > > > > > > > > > j <<=3D 1) > > > > > > > > > > > > > - for (i =3D TEST_RING_THREAD_DEF; > > > > > > > > > > > > > - i <=3D > > > > > > > > > TEST_RING_THREAD_MPMC; i > > > > > > > > > > > > > <<=3D 1) > > > > > > > > > > > > > - if (test_ring_burst_bulk_tests2(i | j, 0, > > > tname) > > > > > > > > > < 0) > > > > > > > > > > > > > - goto test_fail; > > > > > > > > > > > > > - > > > > > > > > > > > > > - for (j =3D TEST_RING_ELEM_BULK; j <=3D > > > > > TEST_RING_ELEM_BURST; > > > > > > > > > j <<=3D 1) > > > > > > > > > > > > > - for (i =3D TEST_RING_THREAD_DEF; > > > > > > > > > > > > > - i <=3D > > > > > > > > > TEST_RING_THREAD_MPMC; i > > > > > > > > > > > > > <<=3D 1) > > > > > > > > > > > > > - if (test_ring_burst_bulk_tests3(i | j, 0, > > > tname) > > > > > > > > > < 0) > > > > > > > > > > > > > - goto test_fail; > > > > > > > > > > > > > - > > > > > > > > > > > > > - for (j =3D TEST_RING_ELEM_BULK; j <=3D > > > > > TEST_RING_ELEM_BURST; > > > > > > > > > j <<=3D 1) > > > > > > > > > > > > > - for (i =3D TEST_RING_THREAD_DEF; > > > > > > > > > > > > > - i <=3D > > > > > > > > > TEST_RING_THREAD_MPMC; i > > > > > > > > > > > > > <<=3D 1) > > > > > > > > > > > > > - if (test_ring_burst_bulk_tests4(i | j, 0, > > > tname) > > > > > > > > > < 0) > > > > > > > > > > > > > - goto test_fail; > > > > > > > > > > > > > - > > > > > > > > > > > > > - /* Burst and bulk operations with MT_RTS and > > > MT_HTS sync > > > > > > > > > modes > > > > > > > > > > > > > */ > > > > > > > > > > > > > - for (i =3D 0; i !=3D RTE_DIM(test_sync_modes); = i++) { > > > > > > > > > > > > > - for (j =3D TEST_RING_ELEM_BULK; j <=3D > > > > > > > > > TEST_RING_ELEM_BURST; > > > > > > > > > > > > > - j <<=3D 1) { > > > > > > > > > > > > > - > > > > > > > > > > > > > - rc =3D test_ring_burst_bulk_tests1( > > > > > > > > > > > > > - TEST_RING_THREAD_DEF | j, > > > > > > > > > > > > > - > > > test_sync_modes[i].create_flags, > > > > > > > > > > > > > - test_sync_modes[i].name); > > > > > > > > > > > > > - if (rc < 0) > > > > > > > > > > > > > - goto test_fail; > > > > > > > > > > > > > - > > > > > > > > > > > > > - rc =3D test_ring_burst_bulk_tests2( > > > > > > > > > > > > > - TEST_RING_THREAD_DEF | j, > > > > > > > > > > > > > - > > > test_sync_modes[i].create_flags, > > > > > > > > > > > > > - test_sync_modes[i].name); > > > > > > > > > > > > > - if (rc < 0) > > > > > > > > > > > > > - goto test_fail; > > > > > > > > > > > > > - > > > > > > > > > > > > > - rc =3D test_ring_burst_bulk_tests3( > > > > > > > > > > > > > - TEST_RING_THREAD_DEF | j, > > > > > > > > > > > > > - > > > test_sync_modes[i].create_flags, > > > > > > > > > > > > > - test_sync_modes[i].name); > > > > > > > > > > > > > - if (rc < 0) > > > > > > > > > > > > > - goto test_fail; > > > > > > > > > > > > > - > > > > > > > > > > > > > - rc =3D test_ring_burst_bulk_tests3( > > > > > > > > > > > > > - TEST_RING_THREAD_DEF | j, > > > > > > > > > > > > > - > > > test_sync_modes[i].create_flags, > > > > > > > > > > > > > - test_sync_modes[i].name); > > > > > > > > > > > > > - if (rc < 0) > > > > > > > > > > > > > - goto test_fail; > > > > > > > > > > > > > - } > > > > > > > > > > > > > + for (i =3D 0; i !=3D RTE_DIM(test_enqdeq_impl); > > > > > > > > > > > > > +i++) { > > > > > > > > > > > > > + > > > > > > > > > > > > > + > > > > > > > > > > > > > + rc =3D test_ring_burst_bulk_tests1(i); > > > > > > > > > > > > > + if (rc < 0) > > > > > > > > > > > > > + goto test_fail; > > > > > > > > > > > > > + > > > > > > > > > > > > > + rc =3D test_ring_burst_bulk_tests2(i); > > > > > > > > > > > > > + if (rc < 0) > > > > > > > > > > > > > + goto test_fail; > > > > > > > > > > > > > + > > > > > > > > > > > > > + rc =3D test_ring_burst_bulk_tests3(i); > > > > > > > > > > > > > + if (rc < 0) > > > > > > > > > > > > > + goto test_fail; > > > > > > > > > > > > > + > > > > > > > > > > > > > + rc =3D test_ring_burst_bulk_tests4(i); > > > > > > > > > > > > > + if (rc < 0) > > > > > > > > > > > > > + goto test_fail; > > > > > > > > > > > > > } > > > > > > > > > > > > > > > > > > > > > > > > > > /* dump the ring status */ > > > > > > > > > > > > > -- > > > > > > > > > > > > > 2.17.1