From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id 73B9DA0C41; Tue, 5 Oct 2021 09:37:37 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id E9531412A6; Tue, 5 Oct 2021 09:37:36 +0200 (CEST) Received: from mga17.intel.com (mga17.intel.com [192.55.52.151]) by mails.dpdk.org (Postfix) with ESMTP id 9742B41290 for ; Tue, 5 Oct 2021 09:37:35 +0200 (CEST) X-IronPort-AV: E=McAfee;i="6200,9189,10127"; a="206491888" X-IronPort-AV: E=Sophos;i="5.85,348,1624345200"; d="scan'208";a="206491888" Received: from fmsmga001.fm.intel.com ([10.253.24.23]) by fmsmga107.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 05 Oct 2021 00:37:33 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.85,348,1624345200"; d="scan'208";a="623303092" Received: from orsmsx603.amr.corp.intel.com ([10.22.229.16]) by fmsmga001.fm.intel.com with ESMTP; 05 Oct 2021 00:37:32 -0700 Received: from orsmsx611.amr.corp.intel.com (10.22.229.24) by ORSMSX603.amr.corp.intel.com (10.22.229.16) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2242.12; Tue, 5 Oct 2021 00:37:31 -0700 Received: from orsmsx605.amr.corp.intel.com (10.22.229.18) by ORSMSX611.amr.corp.intel.com (10.22.229.24) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2242.12; Tue, 5 Oct 2021 00:37:29 -0700 Received: from orsedg603.ED.cps.intel.com (10.7.248.4) by orsmsx605.amr.corp.intel.com (10.22.229.18) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2242.12 via Frontend Transport; Tue, 5 Oct 2021 00:37:29 -0700 Received: from NAM11-BN8-obe.outbound.protection.outlook.com (104.47.58.176) by edgegateway.intel.com (134.134.137.100) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.1.2242.12; Tue, 5 Oct 2021 00:36:46 -0700 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=WQuzfbuob0H2om9ww+3/3FiqTnH+Yo1X4RM/OFlNOEGxeldOAN7KEgBaA+t9BYnhnrX7epa88z2zOA4HTXyFehI0aYg7c9vLZUt5HannP/ASDziiGw4lPA/W7OiEHW4Pa9jiho4NcTWkqHDJlaf7yJotK0uD67wkPtQoYx93cHP3eatC7OKibk5SLFDKmRlEpJFRsu+lHzVriO40Cr5CYWHH/K3gL+0wtqy38ezxcdl/NDejRjYNecwNkGPTKN5s24AliK1YpqZVEnpOZoBZ49NZjkz+dsLtvIpg4EBu+W5nO06EgH6+rCtqQn/tUKKUbHAw8j2gsotRO3rl8aFhHQ== 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-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=dwL5HfEyWbShGIfez2gHyaJ7vWyhUp1ACU/49MFj25M=; b=BefAz+JeA7uK38YplcBEKPniDcJwlz7Ir4iyh3RWSRtbnuqVaAgu2ZpnN1kzhsmp36//SnkosGkb0/CfyS/IxKs9Fe069en6JV4k32D/dngv3STkSC8988p0oDHL4t4qS8Mi5oJ7is0Yc1rruOVvXQhgn8rTSdmt8oq+GzbD+344Lq2czz7k6QxYMCO4qY6htL/DreYX+vO2DK1q+ewuhu+ugohg9nt2m9Fmjj/u2dscZHcZ7X0lXTkQytvgajBmXWV60phBR7DfIEjNd73P3BfRtmCkIysjpy0Ns2HqyMo0RopXHfd1+bj6iUJpbdmIVAtxrWTkPn6DxZjcDqk/4A== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=intel.com; dmarc=pass action=none header.from=intel.com; dkim=pass header.d=intel.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=intel.onmicrosoft.com; s=selector2-intel-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=dwL5HfEyWbShGIfez2gHyaJ7vWyhUp1ACU/49MFj25M=; b=a00m0ERRAPJzJwQXqdzwAh3GfsF6hhT4qeXLEnHgdLyf8+TXqOChxUihUBU38rGNPQso8OfKIH+SptmmY9pZonNEEPgsVOyWZZ0/LdgEY7WDZ/e3LAR7lOxG82dPqVeO34wkKOQckzZF4lvhYMyylw0LJ9+Ru5OSbJyFXen+P+w= Received: from BN6SPR00MB239.namprd11.prod.outlook.com (2603:10b6:405:11::23) by BN6PR11MB4132.namprd11.prod.outlook.com (2603:10b6:405:81::10) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4566.19; Tue, 5 Oct 2021 07:36:44 +0000 Received: from BN6SPR00MB239.namprd11.prod.outlook.com ([fe80::ccd0:582d:7ffc:6102]) by BN6SPR00MB239.namprd11.prod.outlook.com ([fe80::ccd0:582d:7ffc:6102%6]) with mapi id 15.20.4566.022; Tue, 5 Oct 2021 07:36:44 +0000 From: "Jayatheerthan, Jay" To: "Naga Harish K, S V" , "jerinj@marvell.com" CC: "dev@dpdk.org" Thread-Topic: [PATCH v5 2/5] test/event: add unit test for Rx adapter Thread-Index: AQHXuOKA3Ar/Tv+RkUqWulflvBzkPqvEBGlQ Date: Tue, 5 Oct 2021 07:36:44 +0000 Message-ID: References: <20210930082901.293541-1-s.v.naga.harish.k@intel.com> <20211004054108.3890018-1-s.v.naga.harish.k@intel.com> <20211004054108.3890018-2-s.v.naga.harish.k@intel.com> In-Reply-To: <20211004054108.3890018-2-s.v.naga.harish.k@intel.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: dlp-product: dlpe-windows dlp-reaction: no-action dlp-version: 11.6.200.16 authentication-results: intel.com; dkim=none (message not signed) header.d=none;intel.com; dmarc=none action=none header.from=intel.com; x-ms-publictraffictype: Email x-ms-office365-filtering-correlation-id: bc6fb53e-72ba-4e36-e7af-08d987d2e19e x-ms-traffictypediagnostic: BN6PR11MB4132: x-ms-exchange-transport-forked: True x-microsoft-antispam-prvs: x-ms-oob-tlc-oobclassifiers: OLM:84; x-ms-exchange-senderadcheck: 1 x-ms-exchange-antispam-relay: 0 x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: D0ChecFsE2qe0lFaMbVotgv47NNqs7SuTw89yyNYHsScyXOcz+Rcw4GI8S2FXDCV5hXuncsNnbJpmYBto2k2JwrkSu2yeRrjzhLI/touiVcHzwICb1t7MoOUwqvD5jMNv4QLY0SytaF2m+8RP3mKYAxgNZbGM9Hr/8GVd1EcrgJjfX9dw0+spQS7v7siISQDNooplJCyoQLokbIz8SBwrybSlaD5XSeSn3qY+ue47axrpu0W0XRRbL/RhpC8Kk7N1dKPG+WuyKKVrZW8PsuO5uisgmc8bQuYuiPorOLnmKPXN4PB2prSY6LtWlI6LJ9fG40uFan9Rfp+2XALPfEC7/t7FbRAbBIUZbliYJ5fM+3vpmwibogQ2xff2/8ICuS3btC9J6HUfNs3F40Anq5WQhjCPL74Bq4pwot0sJZAUDIybfP/ZPtPh8T5InI5HOxgs8OxmN/cN4n2nKhCS9AP14q5ID+UECRnfM4D0kxxbi2XkwE+zaxewphGB7BKkdsetR9ZHI4d5h0gBB2URYgEu5gynJS4QhJME6FjdKBDRktQ+XmjnYQSDqpNTXVIzrnujh3NM/qJPRzneqR4k+t8QfG+nP731geNUvZfK6ErOtTId3wAsVu5S4WcUiTdfn5OySDck5b3xI5HXHRLEaqUkl8GRY6lk5ootE2C+LhI6bPR4OayqOzzJXzB812wP67nW8Eoh2JiiLInEE5IazHS7g== x-forefront-antispam-report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:BN6SPR00MB239.namprd11.prod.outlook.com; PTR:; CAT:NONE; SFS:(4636009)(366004)(55016002)(86362001)(71200400001)(508600001)(7696005)(83380400001)(26005)(186003)(6506007)(9686003)(53546011)(110136005)(316002)(66446008)(38100700002)(66556008)(122000001)(66476007)(5660300002)(52536014)(33656002)(64756008)(4326008)(8936002)(2906002)(8676002)(38070700005)(76116006)(66946007); DIR:OUT; SFP:1102; x-ms-exchange-antispam-messagedata-chunkcount: 1 x-ms-exchange-antispam-messagedata-0: =?us-ascii?Q?WgX6NlhSC8EgZ4ScYd9jO9RReYkepOXNXXFj9SKuRo0nqwpcd7wiL/wb5AbZ?= =?us-ascii?Q?pHR3ley/uhLLsp6z6uez0TQlxooEBFJlhGGdhdAfWa1BvV5K8XOUDYOrd46t?= =?us-ascii?Q?8cZRmJDo+zkCyjPxwUDMwe2sP+gLqNXNUZrBKBieZJdYUp+BekV5VulRZgeZ?= =?us-ascii?Q?OUMjwtWvqO023HIVVgOanx/B2C2bT3TRpox2/js/M06+do9ALgAKJArYTZQ+?= =?us-ascii?Q?REy1nCsTHsGl79eaPCNUgpg9gWc6cj0bTx+ccTT1zZMBD7rRSMFpuCdKlmMa?= =?us-ascii?Q?yJhb/PDJTp3bWd2X3GUwKNP8bMY6T6d433lkkS2UblB4Kjh12j6NUudq8cvX?= =?us-ascii?Q?G4B6FUDG0K5o69RtSYnyl+FGRxM+YrvfDP/WHbr3ZpLr8jyv0ishYJ2IsL5n?= =?us-ascii?Q?Lq0NuAljDecuxqN1zzHIrANPApo1S1VfPQq7IpMegdCh62n/598MQCQQHzw/?= =?us-ascii?Q?qG5V8i2R13uXVHO2JJJu31R9OC0Di60IAViB+lTC6s137t95NIEBM7FKtBCX?= =?us-ascii?Q?vvJ7XNW3gW/IxYbvdL5UaBra1z/40YV+JFqy/2PaQKzmXDXvQEKqstmWwdKc?= =?us-ascii?Q?2M/wtDFHKNy94Iq3uHpi4xozFh7D05TJz+MyTo8GjZ8fjLqiTfKMDTkHKDGS?= =?us-ascii?Q?RFc2ImMF3Fz6+orPMzRXB7KhPRWPkahyxj8Y3efbHnrbrxW8hpE4dtNXBma6?= =?us-ascii?Q?ZZXpxuPMoLlklm48eO+agMrZ7/H9iS1bfcT9YRHk4cy9/rLkcGaurGpSCLC/?= =?us-ascii?Q?w0rI5pcl7drpHekFaFNveuX729fc6pziqOcEuYOVx/1esh1UgaLaJnDlrLWH?= =?us-ascii?Q?RYeDPspIt683d6xiiejDkUBM16vtYkQPXWqexdUD7sIeek27hp6PYdXO5Cq+?= =?us-ascii?Q?SnoBSZitKqY3VzwpTRwftDZ3N0nUpSnipionUZp5Dsi++zO/BHbA68wQjB22?= =?us-ascii?Q?rRt3ON6dGSZj981D7TW0cocs/ReUlOjESA3yNmx/O6+hSW/Od3uquM7wElny?= =?us-ascii?Q?PObkC/njJViQg9qJEIJ7MQtXklnQtcg7HJXSV1cSJU6yRJdOCp2Q6kvE7CiK?= =?us-ascii?Q?UQ5eluWn/Btrus91Yos8wBIATZxqVv/QGTIosu1nYEX083I6X8qfng1RF8GQ?= =?us-ascii?Q?0noF2EZZlVqpnvIqJBr3TPgqczR1IHN3s6EqjgVEXmMLcoqEF6QwhIWL3j1M?= =?us-ascii?Q?x9CR+sbW8OFBRkuEDBetkaHgemRgm1TdZeZRvQfWOybWDlOa7EQYzuNfgNR8?= =?us-ascii?Q?eovUijS12rUz/pVA4V1HDeedNaECAU7EWvAdR9kbzuApZzyzd2zXz68tuZsb?= =?us-ascii?Q?puxQYAVi2xmNlUN89VdB0QJk?= Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-AuthSource: BN6SPR00MB239.namprd11.prod.outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: bc6fb53e-72ba-4e36-e7af-08d987d2e19e X-MS-Exchange-CrossTenant-originalarrivaltime: 05 Oct 2021 07:36:44.6605 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 46c98d88-e344-4ed4-8496-4ed7712e255d X-MS-Exchange-CrossTenant-mailboxtype: HOSTED X-MS-Exchange-CrossTenant-userprincipalname: rVL6kda41EDewa+o3mduCp1aNjR0bgHb9eNAap3w6ZI/44lCAkR8GRcJFnxDTOvzvTeptXIUWMoUZz1wVTYdjzSuee5hYroEfI4INO2zYSM= X-MS-Exchange-Transport-CrossTenantHeadersStamped: BN6PR11MB4132 X-OriginatorOrg: intel.com Subject: Re: [dpdk-dev] [PATCH v5 2/5] test/event: add unit test for Rx adapter X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.29 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: Naga Harish K, S V > Sent: Monday, October 4, 2021 11:11 AM > To: jerinj@marvell.com; Jayatheerthan, Jay > Cc: dev@dpdk.org > Subject: [PATCH v5 2/5] test/event: add unit test for Rx adapter >=20 > this patch adds unit test for rte_event_eth_rx_adapter_create_with_params > api and validate all possible input combinations. >=20 > Signed-off-by: Naga Harish K S V > --- > app/test/test_event_eth_rx_adapter.c | 53 +++++++++++++++++++++++++--- > 1 file changed, 49 insertions(+), 4 deletions(-) >=20 > diff --git a/app/test/test_event_eth_rx_adapter.c b/app/test/test_event_e= th_rx_adapter.c > index 13664a3a3b..7c2cf0dd70 100644 > --- a/app/test/test_event_eth_rx_adapter.c > +++ b/app/test/test_event_eth_rx_adapter.c > @@ -428,6 +428,50 @@ adapter_create_free(void) > return TEST_SUCCESS; > } >=20 > +static int > +adapter_create_free_with_params(void) > +{ > + int err; > + > + struct rte_event_port_conf rx_p_conf =3D { > + .dequeue_depth =3D 8, > + .enqueue_depth =3D 8, > + .new_event_threshold =3D 1200, > + }; > + > + struct rte_event_eth_rx_adapter_params rxa_params =3D { > + .event_buf_size =3D 1024 > + }; > + > + err =3D rte_event_eth_rx_adapter_create_with_params(TEST_INST_ID, > + TEST_DEV_ID, NULL, NULL); > + TEST_ASSERT(err =3D=3D -EINVAL, "Expected -EINVAL got %d", err); > + > + err =3D rte_event_eth_rx_adapter_create_with_params(TEST_INST_ID, > + TEST_DEV_ID, &rx_p_conf, &rxa_params); > + TEST_ASSERT(err =3D=3D 0, "Expected 0 got %d", err); > + > + err =3D rte_event_eth_rx_adapter_create_with_params(TEST_INST_ID, > + TEST_DEV_ID, &rx_p_conf, &rxa_params); > + TEST_ASSERT(err =3D=3D -EEXIST, "Expected -EEXIST %d got %d", -EEXIST, = err); > + > + rxa_params.event_buf_size =3D 0; > + err =3D rte_event_eth_rx_adapter_create_with_params(TEST_INST_ID, > + TEST_DEV_ID, &rx_p_conf, &rxa_params); > + TEST_ASSERT(err =3D=3D -EINVAL, "Expected -EINVAL got %d", err); > + > + err =3D rte_event_eth_rx_adapter_free(TEST_INST_ID); > + TEST_ASSERT(err =3D=3D 0, "Expected 0 got %d", err); > + > + err =3D rte_event_eth_rx_adapter_free(TEST_INST_ID); > + TEST_ASSERT(err =3D=3D -EINVAL, "Expected -EINVAL %d got %d", -EINVAL, = err); > + > + err =3D rte_event_eth_rx_adapter_free(1); > + TEST_ASSERT(err =3D=3D -EINVAL, "Expected -EINVAL %d got %d", -EINVAL, = err); > + > + return TEST_SUCCESS; > +} > + > static int > adapter_queue_add_del(void) > { > @@ -435,7 +479,7 @@ adapter_queue_add_del(void) > struct rte_event ev; > uint32_t cap; >=20 > - struct rte_event_eth_rx_adapter_queue_conf queue_config; > + struct rte_event_eth_rx_adapter_queue_conf queue_config =3D {0}; >=20 > err =3D rte_event_eth_rx_adapter_caps_get(TEST_DEV_ID, TEST_ETHDEV_ID, > &cap); > @@ -523,7 +567,7 @@ adapter_multi_eth_add_del(void) > uint16_t port_index, port_index_base, drv_id =3D 0; > char driver_name[50]; >=20 > - struct rte_event_eth_rx_adapter_queue_conf queue_config; > + struct rte_event_eth_rx_adapter_queue_conf queue_config =3D {0}; >=20 > ev.queue_id =3D 0; > ev.sched_type =3D RTE_SCHED_TYPE_ATOMIC; > @@ -594,7 +638,7 @@ adapter_intr_queue_add_del(void) > struct rte_event ev; > uint32_t cap; > uint16_t eth_port; > - struct rte_event_eth_rx_adapter_queue_conf queue_config; > + struct rte_event_eth_rx_adapter_queue_conf queue_config =3D {0}; >=20 > if (!default_params.rx_intr_port_inited) > return 0; > @@ -687,7 +731,7 @@ adapter_start_stop(void) > ev.sched_type =3D RTE_SCHED_TYPE_ATOMIC; > ev.priority =3D 0; >=20 > - struct rte_event_eth_rx_adapter_queue_conf queue_config; > + struct rte_event_eth_rx_adapter_queue_conf queue_config =3D {0}; >=20 > queue_config.rx_queue_flags =3D 0; > if (default_params.caps & > @@ -774,6 +818,7 @@ static struct unit_test_suite event_eth_rx_tests =3D = { > .teardown =3D testsuite_teardown, > .unit_test_cases =3D { > TEST_CASE_ST(NULL, NULL, adapter_create_free), > + TEST_CASE_ST(NULL, NULL, adapter_create_free_with_params), > TEST_CASE_ST(adapter_create, adapter_free, > adapter_queue_add_del), > TEST_CASE_ST(adapter_create, adapter_free, > -- > 2.25.1 Acked-by: Jay Jayatheerthan