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 C116CA0522; Thu, 2 Jul 2020 18:18:59 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 2ECC61D930; Thu, 2 Jul 2020 18:18:59 +0200 (CEST) Received: from EUR05-AM6-obe.outbound.protection.outlook.com (mail-am6eur05on2084.outbound.protection.outlook.com [40.107.22.84]) by dpdk.org (Postfix) with ESMTP id 328A81D921 for ; Thu, 2 Jul 2020 18:18:57 +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=KVkjUuFWK9Agsv6QfiXxwUuWZR3BS+XJH1ZvlFSxiNQ=; b=znL/HPR08xOewOc9d+qV6trvXxh8kA6vx0Q9DU6c3NWyVYMa3Fn/oQ0Ygch3CR5KWZ0FLPwL6DDyZMNoLghv/NNPieeWTyyrmrXRlgyL/Aet/sOV6dpU6cW+AdDOQc2yZP9TXQlegL3ZWEKTx0s3rOdByeyoWQ7rCgPGYMaiRLw= Received: from AM6P195CA0097.EURP195.PROD.OUTLOOK.COM (2603:10a6:209:86::38) by VI1PR0802MB2527.eurprd08.prod.outlook.com (2603:10a6:800:b0::13) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3131.21; Thu, 2 Jul 2020 16:18:55 +0000 Received: from AM5EUR03FT021.eop-EUR03.prod.protection.outlook.com (2603:10a6:209:86:cafe::71) by AM6P195CA0097.outlook.office365.com (2603:10a6:209:86::38) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3153.22 via Frontend Transport; Thu, 2 Jul 2020 16:18:55 +0000 X-MS-Exchange-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 AM5EUR03FT021.mail.protection.outlook.com (10.152.16.105) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3153.24 via Frontend Transport; Thu, 2 Jul 2020 16:18:55 +0000 Received: ("Tessian outbound 2dd9eeca983c:v62"); Thu, 02 Jul 2020 16:18:55 +0000 X-CR-MTA-TID: 64aa7808 Received: from ab0276e978dd.1 by 64aa7808-outbound-1.mta.getcheckrecipient.com id EE711E8A-6DFB-4BEE-A8EE-7169F8A11285.1; Thu, 02 Jul 2020 16:18:50 +0000 Received: from EUR04-DB3-obe.outbound.protection.outlook.com by 64aa7808-outbound-1.mta.getcheckrecipient.com with ESMTPS id ab0276e978dd.1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384); Thu, 02 Jul 2020 16:18:50 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=YFROl4ZfKSzfynjGpjADjL9NgA1qWENY/Ftg44Lz9XdprseCUG+awTN49A6q6T+/yD9gAWB+o4ldr7xlr8bratS/gBe5yPJesC8YzrjwIC/NfbOOATU6srB1IUrralKESZPI2r65p6OQSkl+58kphOqn4cgr0O1ckp1WdxcExMUrsrMO5Q2i7pUh5W9rfyc7z7pB7Qtr2ZZNOzQldWmPbBppwqunVogg20Zy0aLwq7U7Jg+PfWyI1xAs4we7+MqHi19uKLET4LYSisEzFH9mfpKsZ4Hkj0onzZ2io4YBcPpy4QlUdaF2d5B+JMJvhSf5EdEhy6PfseWCkxW7PJST7A== 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=KVkjUuFWK9Agsv6QfiXxwUuWZR3BS+XJH1ZvlFSxiNQ=; b=D1EbCJQfEV4kG1nIcX55HtMqvL+LePlYsvAH86LEauXQdCLUocMMZu52Pvx+9xWMaO0AfkDsv+TCSBjpKDlksISkbvheGou9jTv5UnIrSJBrXMmihcy6GWYe8YfGc1klDM68t3ZyTV8C6KvGLmyB6HZGUTWAJp+YJs3/4N7jCkn9KmSQJFpmu7W3vVIB3g646kUtOGzJ6448TEg9fOm0QW0ODnwgoiHpQnTr5wSpMG2w8EAEpE4J5/G7V4nWhlmwcXsz8TS7HCu0cb99UHmiQMTR02fkquOSaRVmHsKBPrMLB3SLMgG0bWOtW0bgJB0YidCGKyZh/wwnBy987Qgo+w== 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=KVkjUuFWK9Agsv6QfiXxwUuWZR3BS+XJH1ZvlFSxiNQ=; b=znL/HPR08xOewOc9d+qV6trvXxh8kA6vx0Q9DU6c3NWyVYMa3Fn/oQ0Ygch3CR5KWZ0FLPwL6DDyZMNoLghv/NNPieeWTyyrmrXRlgyL/Aet/sOV6dpU6cW+AdDOQc2yZP9TXQlegL3ZWEKTx0s3rOdByeyoWQ7rCgPGYMaiRLw= Received: from DB6PR0802MB2216.eurprd08.prod.outlook.com (2603:10a6:4:85::9) by DB7PR08MB3787.eurprd08.prod.outlook.com (2603:10a6:10:33::11) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3153.21; Thu, 2 Jul 2020 16:18:49 +0000 Received: from DB6PR0802MB2216.eurprd08.prod.outlook.com ([fe80::9d1d:207b:e89d:199d]) by DB6PR0802MB2216.eurprd08.prod.outlook.com ([fe80::9d1d:207b:e89d:199d%10]) with mapi id 15.20.3153.023; Thu, 2 Jul 2020 16:18:49 +0000 From: Honnappa Nagarahalli To: Konstantin Ananyev , "dev@dpdk.org" CC: Feifei Wang , nd , Honnappa Nagarahalli , nd Thread-Topic: [PATCH v2 1/2] test/ring: add stress test for ST peek API Thread-Index: AQHWUHqbtrz4/GRLa0mey9QHl2qDT6j0dzjA Date: Thu, 2 Jul 2020 16:18:49 +0000 Message-ID: References: <20200630162139.19512-1-konstantin.ananyev@intel.com> <20200702141027.18447-1-konstantin.ananyev@intel.com> <20200702141027.18447-2-konstantin.ananyev@intel.com> In-Reply-To: <20200702141027.18447-2-konstantin.ananyev@intel.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-ts-tracking-id: 89604602-8e73-4c8f-93b5-01a25e139d55.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: [217.140.111.135] x-ms-publictraffictype: Email X-MS-Office365-Filtering-HT: Tenant X-MS-Office365-Filtering-Correlation-Id: beb3e180-cb8a-4b9c-5a8c-08d81ea39e16 x-ms-traffictypediagnostic: DB7PR08MB3787:|VI1PR0802MB2527: x-ms-exchange-transport-forked: True X-Microsoft-Antispam-PRVS: x-checkrecipientrouted: true nodisclaimer: true x-ms-oob-tlc-oobclassifiers: OLM:130;OLM:130; x-forefront-prvs: 0452022BE1 X-MS-Exchange-SenderADCheck: 1 X-Microsoft-Antispam-Untrusted: BCL:0; X-Microsoft-Antispam-Message-Info-Original: +WDzQTwFByffyJE9Z61RJuGjZI+fmCtLcR3egV4YQuw4NdC2ZV9k+CFiEa/SfyzjmH6z4Hcila3sOoNrp99y3E+S44EdYnqbDnCwGCHlRRA4y0C2qorMrUAz7Psqt/gbIqQvyYdQe1Vz1Tt49/4X+oDydFbm270eoyAQipcV26Pii4CJhQILmzTZbIqUOyK3Ijzzl+x60tTuF5FrvuYkGoVy/iLnxHzRz2OstbjbkXxAGPJcChQkHVSKINVSSrEce2zkiNLGQsC+7ePi3fi+ufFkNfxeo7fWKHw3CzodbG/iVXf3nINXgUPXi8NlFUYV6LQAWQ/CbkZClXoWgYFZ2g== X-Forefront-Antispam-Report-Untrusted: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:DB6PR0802MB2216.eurprd08.prod.outlook.com; PTR:; CAT:NONE; SFTY:; SFS:(4636009)(39860400002)(366004)(396003)(346002)(376002)(136003)(2906002)(26005)(9686003)(4326008)(7696005)(66946007)(76116006)(66476007)(64756008)(66556008)(52536014)(5660300002)(71200400001)(66446008)(86362001)(478600001)(8676002)(8936002)(55016002)(53546011)(186003)(6506007)(83380400001)(33656002)(316002)(54906003)(110136005); DIR:OUT; SFP:1101; x-ms-exchange-antispam-messagedata: 7Ec4v4jtUDSO1tYNFYh2LSXruC/GjksJ4+5KHcIDIb958wdsdZvKgrT77SwMA1VvlOCXRTiv4YzVVwsWIYKsUSZrD5oRIrl1rJro4o7JPJmIlt0oyy7FSGAfnJVzYABUUXUGHncEBhPZbpza/aTVsGrgPei/nD0dhe1vpXqr0WLkajsHMaNgOeuP53e64gaMYRcLmcI6PqcMGaEPXGN3GiESx7y8JJOAIdZ5HmJ3HUJzDCxm+LpkoNd813F2Ad+IeYc9XnD4OtUzPjply+EkR/iksfryb9uZC+ToIzqKAzSplSb19BUjUGnQyZh6JxhwtwLLj1cNlpOlai2q2wZTMZ4Zwg+YowF0zxsuQ2/izV66+gSkQllslfGy9MFB7pLi6o/MMYeahvWdgiViIu8X5kT/w1qL3XfhzRQ3YNV3WdwPRcpt6vPO/jmK4P6PB+g68o1YH7bKZJkqVSVy+sSyF4oNfKup9+3DevBKcMGfjkpiXT/r3Iwgxvl2yNkhu0M3 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-MS-Exchange-Transport-CrossTenantHeadersStamped: DB7PR08MB3787 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: AM5EUR03FT021.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)(39860400002)(346002)(136003)(376002)(396003)(46966005)(26005)(55016002)(4326008)(70206006)(81166007)(36906005)(7696005)(316002)(8676002)(70586007)(8936002)(336012)(5660300002)(83380400001)(186003)(52536014)(110136005)(86362001)(356005)(82740400003)(2906002)(478600001)(6506007)(53546011)(82310400002)(33656002)(54906003)(9686003)(47076004); DIR:OUT; SFP:1101; X-MS-Office365-Filtering-Correlation-Id-Prvs: 3298ecd1-5403-4163-be31-08d81ea39a67 X-Forefront-PRVS: 0452022BE1 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: mU+llXEgufSKldOkBso/UoLiP8IlrjtmgZFRisG6pTGoQl870ld29g4BSaCKAmmTWoRG5YjSoKln/UXjiQ/L26gtlqljP2hWpiTsFlNCRrOpfMYRxFzKlQafW5vTDfzm2B7dN0Vy4ZjzXSWYQ/RXotT3ShNBPzpZ5KOF8FT6Q2mwSZDLZSkA+L11ituDDJEm/YChGqEH/mRhKl5VItMYGgX+vZGtGVScU2fcrIsFj8mBdr8zJ+BerwBJtng2FCXh+dxP8dVF069cdwMdjzZsdwK2na8Fezbr2YqgDooANk03inBA+fZYBZy5m84PtiKMjNFSSDLhPh4/6tcMmd8eq4flEOUeeF9qT0Fbt5sgSZ7Ba4bVTlbl4jQdYWTKsuEksggE4mVd8PL+5nmrvWdw4w== X-OriginatorOrg: arm.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 02 Jul 2020 16:18:55.3113 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: beb3e180-cb8a-4b9c-5a8c-08d81ea39e16 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-AuthSource: AM5EUR03FT021.eop-EUR03.prod.protection.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: VI1PR0802MB2527 Subject: Re: [dpdk-dev] [PATCH v2 1/2] test/ring: add stress test for ST peek API 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" > -----Original Message----- > From: Konstantin Ananyev > Sent: Thursday, July 2, 2020 9:10 AM > To: dev@dpdk.org > Cc: Honnappa Nagarahalli ; Feifei Wang > ; Konstantin Ananyev > > Subject: [PATCH v2 1/2] test/ring: add stress test for ST peek API >=20 > Introduce new test case to test ST peek API. >=20 > Signed-off-by: Konstantin Ananyev Reviewed-by: Honnappa Nagarahalli > --- > app/test/Makefile | 1 + > app/test/meson.build | 1 + > app/test/test_ring_st_peek_stress.c | 54 +++++++++++++++++++++++++++++ > app/test/test_ring_stress.c | 3 ++ > app/test/test_ring_stress.h | 1 + > 5 files changed, 60 insertions(+) > create mode 100644 app/test/test_ring_st_peek_stress.c >=20 > diff --git a/app/test/Makefile b/app/test/Makefile index > 7b96a03a6..37bdaf891 100644 > --- a/app/test/Makefile > +++ b/app/test/Makefile > @@ -83,6 +83,7 @@ SRCS-y +=3D test_ring_hts_stress.c SRCS-y +=3D > test_ring_perf.c SRCS-y +=3D test_ring_peek_stress.c SRCS-y +=3D > test_ring_rts_stress.c > +SRCS-y +=3D test_ring_st_peek_stress.c > SRCS-y +=3D test_ring_stress.c > SRCS-y +=3D test_pmd_perf.c >=20 > diff --git a/app/test/meson.build b/app/test/meson.build index > b224d6f2b..5cb050958 100644 > --- a/app/test/meson.build > +++ b/app/test/meson.build > @@ -108,6 +108,7 @@ test_sources =3D files('commands.c', > 'test_ring_peek_stress.c', > 'test_ring_perf.c', > 'test_ring_rts_stress.c', > + 'test_ring_st_peek_stress.c', > 'test_ring_stress.c', > 'test_rwlock.c', > 'test_sched.c', > diff --git a/app/test/test_ring_st_peek_stress.c > b/app/test/test_ring_st_peek_stress.c > new file mode 100644 > index 000000000..bc573de47 > --- /dev/null > +++ b/app/test/test_ring_st_peek_stress.c > @@ -0,0 +1,54 @@ > +/* SPDX-License-Identifier: BSD-3-Clause > + * Copyright(c) 2020 Intel Corporation > + */ > + > +#include "test_ring_stress_impl.h" > +#include > + > +static inline uint32_t > +_st_ring_dequeue_bulk(struct rte_ring *r, void **obj, uint32_t n, > + uint32_t *avail) > +{ > + uint32_t m; > + > + static rte_spinlock_t lck =3D RTE_SPINLOCK_INITIALIZER; > + > + rte_spinlock_lock(&lck); > + > + m =3D rte_ring_dequeue_bulk_start(r, obj, n, avail); > + n =3D (m =3D=3D n) ? n : 0; > + rte_ring_dequeue_finish(r, n); > + > + rte_spinlock_unlock(&lck); > + return n; > +} > + > +static inline uint32_t > +_st_ring_enqueue_bulk(struct rte_ring *r, void * const *obj, uint32_t n, > + uint32_t *free) > +{ > + uint32_t m; > + > + static rte_spinlock_t lck =3D RTE_SPINLOCK_INITIALIZER; > + > + rte_spinlock_lock(&lck); > + > + m =3D rte_ring_enqueue_bulk_start(r, n, free); > + n =3D (m =3D=3D n) ? n : 0; > + rte_ring_enqueue_finish(r, obj, n); > + > + rte_spinlock_unlock(&lck); > + return n; > +} > + > +static int > +_st_ring_init(struct rte_ring *r, const char *name, uint32_t num) { > + return rte_ring_init(r, name, num, RING_F_SP_ENQ | > RING_F_SC_DEQ); } > + > +const struct test test_ring_st_peek_stress =3D { > + .name =3D "ST_PEEK", > + .nb_case =3D RTE_DIM(tests), > + .cases =3D tests, > +}; > diff --git a/app/test/test_ring_stress.c b/app/test/test_ring_stress.c in= dex > 853fcc190..387cfa747 100644 > --- a/app/test/test_ring_stress.c > +++ b/app/test/test_ring_stress.c > @@ -49,6 +49,9 @@ test_ring_stress(void) > n +=3D test_ring_peek_stress.nb_case; > k +=3D run_test(&test_ring_peek_stress); >=20 > + n +=3D test_ring_st_peek_stress.nb_case; > + k +=3D run_test(&test_ring_st_peek_stress); > + > printf("Number of tests:\t%u\nSuccess:\t%u\nFailed:\t%u\n", > n, k, n - k); > return (k !=3D n); > diff --git a/app/test/test_ring_stress.h b/app/test/test_ring_stress.h in= dex > 60953ce47..a9a390341 100644 > --- a/app/test/test_ring_stress.h > +++ b/app/test/test_ring_stress.h > @@ -36,3 +36,4 @@ extern const struct test test_ring_mpmc_stress; extern > const struct test test_ring_rts_stress; extern const struct test > test_ring_hts_stress; extern const struct test test_ring_peek_stress; > +extern const struct test test_ring_st_peek_stress; > -- > 2.17.1