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 466E4A00C3; Wed, 7 Dec 2022 07:54:52 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 3868F410FB; Wed, 7 Dec 2022 07:54:52 +0100 (CET) Received: from mga04.intel.com (mga04.intel.com [192.55.52.120]) by mails.dpdk.org (Postfix) with ESMTP id 55C69410D7 for ; Wed, 7 Dec 2022 07:54:51 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1670396091; x=1701932091; h=from:to:cc:subject:date:message-id:references: in-reply-to:content-transfer-encoding:mime-version; bh=tS95dTZoZeZgsjIfjeYEOuwNS1ZgvC9aDPH10BxklQw=; b=LUsaAzKTOQRIQOTec14wHXL6KWPs3d6V2nDQp0MRpHIVmVp6eQcGNCNp Lscys8Gb6XIjz5HdCnJgi5Y4zkVx6XlSG8XbooNjrdPCTg8MYIZFFZPLF MYeOriDcfxKcIFUPTwDiNdEYiXPXTFXbs5CYC/Dbc5evSFzguOKFCImtd 2dM0Le5jMWNldoHvk5T1cSaOcm25p3FpjQlKBAO3nI2Qqv3/Y7TIYbD1V sWkL+hhO4GegJ8MWRgRQ0KTtyN4vzwVT9zx5aEvz3W4RdGF0wHY4cm5wH euN/PaJGUwf5owQx15mBwdIW7ifkN+uoaMS2FRrXdtISAqvHk+43jPxyI g==; X-IronPort-AV: E=McAfee;i="6500,9779,10553"; a="315533586" X-IronPort-AV: E=Sophos;i="5.96,223,1665471600"; d="scan'208";a="315533586" Received: from fmsmga007.fm.intel.com ([10.253.24.52]) by fmsmga104.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 06 Dec 2022 22:54:50 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6500,9779,10553"; a="648613813" X-IronPort-AV: E=Sophos;i="5.96,223,1665471600"; d="scan'208";a="648613813" Received: from fmsmsx602.amr.corp.intel.com ([10.18.126.82]) by fmsmga007.fm.intel.com with ESMTP; 06 Dec 2022 22:54:50 -0800 Received: from fmsmsx610.amr.corp.intel.com (10.18.126.90) by fmsmsx602.amr.corp.intel.com (10.18.126.82) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.16; Tue, 6 Dec 2022 22:54:49 -0800 Received: from fmsedg601.ED.cps.intel.com (10.1.192.135) by fmsmsx610.amr.corp.intel.com (10.18.126.90) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.16 via Frontend Transport; Tue, 6 Dec 2022 22:54:49 -0800 Received: from NAM11-DM6-obe.outbound.protection.outlook.com (104.47.57.172) by edgegateway.intel.com (192.55.55.70) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.1.2507.16; Tue, 6 Dec 2022 22:54:49 -0800 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=MJTMM35uzm76vPEZFmSUKq5P/x8n7p6vJbpOussL7MRG+ihIqCznt4DVFKrlpRcXGxvF9cwvMjM4hxsGduwYrFU2AJXOr/4FFN3ISynzJRWbvAeRIeOLtRHSU4YAUMTkPRDmpKhu2SBb1wYbje1xQU5mApDolyjFG3R81rChc/3zTwE6E4ESj6rSr4Ts9vb0MBpNktPHvsV40+iHVBjvuZaH9+7PAXKw8r3O0awuYbIOpMnZAYD9IouEXT63waSzpDOjZb0F3iIM4OD0tTg+PCx8AY3wur7tqUOtI0HCLEX5R4SiGmv9MPb7q4MuE3JWcMEnNmGU6mclGKIvryarPQ== 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=jcZKJEZjrMmkVU+3WEfKIvC5RmtLVCIPPj6aNj5YwXM=; b=NOpgUIzKfcsMPhGqnlUr4LKOvL+rS4ci3dPPRnJcbzDdt/4VOb9S+7OPULKBqzHTPnSKAo3f9roo7V9P6X78xbON2zX2N+yx930wsm+eVBInUU91QwnjcNOSj1OxwnFTAwMGUukS1faKlcUfvhnxyaNVhJQxkjzbUy+lcC1FcCbPt8hD6/+nxmMBb4Zl79QskT5kyr05ym8QRd8qSv9aTVZs+W24ifxV1COYps81a2ePnkhrcbAGAVxZn9cuBJA+Orzmxu2+D/XJ48BnHxqOC39PlubmN7pLSYsyXGrhNwlC2i1SI2NnhnRg1vhBd9tphytu1BVunYrL8JS8adlkPg== 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 Received: from PH0PR11MB5832.namprd11.prod.outlook.com (2603:10b6:510:141::7) by IA1PR11MB7677.namprd11.prod.outlook.com (2603:10b6:208:3fd::5) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5880.14; Wed, 7 Dec 2022 06:54:42 +0000 Received: from PH0PR11MB5832.namprd11.prod.outlook.com ([fe80::ef44:2061:3d86:6b21]) by PH0PR11MB5832.namprd11.prod.outlook.com ([fe80::ef44:2061:3d86:6b21%9]) with mapi id 15.20.5880.014; Wed, 7 Dec 2022 06:54:42 +0000 From: "Gujjar, Abhinandan S" To: "Kundapura, Ganapati" , "dev@dpdk.org" , "jerinj@marvell.com" , "Naga Harish K, S V" CC: "Jayatheerthan, Jay" , "vfialko@marvell.com" Subject: RE: [PATCH v3 1/5] eventdev/event_crypto: process event port's impl rel cap Thread-Topic: [PATCH v3 1/5] eventdev/event_crypto: process event port's impl rel cap Thread-Index: AQHZCggdjAFlZbFk1E26pQtpwt87Ua5h/Xnw Date: Wed, 7 Dec 2022 06:54:41 +0000 Message-ID: References: <20221201064652.1885734-1-ganapati.kundapura@intel.com> <20221207064945.1665368-1-ganapati.kundapura@intel.com> In-Reply-To: <20221207064945.1665368-1-ganapati.kundapura@intel.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: authentication-results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=intel.com; x-ms-publictraffictype: Email x-ms-traffictypediagnostic: PH0PR11MB5832:EE_|IA1PR11MB7677:EE_ x-ms-office365-filtering-correlation-id: 8288fa29-c0ca-4d0a-40e4-08dad81feab1 x-ms-exchange-senderadcheck: 1 x-ms-exchange-antispam-relay: 0 x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: 8fGaltIH8aE3/wUzxlg+dOmJMplT6eJ4fudfJcXqS0fVkQuUw3+NoEccgGnr++Mza4LibMRP1mmUXkWXLqwTGmSQwz+gA2TuhjQG1YPuYHrIf5m89vBmLLxxylRtrKxhr/pN+WAEaA1lwTe+GFuZDCNMkU8JPZmvpbjoiaN97UiWdth5zOdAuxTvVx+RRb0iSJ2kIzhNz5UYuueUWsMPkiYu/O8NE5jt6effjwqnxlk8tLtXNoMX6d3GDPHwrRGVuszG+KUNg3wue3M+nKnjKTeigZi78NHRxATQwVN3+OQu1Mn48Dr9S/7jrNUZroCYR5PIfSFmyvx2nBUlbP4xGkk0KsTdhhTz9AXP4eHbJvr/pQTPPl8em7Uc7rwpQIbnCz+JF/uiM20GcNgZstMfFupEZ7OdfY3OD+eIVvw5PszC5Y8gAZs805roBwgITHmyubLdt5+kL7V9Z/+WBsiOYsaDrbdqPDWpZZ0vwqwYTjiFHN+eJ6E5ZuglZt+60raVSrRnbbGd6ZyWAkTP/Ln+Jr+OdIfyjdyRXRAn7c+926ijWA3hhRgu4ko//1QShTYQk/pyE9X46sNBJb6p4onfOzthMAbL0hP/BVWeKM8y82/fjyo/BBLwEAS3JJwf+O6hG8OyfPxtID/44v3fF+yB4TM/fH6q954vrRMKX/Otl1mWK6gO8ON4MkgmhZWftN5i3HMKrszBTkPqmz+WFzoKbw== x-forefront-antispam-report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:PH0PR11MB5832.namprd11.prod.outlook.com; PTR:; CAT:NONE; SFS:(13230022)(346002)(136003)(366004)(396003)(376002)(39860400002)(451199015)(54906003)(86362001)(8936002)(41300700001)(2906002)(33656002)(4326008)(5660300002)(38070700005)(38100700002)(83380400001)(122000001)(478600001)(71200400001)(66556008)(66946007)(316002)(6636002)(66446008)(110136005)(82960400001)(76116006)(52536014)(55016003)(8676002)(55236004)(6506007)(7696005)(53546011)(9686003)(186003)(66476007)(64756008)(26005); DIR:OUT; SFP:1102; x-ms-exchange-antispam-messagedata-chunkcount: 1 x-ms-exchange-antispam-messagedata-0: =?us-ascii?Q?RJuFY8QHINkXs7As9EOUAz72TdLH+SxR8oo6wyPQ2c8fOqhas3EqcJNcZ7Uq?= =?us-ascii?Q?f7qUX8LXOlsLMmtJ7FBGL0MLc7Nw6Svi0udY0FyKmQOcg8Tc7aV23BdRVCAa?= =?us-ascii?Q?GD6uCtxlY1rKwoSyd97toL7cMZ1nj+82KXvty5FlpEVPgyxhiP7+/8CKxrdz?= =?us-ascii?Q?LjOJXlwkS1jeMeU11MI4aFr/GHWq8PN/b4dcSo3C/aRS5UlPj0KW/agSLJNt?= =?us-ascii?Q?Pai9nUbcW6CsBhaJ93awzbR/4Ch9ewdgiQ0o3C7We8yWv0I+BUuDNO0tjxvB?= =?us-ascii?Q?aOcH1yzFatxrnm/LPACO2NuOs8RL7ZygqJ93jzm0nIWdsLc0vX9HPWZ8K7v2?= =?us-ascii?Q?9m3d6fp0dG6/sifUcJGQQl4ShlaVNhFE5BPe9OQ5oR7oplm94MsEDxfDvUjk?= =?us-ascii?Q?z1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gVwbfDpd1UUH7i7Fo3Y4X0G?= =?us-ascii?Q?HTpqmWj/ZT3TkiUO4zQNBwejL+xCH0knvwFahl7jEQS/zGN6tq2ey7MJG0C+?= =?us-ascii?Q?27UgslMuHeSS5zmcZEGZWkHut7F2fBEbDOCyXDMZ5b42JknlhOsQ+6j1JkUK?= =?us-ascii?Q?uDpJxIGnqsWR3NAOiXuXQFphh/CcYkeWyGJw7/3W7MVMZZERFSzH5tLhvN79?= =?us-ascii?Q?+3scb8hsignDc9QaxKbktFs+NJn9v0AnLYfSkl3A4PeoRmx4yk1tIU9OVGAH?= =?us-ascii?Q?wTJhRJESUwsVlDhBP+rqjHJpqB/q+fwukGmVpf7gv7o9azSxYq+LTFnPu46Q?= =?us-ascii?Q?9w=3D=3D?= 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: PH0PR11MB5832.namprd11.prod.outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: 8288fa29-c0ca-4d0a-40e4-08dad81feab1 X-MS-Exchange-CrossTenant-originalarrivaltime: 07 Dec 2022 06:54:41.8948 (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: 6FzmqBWrxB8HHDfEds7b4F5sf9WsCGAR/kCevhSdYRg5XobnLX/W1PNJ8WOtEANxIPjIrC2akYp4WpxNMxUqKpfYs246fIzlEJXFpLHS3kE= X-MS-Exchange-Transport-CrossTenantHeadersStamped: IA1PR11MB7677 X-OriginatorOrg: intel.com 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 Acked-by: Abhinandan Gujjar > -----Original Message----- > From: Kundapura, Ganapati > Sent: Wednesday, December 7, 2022 12:20 PM > To: dev@dpdk.org; jerinj@marvell.com; Naga Harish K, S V > ; Gujjar, Abhinandan S > > Cc: Jayatheerthan, Jay ; vfialko@marvell.com > Subject: [PATCH v3 1/5] eventdev/event_crypto: process event port's impl = rel > cap >=20 > In the current implementation adapter queries event device's capability f= or > implicit release support. >=20 > This information is used to decide whether events are enqueued back as NE= W > or FWD events. >=20 > This patch updates the adapter to query the port caps for implicit releas= e to > decide on events enqueuing back as NEW/FWD events. >=20 > Signed-off-by: Ganapati Kundapura > --- > v3: > * Freed adapter and adapter->ebuf after rte_event_port_attr_get() failure >=20 > v2: > * Updated subject line in commit message >=20 > diff --git a/lib/eventdev/rte_event_crypto_adapter.c > b/lib/eventdev/rte_event_crypto_adapter.c > index 3c585d7..134470b 100644 > --- a/lib/eventdev/rte_event_crypto_adapter.c > +++ b/lib/eventdev/rte_event_crypto_adapter.c > @@ -53,7 +53,7 @@ struct event_crypto_adapter { > uint8_t eventdev_id; > /* Event port identifier */ > uint8_t event_port_id; > - /* Store event device's implicit release capability */ > + /* Store event port's implicit release capability */ > uint8_t implicit_release_disabled; > /* Flag to indicate backpressure at cryptodev > * Stop further dequeuing events from eventdev @@ -320,7 +320,6 > @@ rte_event_crypto_adapter_create_ext(uint8_t id, uint8_t dev_id, { > struct event_crypto_adapter *adapter; > char mem_name[CRYPTO_ADAPTER_NAME_LEN]; > - struct rte_event_dev_info dev_info; > int socket_id; > uint8_t i; > int ret; > @@ -361,17 +360,6 @@ rte_event_crypto_adapter_create_ext(uint8_t id, > uint8_t dev_id, > return -ENOMEM; > } >=20 > - ret =3D rte_event_dev_info_get(dev_id, &dev_info); > - if (ret < 0) { > - RTE_EDEV_LOG_ERR("Failed to get info for eventdev %d: > %s!", > - dev_id, dev_info.driver_name); > - eca_circular_buffer_free(&adapter->ebuf); > - rte_free(adapter); > - return ret; > - } > - > - adapter->implicit_release_disabled =3D (dev_info.event_dev_cap & > - RTE_EVENT_DEV_CAP_IMPLICIT_RELEASE_DISABLE); > adapter->eventdev_id =3D dev_id; > adapter->socket_id =3D socket_id; > adapter->conf_cb =3D conf_cb; > @@ -837,6 +825,7 @@ eca_init_service(struct event_crypto_adapter > *adapter, uint8_t id) > struct rte_event_crypto_adapter_conf adapter_conf; > struct rte_service_spec service; > int ret; > + uint32_t impl_rel; >=20 > if (adapter->service_inited) > return 0; > @@ -866,6 +855,19 @@ eca_init_service(struct event_crypto_adapter > *adapter, uint8_t id) >=20 > adapter->max_nb =3D adapter_conf.max_nb; > adapter->event_port_id =3D adapter_conf.event_port_id; > + > + if (rte_event_port_attr_get(adapter->eventdev_id, > + adapter->event_port_id, > + > RTE_EVENT_PORT_ATTR_IMPLICIT_RELEASE_DISABLE, > + &impl_rel)) { > + RTE_EDEV_LOG_ERR("Failed to get port info for eventdev %" > PRId32, > + adapter->eventdev_id); > + eca_circular_buffer_free(&adapter->ebuf); > + rte_free(adapter); > + return -EINVAL; > + } > + > + adapter->implicit_release_disabled =3D (uint8_t)impl_rel; > adapter->service_inited =3D 1; >=20 > return ret; > -- > 2.6.4