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 9069DA04C9; Mon, 14 Sep 2020 06:30:02 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 7741AE07; Mon, 14 Sep 2020 06:30:02 +0200 (CEST) Received: from EUR05-AM6-obe.outbound.protection.outlook.com (mail-am6eur05on2080.outbound.protection.outlook.com [40.107.22.80]) by dpdk.org (Postfix) with ESMTP id 4535A160 for ; Mon, 14 Sep 2020 06:30:01 +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=Lsey2SlmC2QVqPkfsHUHOwy30/mFjUtBb/WcXiQbqus=; b=1oiVGPJlC0DdcTQztfHdvHUMVWhd0K9VOye9I4yRNSx+W1bqxyVqnhY1zNnbNGFnuRzfo29L/ZbAt5r7R1Yz6bBo7rJq9cgKvCqsy8SSLlm7IWKWa3gGOmpYbnA5LIFM7f81+XpMp8l7fhVGIm7jkWJ/+v9IVAomV8lgxMuaP7k= Received: from DB6PR0301CA0063.eurprd03.prod.outlook.com (2603:10a6:4:54::31) by VE1PR08MB4943.eurprd08.prod.outlook.com (2603:10a6:803:115::27) 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:30:00 +0000 Received: from DB5EUR03FT043.eop-EUR03.prod.protection.outlook.com (2603:10a6:4:54:cafe::46) by DB6PR0301CA0063.outlook.office365.com (2603:10a6:4:54::31) 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:29:59 +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 DB5EUR03FT043.mail.protection.outlook.com (10.152.20.236) 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:29:59 +0000 Received: ("Tessian outbound 7161e0c2a082:v64"); Mon, 14 Sep 2020 04:29:59 +0000 X-CR-MTA-TID: 64aa7808 Received: from 081a6e476279.2 by 64aa7808-outbound-1.mta.getcheckrecipient.com id F852A582-FC9A-45B3-81ED-601881E3CA00.1; Mon, 14 Sep 2020 04:29:54 +0000 Received: from EUR04-HE1-obe.outbound.protection.outlook.com by 64aa7808-outbound-1.mta.getcheckrecipient.com with ESMTPS id 081a6e476279.2 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384); Mon, 14 Sep 2020 04:29:54 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=QWcDEOPz1uALSLZz67Vu8SXUXqQBSX/1u4r4L1EhmWMUnh/6HvPtoR906TfQES4pz7cZVgvOYbyR3W28YzAe9K/72e53FIzFEeErBEMO3rKlZ1r9ODOcubJ7fdNUtnBUs33a0b/MQJa0LdicCgS+qLUfUKTROUQXVqGDGAWSjMgDl5wY85FL3j2WFK4/441NmqoahFxqor7w7VzVebzFNZVYY5Gqp/INPdRhZd0wbpdtiZKRRKskeIlmxBjBNd/oPE+jAZ3tOcJt7WD58mjxhctifAW63ZC0ayG5SDnM3jlA3DR2Umrad4rF6wm8oeHwueipsaTaDLC0GkQ0+ypciA== 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=Lsey2SlmC2QVqPkfsHUHOwy30/mFjUtBb/WcXiQbqus=; b=lJCqsAgnZK3bL1bjnZpdR3+HI0R4UljQ8Kxhfa/tB99g5/6/1pEI7OB1PYtobH12ehH4vaiTCl38pDjuRlo7XLWGJgY/mSBipp/78FfU3BH/1ujcTfMH7DlOZ+sjHOCtMQW1m4IH8nRaMMx7h/7L3w/cAinc4p3NdGrwq2hxZtFEygaEqR6977/eQEmc3pp4XrmB0nsIgESbpPi5rR5tKdw1Pbr7YhXIUjo56C8IfJaokZ8MG2zjz54Bly+6kWWvv71Sy0tDFTG0QGqxPHz23HV/Js8c/s0HXlT/2vS1Zdf7FWQlb4tsRyBsYvBFwZDSTnRA26Y2wWMwd417EMhLqA== 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=Lsey2SlmC2QVqPkfsHUHOwy30/mFjUtBb/WcXiQbqus=; b=1oiVGPJlC0DdcTQztfHdvHUMVWhd0K9VOye9I4yRNSx+W1bqxyVqnhY1zNnbNGFnuRzfo29L/ZbAt5r7R1Yz6bBo7rJq9cgKvCqsy8SSLlm7IWKWa3gGOmpYbnA5LIFM7f81+XpMp8l7fhVGIm7jkWJ/+v9IVAomV8lgxMuaP7k= 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:29:52 +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:29:52 +0000 From: Honnappa Nagarahalli To: Feifei Wang , Konstantin Ananyev CC: "dev@dpdk.org" , nd , Feifei Wang , Honnappa Nagarahalli , nd Thread-Topic: [PATCH v3 3/6] test/ring: validate the return value of enq/deq elements Thread-Index: AQHWiFY5zH9oSC5ui0GmbM3CaN9YCKlnjmEA Date: Mon, 14 Sep 2020 04:29:52 +0000 Message-ID: References: <20200729063105.11299-1-feifei.wang2@arm.com> <20200911161002.19816-1-feifei.wang2@arm.com> <20200911161002.19816-4-feifei.wang2@arm.com> In-Reply-To: <20200911161002.19816-4-feifei.wang2@arm.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-ts-tracking-id: 720CE0B743AB4E49B3CEEF4B9E275E1E.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: bb34f04d-f2be-4fd1-0e06-08d85866d774 x-ms-traffictypediagnostic: DB7PR08MB3882:|VE1PR08MB4943: x-ms-exchange-transport-forked: True X-Microsoft-Antispam-PRVS: x-checkrecipientrouted: true nodisclaimer: true x-ms-oob-tlc-oobclassifiers: OLM:327;OLM:327; X-MS-Exchange-SenderADCheck: 1 X-Microsoft-Antispam-Untrusted: BCL:0; X-Microsoft-Antispam-Message-Info-Original: l+zOKU2Lt+JcHFDDySd2XGxcUgUAdJ8mBNHmeTGCRShNCz5F4Gv5Aqms1xzUJJbmuko+pBHmu/4LQsZHFXFzDE3yWtxagI39NhBymOe0/Ol12FNsu9mx/6ttzIwomo9HzY8MzFFkk5PpUSNd3cVsrTy8hWu95Wo+SHLyxMP+R3cmwbTXzFHX4UlsnV3fptkDUiO+ohp2v9HYgkNNka3S4Ni5WRc/UJB/oKlzeFtTGGb7nW5OTLR9fIlFUsfhEK4GEQ0BcDn25vmVP3cKmFbgDaeGxGSDw5cYiUFHjHHhDpzDcRDkU8j/eDn7svpUFGHxqvTiVtcsehUqbvHG3aSfJA== 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)(15650500001)(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: b/N2JnWVeusSIVoP843RYv1jwnimLnqn0gZFFN3YBB88zaGTDd1Pds5/+U+EveDbkKLsGzZ/q9Al9v5vLpbPzcVRw33Je3s4CaKyWU9LJYCW9CkNowXQhBf+TSLhClTPardKI1Ay/fbFXHA5xzuHB8VUD4tadrRy/RJ1xzWeUZVSlM21CSYAf7SfKPaRH0PSSfLrho5S3AI5S8GZggjSwicQZUGeN8Z4VrKSq51hm8qiLf9bdLnKPjbl8houxETr6oKrVcEo3K088ss29IFNGM12R5m1ucjb+pdqdhyzW9JY/ENb04xvgxia27TwUvPFqCed2w+xYKaHbxbH1OaCPm7MYfCep0Db3lV3AYhVTGhm1+R1b6T4bVXLxS7opWnySYc1pYBy+D+3yb7wUNUjxz5cmTPukAKl5GyZj6X39aiTXG1acPcYewhMhzAVX2BGllm2XHqZBKJ3LrLCnHJ+OGEllOykSrHgbCQ+6d62uQI9NLz62Q5W89xYEScMk2MAPuPnnHRyT8UFItTCKSXbssE6vqMA+Mi3aNfdMAw+iZgln62G8w0I1ssz9JWB5HA+B0BgaoXTOl9cLJBME6Z2HQ0e+ykAN2rKFWT9EfGWnLnj4fsBrNY0vo0UZvOgKkH8ArkdO/Pm7aJXCwXkAYmEfQ== 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: DB5EUR03FT043.eop-EUR03.prod.protection.outlook.com X-MS-Office365-Filtering-Correlation-Id-Prvs: 2320bfb7-8ff6-445d-4346-08d85866d343 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: LPvTKOL1dPiRHgEB+dyV2ggHDvHU1DDeilJ4PP7e+XkNZDj4yUzKOsNGb0dyg+/28LzPVznbupuTVCqzQ8Z7NvxTN5kNbYh4FLxSkB+2uTQZamiluOSt0awvxl85wp1hIHY8luUCElsLUAG6CPepA/wFZxXjPMylBB+FwIiCnLMkAM0jFLPMSjRVbR+r3lCQ4+kG9ASIuiPRXt5M5a0TMj9Ues86zXQ+RkReiBomURen6dysDn1IX3fuwUjBKYYXfg0xI7f1w8SK+wo8d0cFTjs766/cvb83eIcqeFbUB0U+11TaLPqFGRnn10Bia9lvtGIBvCVB8KH+mkxIvcCWXNZPQJQ9LjkyH8n/thlMzXWCU1SC1yj/Na2uianl2bshBgpus8Swxx4Riiw1kznG7g== 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)(376002)(346002)(39850400004)(396003)(46966005)(336012)(70206006)(70586007)(33656002)(316002)(86362001)(83380400001)(54906003)(52536014)(5660300002)(2906002)(110136005)(82310400003)(47076004)(356005)(15650500001)(81166007)(6506007)(26005)(8676002)(4326008)(82740400003)(55016002)(8936002)(9686003)(7696005)(478600001)(186003); DIR:OUT; SFP:1101; X-OriginatorOrg: arm.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 14 Sep 2020 04:29:59.7480 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: bb34f04d-f2be-4fd1-0e06-08d85866d774 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: DB5EUR03FT043.eop-EUR03.prod.protection.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: VE1PR08MB4943 Subject: Re: [dpdk-dev] [PATCH v3 3/6] test/ring: validate the return value 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 > Validate the return value of single element enqueue/dequeue operation in > the test. >=20 > Suggested-by: Honnappa Nagarahalli > Signed-off-by: Feifei Wang > Reviewed-by: Phil Yang Reviewed-by: Honnappa Nagarahalli > --- > app/test/test_ring.c | 26 ++++++++++++++++++++++---- > 1 file changed, 22 insertions(+), 4 deletions(-) >=20 > diff --git a/app/test/test_ring.c b/app/test/test_ring.c index > 6e48cc0b1..63d44d85e 100644 > --- a/app/test/test_ring.c > +++ b/app/test/test_ring.c > @@ -823,8 +823,13 @@ test_ring_basic_ex(void) > rte_ring_free_count(rp)); >=20 > for (j =3D 0; j < RING_SIZE; j++) { > - test_ring_enqueue(rp, cur_src, esize[i], 1, > + ret =3D test_ring_enqueue(rp, cur_src, esize[i], 1, > TEST_RING_THREAD_DEF | > TEST_RING_ELEM_SINGLE); > + if (ret !=3D 0) { > + printf("%s: rte_ring_enqueue fails\n", > + __func__); > + goto fail_test; > + } > cur_src =3D test_ring_inc_ptr(cur_src, esize[i], 1); > } >=20 > @@ -835,8 +840,13 @@ test_ring_basic_ex(void) > } >=20 > for (j =3D 0; j < RING_SIZE; j++) { > - test_ring_dequeue(rp, cur_dst, esize[i], 1, > + ret =3D test_ring_dequeue(rp, cur_dst, esize[i], 1, > TEST_RING_THREAD_DEF | > TEST_RING_ELEM_SINGLE); > + if (ret !=3D 0) { > + printf("%s: rte_ring_dequeue fails\n", > + __func__); > + goto fail_test; > + } > cur_dst =3D test_ring_inc_ptr(cur_dst, esize[i], 1); > } >=20 > @@ -990,10 +1000,18 @@ test_ring_with_exact_size(void) > * than the standard ring. (16 vs 15 elements) > */ > for (j =3D 0; j < ring_sz - 1; j++) { > - test_ring_enqueue(std_r, cur_src, esize[i], 1, > + ret =3D test_ring_enqueue(std_r, cur_src, esize[i], 1, > TEST_RING_THREAD_DEF | > TEST_RING_ELEM_SINGLE); > - test_ring_enqueue(exact_sz_r, cur_src, esize[i], 1, > + if (ret !=3D 0) { > + printf("%s: error, enqueue failed\n", > __func__); > + goto test_fail; > + } > + ret =3D test_ring_enqueue(exact_sz_r, cur_src, esize[i], 1, > TEST_RING_THREAD_DEF | > TEST_RING_ELEM_SINGLE); > + if (ret !=3D 0) { > + printf("%s: error, enqueue failed\n", > __func__); > + goto test_fail; > + } > cur_src =3D test_ring_inc_ptr(cur_src, esize[i], 1); > } > ret =3D test_ring_enqueue(std_r, cur_src, esize[i], 1, > -- > 2.17.1