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 664A8A04C9; Mon, 14 Sep 2020 06:31:39 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 492441BE98; Mon, 14 Sep 2020 06:31:39 +0200 (CEST) Received: from EUR05-VI1-obe.outbound.protection.outlook.com (mail-vi1eur05on2040.outbound.protection.outlook.com [40.107.21.40]) by dpdk.org (Postfix) with ESMTP id 7F03D160; Mon, 14 Sep 2020 06:31:37 +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=sQO/tX5OzNM8F487WjMW29It+5d2gcebWaR28d2DYWY=; b=ikPDyQWIIrbwANQ93nKMa8b2Us+K/wybCetjDW3jSnZv2yRGi5N6g/eyATsA3Anj6F+MYShuAUGMR2kL3SkKyyT5/G82wv40l0rTBXGp3hVp72o6xglsO3ofqiPA25PGHQIAGYfMnmUxcF8iJMvP2Ag3mCR1bzcF5QwsOdqnYk8= Received: from DB8PR06CA0022.eurprd06.prod.outlook.com (2603:10a6:10:100::35) by VI1PR0801MB1902.eurprd08.prod.outlook.com (2603:10a6:800:88::15) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3370.16; Mon, 14 Sep 2020 04:31:36 +0000 Received: from DB5EUR03FT028.eop-EUR03.prod.protection.outlook.com (2603:10a6:10:100:cafe::16) by DB8PR06CA0022.outlook.office365.com (2603:10a6:10:100::35) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3370.16 via Frontend Transport; Mon, 14 Sep 2020 04:31:36 +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 DB5EUR03FT028.mail.protection.outlook.com (10.152.20.99) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3370.16 via Frontend Transport; Mon, 14 Sep 2020 04:31:35 +0000 Received: ("Tessian outbound 7fc8f57bdedc:v64"); Mon, 14 Sep 2020 04:31:35 +0000 X-CR-MTA-TID: 64aa7808 Received: from eec33c5a4532.2 by 64aa7808-outbound-1.mta.getcheckrecipient.com id 13DE8B6D-D302-41A3-9B66-3F2A5C49515A.1; Mon, 14 Sep 2020 04:31:30 +0000 Received: from EUR05-AM6-obe.outbound.protection.outlook.com by 64aa7808-outbound-1.mta.getcheckrecipient.com with ESMTPS id eec33c5a4532.2 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384); Mon, 14 Sep 2020 04:31:30 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=Sxle6alPlHGnrMjxe5i2aUtIC5n2T1G3/szfPD7Hw8BsiIDYSFkSfcAPVRqWxwVYKWut5Az6ScdRuUVkfdT7wC9c/UqVOAsG1A6vaUmiDmA4+wIs3yIT+sJjOAKOiP/piUrqv9D8onf5ZJqAQ2PjJYqNwmq5u++GMre+0J0xLUvRa98yeZcnv0n+PGvCKp4w1PdzYRP4eq5Udi39UGlI0z05DwSYsiMmVLU/YFOSoSA8V1qEvBvr6Tb5c5bIJvaU3sKXcc2IgOasAZj1RbBd75aN1TKwh4c/3g+6K7m+aL+cGbfoHrlEM1oVFluR6FbrMfQsjikbUlKLLGiB7ZDX0Q== 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=sQO/tX5OzNM8F487WjMW29It+5d2gcebWaR28d2DYWY=; b=HHbt/7+w7NRyBvxgiTnZOg/YFuQ0d/HQOOZXd589OFi0ksMzYZGh6vXpg+A25d91KUw9zIBtZtgkLqI224xqGVXT/oOdTiFvPlu1ANHJ1rUzPVH7UfElyr19BdNe0KLqIkcAxxFF+Rxp11gUFcsEW3YzkxunpVvwr+lFYUo5poQXuBXgkl361JsThZDNyi4vRUfrG1wt2JJoeU77zYrRyJeHAoK6y78DZjHHIx/6bEx1lkcxC+8MtVLJowvSmKTX+2h9qthqdNQio04nldgXQVGHIxtl+SKGJdkNN5UDdEgmJO+09yXo/RGDXtT/D67NEz+9q9GMzcsNOSTwDGl6ww== 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=sQO/tX5OzNM8F487WjMW29It+5d2gcebWaR28d2DYWY=; b=ikPDyQWIIrbwANQ93nKMa8b2Us+K/wybCetjDW3jSnZv2yRGi5N6g/eyATsA3Anj6F+MYShuAUGMR2kL3SkKyyT5/G82wv40l0rTBXGp3hVp72o6xglsO3ofqiPA25PGHQIAGYfMnmUxcF8iJMvP2Ag3mCR1bzcF5QwsOdqnYk8= Received: from DBAPR08MB5814.eurprd08.prod.outlook.com (2603:10a6:10:1b1::6) by DB7PR08MB3882.eurprd08.prod.outlook.com (2603:10a6:10:7d::26) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3370.16; Mon, 14 Sep 2020 04:31:29 +0000 Received: from DBAPR08MB5814.eurprd08.prod.outlook.com ([fe80::408a:40fb:7402:c805]) by DBAPR08MB5814.eurprd08.prod.outlook.com ([fe80::408a:40fb:7402:c805%6]) with mapi id 15.20.3370.019; Mon, 14 Sep 2020 04:31:29 +0000 From: Honnappa Nagarahalli To: Feifei Wang , Konstantin Ananyev CC: "dev@dpdk.org" , nd , Feifei Wang , "stable@dpdk.org" , Honnappa Nagarahalli , nd Thread-Topic: [PATCH v3 4/6] test/ring: fix wrong number of enq/deq elements Thread-Index: AQHWiFY+NIM5dVsFUkek1bcFZ3jhX6lnjthA Date: Mon, 14 Sep 2020 04:31:29 +0000 Message-ID: References: <20200729063105.11299-1-feifei.wang2@arm.com> <20200911161002.19816-1-feifei.wang2@arm.com> <20200911161002.19816-5-feifei.wang2@arm.com> In-Reply-To: <20200911161002.19816-5-feifei.wang2@arm.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-ts-tracking-id: 69A65C0FCF18664ABF2DB4572C637E02.0 x-checkrecipientchecked: true Authentication-Results-Original: arm.com; dkim=none (message not signed) header.d=none;arm.com; dmarc=none action=none header.from=arm.com; x-originating-ip: [217.140.110.7] x-ms-publictraffictype: Email X-MS-Office365-Filtering-HT: Tenant X-MS-Office365-Filtering-Correlation-Id: a9717350-8170-4afc-6e12-08d8586710cb x-ms-traffictypediagnostic: DB7PR08MB3882:|VI1PR0801MB1902: x-ms-exchange-transport-forked: True X-Microsoft-Antispam-PRVS: x-checkrecipientrouted: true nodisclaimer: true x-ms-oob-tlc-oobclassifiers: OLM:1417;OLM:1417; X-MS-Exchange-SenderADCheck: 1 X-Microsoft-Antispam-Untrusted: BCL:0; X-Microsoft-Antispam-Message-Info-Original: OLolzIHgozHoOKOxjH+s1t/qTmFM0XgZKr3U/sq+5Llp5GIRwhOC9adDJteyz0EPb02i4iuHnUDr56DEAr1shuhsZUEUUKKK9J1QqGAgagYvYQ3SJ+vSGh1geqfrAOCr3BJjmsFIVkqybSgFUJpunTEFFuAYLyBAkhXrj7jMWhuxtHZ1TrLj/kPeBSFvc9wMC3CNk2m813mpvoIKhmSstt0tXSRjr+32gW2Qz/b8ylgwECSNdAEG0g0ArySIKpbBEvozOkus6bObWpiBvOHT0DKmmpjZXhjrmwEsKO+cl0IGv81Is1hrwadonP4Ltt7a2w5zAbbRXxc2dPUarRqMNg== X-Forefront-Antispam-Report-Untrusted: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:DBAPR08MB5814.eurprd08.prod.outlook.com; PTR:; CAT:NONE; SFS:(4636009)(136003)(396003)(366004)(39850400004)(376002)(346002)(26005)(186003)(6506007)(2906002)(7696005)(316002)(9686003)(55016002)(8676002)(4326008)(8936002)(86362001)(71200400001)(5660300002)(110136005)(54906003)(478600001)(66476007)(66556008)(33656002)(52536014)(66446008)(76116006)(83380400001)(64756008)(66946007); DIR:OUT; SFP:1101; x-ms-exchange-antispam-messagedata: RGqe85RJ2yHUO/kAkbpouH0iPyH7VzXjBMECn22tp65hYIJ5gNOEroZoEoPEOt1WxsbBHdj3HEB1ghRK5JO11OODkX87FxNYQElihOk+DrRW9uJTCBYO2m31uhKAcnkTU+t5SV2fvpJ8ZeAGuXElPbe6RYM2af9s0WfKc+ox4MFcy5Yy38dZ07evC9kJ4LwbFVqWkIVPQ6tvEgq611hwuygtXCkCJKxGR6Wm3LAFqcB0WvYxK8XdgTgr0r7cLnVt1iI3FyndWmuImlPS92TwzPdVa5mZRQuViVb3KS7Ex6tXT2pKv+HB++nDV0YFhwvtuKECdcxNQpWrq7SVirakbWsue9pcMCCkYvdgfvv4rnXGl0lGZXgtddr9aKH4Gy6T4cYXc9MGJ3XnErox1rc4yNw6msnEjsoMKLE9Uj8jYDuX6rYe4kepYU0UzaQdfqZ1XY/Ci6IkSAQSAnpMHszy3ASPqFQ4Xr1xde949vofyaejhIA7o8U177lfCWMX3BvlNmbp7w2xmj3T8kYealRrKEqJdhqRoRe4BME6TXpQM+IOIqShs0vUMcyDuzdT2/v6kGflGDprmK/3z9B9qLVIsW0RRuHF36GsFygVUQ96CBfpXoyF5AtC3vYquSBJ1T5pxmPdLKHyKWJ4L8ormVSELg== Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-MS-Exchange-Transport-CrossTenantHeadersStamped: DB7PR08MB3882 Original-Authentication-Results: arm.com; dkim=none (message not signed) header.d=none;arm.com; dmarc=none action=none header.from=arm.com; X-EOPAttributedMessage: 0 X-MS-Exchange-Transport-CrossTenantHeadersStripped: DB5EUR03FT028.eop-EUR03.prod.protection.outlook.com X-MS-Office365-Filtering-Correlation-Id-Prvs: 54d9f5ae-6a5d-41d1-c24a-08d858670cd1 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: 4gIJWwXFx/4xCXX1XgkBiW+M7v2rqsAtJJHlNCnT9fh8MUKBB3W73elaOFFHMNHqIc3fIasItPH7fzDx7jGqcNkQW75/YyqBUkjnoD8eanUEjdHKzKPIpzc7L+govVm2p1tU1e13vSXhZcQmPbQKVKnBvcONFHeD+JtC9yjhUwq3ZMIFKPYeRFuyyVulbogdUn+YpBoI3SmDR1l6KZnZhlwbmZbvC8LNuOuI6Zmx+r2A8/zgFhHdF9EDu3d4tK2NCiJZXTczeuuhzZ0aoCodrH4anZDJx25FG/3d21evuImYwAQaBx+5sHqF+R2aUdIVx+TXlWAui7KwcIn6zOpy2tVwi3Xo/L6aLxnq8H59KfsM5jeClKyZVuMrmsyg6Mj7BwsacTai2cHZA0DO0LDVTQ== 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; SFS:(4636009)(136003)(396003)(346002)(39850400004)(376002)(46966005)(110136005)(4326008)(186003)(81166007)(7696005)(356005)(9686003)(47076004)(478600001)(52536014)(5660300002)(82740400003)(316002)(336012)(33656002)(86362001)(70586007)(70206006)(55016002)(54906003)(2906002)(26005)(8676002)(6506007)(450100002)(82310400003)(8936002)(83380400001); DIR:OUT; SFP:1101; X-OriginatorOrg: arm.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 14 Sep 2020 04:31:35.9478 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: a9717350-8170-4afc-6e12-08d8586710cb 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: DB5EUR03FT028.eop-EUR03.prod.protection.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: VI1PR0801MB1902 Subject: Re: [dpdk-dev] [PATCH v3 4/6] test/ring: fix wrong number of enq/deq elements 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 > The ring capacity is (RING_SIZE - 1), thus only (RING_SIZE - 1) number of > elements can be enqueued into the ring. >=20 > Fixes: af75078fece3 ("first public release") > Cc: stable@dpdk.org >=20 > Signed-off-by: Feifei Wang > Reviewed-by: Ruifeng Wang > Reviewed-by: Phil Yang Looks good Reviewed-by: Honnappa Nagarahalli > --- > app/test/test_ring.c | 4 ++-- > 1 file changed, 2 insertions(+), 2 deletions(-) >=20 > diff --git a/app/test/test_ring.c b/app/test/test_ring.c index > 63d44d85e..811adc523 100644 > --- a/app/test/test_ring.c > +++ b/app/test/test_ring.c > @@ -822,7 +822,7 @@ test_ring_basic_ex(void) > printf("%u ring entries are now free\n", > rte_ring_free_count(rp)); >=20 > - for (j =3D 0; j < RING_SIZE; j++) { > + for (j =3D 0; j < RING_SIZE - 1; j++) { > ret =3D test_ring_enqueue(rp, cur_src, esize[i], 1, > TEST_RING_THREAD_DEF | > TEST_RING_ELEM_SINGLE); > if (ret !=3D 0) { > @@ -839,7 +839,7 @@ test_ring_basic_ex(void) > goto fail_test; > } >=20 > - for (j =3D 0; j < RING_SIZE; j++) { > + for (j =3D 0; j < RING_SIZE - 1; j++) { > ret =3D test_ring_dequeue(rp, cur_dst, esize[i], 1, > TEST_RING_THREAD_DEF | > TEST_RING_ELEM_SINGLE); > if (ret !=3D 0) { > -- > 2.17.1