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 CED9AA04AF; Fri, 18 Sep 2020 16:42:47 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id B08D91DA6C; Fri, 18 Sep 2020 16:42:47 +0200 (CEST) Received: from mga06.intel.com (mga06.intel.com [134.134.136.31]) by dpdk.org (Postfix) with ESMTP id 7D3731DA05 for ; Fri, 18 Sep 2020 16:42:45 +0200 (CEST) IronPort-SDR: 4qNjl0cOurX/KUtYNx8UlU3qNTa0+mLogrnL8AW9re6OdD3Svoo8Wy9da+ihZvdCacfBCaZvq0 8mrxCZe93Q5g== X-IronPort-AV: E=McAfee;i="6000,8403,9747"; a="221516442" X-IronPort-AV: E=Sophos;i="5.77,274,1596524400"; d="scan'208";a="221516442" X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga002.fm.intel.com ([10.253.24.26]) by orsmga104.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 18 Sep 2020 07:42:44 -0700 IronPort-SDR: umMCTMQeuZ4odMDwyiUAP6cUQz/40md1YL18bMvJLhaudiKNLMwsKunigupxyfakhEdzgt7bKr rdrwEOHb+ipw== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.77,274,1596524400"; d="scan'208";a="339815229" Received: from orsmsx601.amr.corp.intel.com ([10.22.229.14]) by fmsmga002.fm.intel.com with ESMTP; 18 Sep 2020 07:42:44 -0700 Received: from orsmsx611.amr.corp.intel.com (10.22.229.24) by ORSMSX601.amr.corp.intel.com (10.22.229.14) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.1713.5; Fri, 18 Sep 2020 07:42:43 -0700 Received: from orsmsx604.amr.corp.intel.com (10.22.229.17) 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.1713.5; Fri, 18 Sep 2020 07:42:43 -0700 Received: from ORSEDG601.ED.cps.intel.com (10.7.248.6) by orsmsx604.amr.corp.intel.com (10.22.229.17) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.1713.5 via Frontend Transport; Fri, 18 Sep 2020 07:42:43 -0700 Received: from NAM11-CO1-obe.outbound.protection.outlook.com (104.47.56.171) by edgegateway.intel.com (134.134.137.102) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.1.1713.5; Fri, 18 Sep 2020 07:42:43 -0700 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=k2NwkAJW7uPPk3vBnrvZuSHp5meOIk6RUzbZwzKaka1hDN432vIcw/T2myATgyHEQCAbTENebfegqUQWuwzaCexNaeO8nJIAk4j+jw9eBrbvT0eVMme73x/3UE8nRD8SwULC5xaaXLah3UOCsHliBwG+Dpg1qZ4GeM2tR4PQElF7iKXKnUj1IRuBGYYGR4nca5w6wjtIrAEeDElW5UBs4WHz+BcdEfOOZmmaqzEbdkXqHBRG4039QUF3IxzqAMCXDF2eFDWIg355iVLVbMNAly0n2EXscakLpBSmm7Ponb0a9KT+UywoZ0dV37Kf/mjDZA5BlY140PnUxsZFAPlSzA== 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=aKnZPGE40g03TW0IILvbakyEwxuZFsieMtgEubCS1dI=; b=Ela1TtIeQ/E1OLikS3J5VJwgK68tEOa3j4EGWGjBVwsn4TI2lWYCaymDo+gpLE10bwXHRWxdYOT+jEzgdPGWxbfDTQOKialIWya/xW0NPZITQ3b9g34g9w7k5y3n0YpiqfVcW+oREODz/4/ickjz8DTm9EsTEt19rPxldwBG34n59r/A/AYBvpQGLQBXy0dBgRyJuxUjjoZn2KJNy+dOHfxnlOrzgfabo/skN2GufYc8BD75wqQDKuk24itb3Ap2Apb3+Wo20WkNzu2ISsuhh5e0NOLt13CP4wcFRq+WISyd/mxmqpvkzPH2o1mSvcQ7K009tPRe9gebEM9FhCI0FA== 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=aKnZPGE40g03TW0IILvbakyEwxuZFsieMtgEubCS1dI=; b=zlkFqIfOkSyBrhrpbox13hWg/B5aJWvx6t0vr/KEEtm+7Y673wH50v7cSfdsGADrocQw9bLgDHTtpJTWnRqwLE9UwirHEo6+pKDrrJ71jdJKNuvhMLJSDutRolXcpz4D6eKN8FT9nLElx2yQtiJ0dr8NrjbDrEjgM2IEj77SiGo= Received: from MWHPR11MB1838.namprd11.prod.outlook.com (2603:10b6:300:10c::11) by MW3PR11MB4747.namprd11.prod.outlook.com (2603:10b6:303:2f::11) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3348.15; Fri, 18 Sep 2020 14:42:41 +0000 Received: from MWHPR11MB1838.namprd11.prod.outlook.com ([fe80::34c5:6550:a098:209f]) by MWHPR11MB1838.namprd11.prod.outlook.com ([fe80::34c5:6550:a098:209f%12]) with mapi id 15.20.3391.011; Fri, 18 Sep 2020 14:42:41 +0000 From: "Gujjar, Abhinandan S" To: Ankur Dwivedi , "dev@dpdk.org" CC: Jerin Jacob Kollanukkaran , Anoob Joseph Thread-Topic: [PATCH 1/3] test/event_crypto_adapter: return error with unsupported mode Thread-Index: AQHWhcC1yYDJ1So6OUGIgVlNZgXtbKljELJwgAr4YMCAAH0iAIAAAK4g Date: Fri, 18 Sep 2020 14:42:41 +0000 Message-ID: References: <20200908091534.24305-1-adwivedi@marvell.com> <20200908091534.24305-2-adwivedi@marvell.com> In-Reply-To: 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.5.1.3 authentication-results: marvell.com; dkim=none (message not signed) header.d=none;marvell.com; dmarc=none action=none header.from=intel.com; x-originating-ip: [103.5.135.70] x-ms-publictraffictype: Email x-ms-office365-filtering-correlation-id: 8dbc6dd2-8b80-4a1c-c645-08d85be118af x-ms-traffictypediagnostic: MW3PR11MB4747: x-microsoft-antispam-prvs: x-ms-oob-tlc-oobclassifiers: OLM:8882; x-ms-exchange-senderadcheck: 1 x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: HDb/IwlVb/jvyNenwWk9j7z75H931DvNjZFjoF5hGL/yOmFfpGuMdA8ZQXC/cL2VLvfJqX47+QbpRBWmS72IxrqxZP6FnoC/h2ma2LVvNvegEI6oUFj7Biy0izyx0U+tGEAIBcLQL3hk7U3X0WuIeVLCh9EppiakEUSGALQ4fpVEUA33Z3KuHj/99Na4tQ5oXtTq2zviOamB8M5TLTO6fxULBhddc+70Q/UAa8m2i7yzI9FADU31c1xTTskQyQXfbT/L6P0cXNQfzOwH9utjdxzRO7yb6QZrw3QD7mWoVauBh5lv0pTTVtC9gKmThAoA x-forefront-antispam-report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:MWHPR11MB1838.namprd11.prod.outlook.com; PTR:; CAT:NONE; SFS:(4636009)(346002)(366004)(376002)(39860400002)(136003)(396003)(54906003)(110136005)(5660300002)(55236004)(76116006)(66946007)(66476007)(66556008)(64756008)(66446008)(53546011)(6506007)(52536014)(7696005)(33656002)(316002)(478600001)(71200400001)(86362001)(186003)(26005)(2906002)(8936002)(55016002)(83380400001)(8676002)(9686003)(4326008); DIR:OUT; SFP:1102; x-ms-exchange-antispam-messagedata: eZfp8VecQuBh86JmT+nt5ljqzG7tmeWwj5bIRC0ey9YkQJVc9jIGJ9UUYkaQFDWG03vKxWkB06O1pDyiUjL3SjnEILOeFsAl2swGGb/9oNuu6WnywNfmzZh6cirY2wGOA+CoEMYCo1A21VEkT6vEQ3uBaaIROJmcPYwB1/JLn09rGytWwV8uiY9jon+s1zU9i3LLFX8ftbjtGdVbjj/4fXVRXc6KWbasMHSOk7UNly8tUWu/+bMPvR6LSKYPQo66dwtQIVi+1YmBe+KHTZ73tnw9NYSjjweI53i/bcLJMUZ9FvLpHgKfKKK6s1KlWGQ6lqKzNsDcM4QI9780aHHVc0mhsMfz5BBQQVenOoeRtmD/X2deJA/toFaTlSGD59nXxW/GGiwbgyKYCsgBl+4CqFLJ9RA4wQxTGjRiWQu8BsGIrLOp4ZHyrMJykmUakgep3z08wd7Jv5kpu3Zx+R5fa929+aDmIH+wHrdGytwabzxzVR9XIdxew4ZeEH3hPdLYTNm0KwSrCt6SnZjlKClol221MHFJF7HmlIIj2QeAWrAZxPgoEn9wQ2v+JMBXF8J9LGnXqpALkg2RDHaWGpDRU8Sa9sHdDLxVSp+tjg44etY5Ft9PI2oRX9SP2hvbvxOH39gj/xCKEQj7++mS8m6AMA== x-ms-exchange-transport-forked: True 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: MWHPR11MB1838.namprd11.prod.outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: 8dbc6dd2-8b80-4a1c-c645-08d85be118af X-MS-Exchange-CrossTenant-originalarrivaltime: 18 Sep 2020 14:42:41.1017 (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: /6EDMUr7t29+P77jMBVMbAiKwkfgcRW/0WpEiSVPsym8Q2IvlmqljtGr4g/A/PlfQozifnA9TnvYefYe1l0uEv3LzRVLIHiZGSBW0MBB/b4= X-MS-Exchange-Transport-CrossTenantHeadersStamped: MW3PR11MB4747 X-OriginatorOrg: intel.com Subject: Re: [dpdk-dev] [PATCH 1/3] test/event_crypto_adapter: return error with unsupported mode 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" Hi Ankur, Please see comments inline. Regards Abhinandan > -----Original Message----- > From: Ankur Dwivedi > Sent: Friday, September 18, 2020 8:05 PM > To: Gujjar, Abhinandan S ; dev@dpdk.org > Cc: Jerin Jacob Kollanukkaran ; Anoob Joseph > > Subject: RE: [PATCH 1/3] test/event_crypto_adapter: return error with > unsupported mode >=20 > Hi Abhinandan, >=20 > Please see my comments inline. >=20 > Thanks > Ankur >=20 > >-----Original Message----- > >From: Gujjar, Abhinandan S > >Sent: Friday, September 18, 2020 12:41 PM > >To: Ankur Dwivedi ; dev@dpdk.org > >Cc: Jerin Jacob Kollanukkaran ; Anoob Joseph > > > >Subject: [EXT] RE: [PATCH 1/3] test/event_crypto_adapter: return error > >with unsupported mode > > > >External Email > > > >---------------------------------------------------------------------- > >Hi Ankur, > > > >This patch requires minor change. Please find the comment inline. > > > >> -----Original Message----- > >> From: Gujjar, Abhinandan S > >> Sent: Friday, September 11, 2020 1:07 PM > >> To: Ankur Dwivedi ; dev@dpdk.org > >> Cc: jerinj@marvell.com; anoobj@marvell.com > >> Subject: RE: [PATCH 1/3] test/event_crypto_adapter: return error with > >> unsupported mode > >> > >> Acked-by: abhinandan.gujjar@intel.com (For series) > >> > >> > -----Original Message----- > >> > From: Ankur Dwivedi > >> > Sent: Tuesday, September 8, 2020 2:46 PM > >> > To: dev@dpdk.org > >> > Cc: Gujjar, Abhinandan S ; > >> > jerinj@marvell.com; anoobj@marvell.com; Ankur Dwivedi > >> > > >> > Subject: [PATCH 1/3] test/event_crypto_adapter: return error with > >> > unsupported mode > >> > > >> > The capability of a event device should be checked before creating > >> > a event crypto adapter in a particular mode. The test case returns > >> > error if the mode is not supported. > >> > > >> > Signed-off-by: Ankur Dwivedi > >> > --- > >> > app/test/test_event_crypto_adapter.c | 30 > >> > ++++++++++++++++++---------- > >> > 1 file changed, 20 insertions(+), 10 deletions(-) > >> > > >> > diff --git a/app/test/test_event_crypto_adapter.c > >> > b/app/test/test_event_crypto_adapter.c > >> > index 8d42462d8..930c2a9bc 100644 > >> > --- a/app/test/test_event_crypto_adapter.c > >> > +++ b/app/test/test_event_crypto_adapter.c > >> > @@ -750,15 +750,23 @@ configure_event_crypto_adapter(enum > >> > rte_event_crypto_adapter_mode mode) > >> > uint32_t cap; > >> > int ret; > >> > > >> > + ret =3D rte_event_crypto_adapter_caps_get(evdev, TEST_CDEV_ID, > >> > &cap); > >> > + TEST_ASSERT_SUCCESS(ret, "Failed to get adapter capabilities\n"); > >> > + > >> > + if ((mode =3D=3D RTE_EVENT_CRYPTO_ADAPTER_OP_FORWARD) && > >> > + !(cap & > >> > RTE_EVENT_CRYPTO_ADAPTER_CAP_INTERNAL_PORT_OP_FWD)) > >> > + return -ENOTSUP; > >> > + > >> > + if ((mode =3D=3D RTE_EVENT_CRYPTO_ADAPTER_OP_NEW) && > >> > + !(cap & > >> > RTE_EVENT_CRYPTO_ADAPTER_CAP_INTERNAL_PORT_OP_NEW)) > >> > + return -ENOTSUP; > >> > + > >SW adapter does not have *_INTERNAL_PORT_* caps. Just noticed test was > >failing here. > >Could you please bypass this check for "event_sw" and repost the patch? > [Ankur] I was thinking of handling this by reading > rte_eventdevs[evdev].data->name. > If the name matches event_sw0(which is the default device name), I will > bypass if checks. > Can the event_sw device name be anything else? > Or, if there is a better way of handling this please let me know. Yes. You can also use rte_event_dev_info_get(evdev, &info) and check info.d= river_name for "event_sw". > > > >> > /* Create adapter with default port creation callback */ > >> > ret =3D rte_event_crypto_adapter_create(TEST_ADAPTER_ID, > >> > - TEST_CDEV_ID, > >> > + evdev, > >> > &conf, mode); > >> > TEST_ASSERT_SUCCESS(ret, "Failed to create event crypto > >> adapter\n"); > >> > > >> > - ret =3D rte_event_crypto_adapter_caps_get(TEST_ADAPTER_ID, > >> > evdev, &cap); > >> > - TEST_ASSERT_SUCCESS(ret, "Failed to get adapter capabilities\n"); > >> > - > >> > if (cap & > >> > RTE_EVENT_CRYPTO_ADAPTER_CAP_INTERNAL_PORT_QP_EV_BIND) { > >> > ret =3D > >> > rte_event_crypto_adapter_queue_pair_add(TEST_ADAPTER_ID, > >> > TEST_CDEV_ID, TEST_CDEV_QP_ID, > &response_info); @@ -813,6 > >> > +821,8 @@ test_crypto_adapter_conf(enum > >> > rte_event_crypto_adapter_mode mode) > >> > TEST_ASSERT(ret >=3D 0, "Failed to link queue %d " > >> > "port=3D%u\n", qid, > >> > params.crypto_event_port_id); > >> > + } else { > >> > + return ret; > >> > } > >> > crypto_adapter_setup_done =3D 1; > >> > } > >> > @@ -845,24 +855,24 @@ static int > >> > test_crypto_adapter_conf_op_forward_mode(void) > >> > { > >> > enum rte_event_crypto_adapter_mode mode; > >> > + int ret; > >> > > >> > mode =3D RTE_EVENT_CRYPTO_ADAPTER_OP_FORWARD; > >> > - TEST_ASSERT_SUCCESS(test_crypto_adapter_conf(mode), > >> > - "Failed to config crypto adapter"); > >> > + ret =3D test_crypto_adapter_conf(mode); > >> > > >> > - return TEST_SUCCESS; > >> > + return ret; > >> > } > >> > > >> > static int > >> > test_crypto_adapter_conf_op_new_mode(void) > >> > { > >> > enum rte_event_crypto_adapter_mode mode; > >> > + int ret; > >> > > >> > mode =3D RTE_EVENT_CRYPTO_ADAPTER_OP_NEW; > >> > - TEST_ASSERT_SUCCESS(test_crypto_adapter_conf(mode), > >> > - "Failed to config crypto adapter"); > >> > + ret =3D test_crypto_adapter_conf(mode); > >> > > >> > - return TEST_SUCCESS; > >> > + return ret; > >> > } > >> > > >> > > >> > -- > >> > 2.28.0