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 87BF8A0C46; Wed, 18 Aug 2021 10:22:55 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 155AE4014D; Wed, 18 Aug 2021 10:22:55 +0200 (CEST) Received: from mga06.intel.com (mga06.intel.com [134.134.136.31]) by mails.dpdk.org (Postfix) with ESMTP id 7EBFF40042 for ; Wed, 18 Aug 2021 10:22:53 +0200 (CEST) X-IronPort-AV: E=McAfee;i="6200,9189,10079"; a="277305305" X-IronPort-AV: E=Sophos;i="5.84,330,1620716400"; d="scan'208";a="277305305" Received: from orsmga006.jf.intel.com ([10.7.209.51]) by orsmga104.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 18 Aug 2021 01:22:52 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.84,330,1620716400"; d="scan'208";a="423601862" Received: from fmsmsx606.amr.corp.intel.com ([10.18.126.86]) by orsmga006.jf.intel.com with ESMTP; 18 Aug 2021 01:22:52 -0700 Received: from fmsmsx606.amr.corp.intel.com (10.18.126.86) by fmsmsx606.amr.corp.intel.com (10.18.126.86) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2242.10; Wed, 18 Aug 2021 01:22:51 -0700 Received: from fmsedg602.ED.cps.intel.com (10.1.192.136) by fmsmsx606.amr.corp.intel.com (10.18.126.86) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2242.10 via Frontend Transport; Wed, 18 Aug 2021 01:22:51 -0700 Received: from NAM04-BN8-obe.outbound.protection.outlook.com (104.47.74.48) by edgegateway.intel.com (192.55.55.71) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.1.2242.10; Wed, 18 Aug 2021 01:22:51 -0700 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=kqU351K6Hl8bSfWclcEIyFTtS8bGGFEU7kcXkO7yOLAz9J89tz25OzBxtlBhGyzNtW/THkSfb6HZp7WBsIEaJz5DQfoeqDepWQJiCeHIRLVJLEHqvjUiJexGHRE9hqbp8/ddAty6W2KucQXd4vpCa7zBE69rLU5k8WKX+Jxo0/3ggjzAUyIHK8LA+vOYIz8aeyfnyESDomC+ZqUwTVZsPdjrsLPv/qvIlybfMU8WvIMXNIFOh+cezV8M9rTwh87f5S7FXte0+FTEdtnjdUhonLSxp91W6VK9ZCZR+bQbzkBo94/ze00jDC3vn3jgXBm+1q1Khm686NRPtiQWP07yUA== 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=apb+AN3KkRs7lw495H6+KmrjRRu6X6x3vXR8Uxv7H7s=; b=lFTHkwW7Yp3hHoFpiyA/HelihQNdaW2FhckPewPUv5ieTZWr43Iaou2yZpRuVfS/JfDB8Eb4FXwYdqNFrzqhh1NA8dqqZyHBrOhnRb2/XgdlWWBDWJtP/GJ5UHd9Ln5j9cpB6a3PP+F3aiua3e2ZtFwZij4VxTieIxGwxZmkyZwuMN9bDFzA9qAxVkYk2dturEL09tO6/bGzioPFYVGPOUtmzDx49iEPg3Wj9VEffQfNdT9lMEDTo6wOg5hEO3fB+onJYdrTYfBC2n9xqMswE5a8KatRzr0akWBi+5zeCxwMagu/Bcru8ZeMSemawSD2yDUdS9BLivR8kRMEMctoSw== 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=apb+AN3KkRs7lw495H6+KmrjRRu6X6x3vXR8Uxv7H7s=; b=YCJyrLS0HsOsJR9p1YpHyLuhmMq+4jBCnwY29swn5VI+M29fiWB9zidp4MzQNCi5iKYKiGM4Oqg8PXnZL6c7n1/rOeuRWYj2H1acE11pgXV4Locu2KhVntG2ooRynULxVPB+XbkELdprhi9lZsmWvQeD/+RlCQy58QBfFwQV0Z4= Received: from BYAPR11MB3110.namprd11.prod.outlook.com (2603:10b6:a03:8a::23) by BYAPR11MB3398.namprd11.prod.outlook.com (2603:10b6:a03:19::19) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4415.22; Wed, 18 Aug 2021 08:22:49 +0000 Received: from BYAPR11MB3110.namprd11.prod.outlook.com ([fe80::5130:372a:481e:db62]) by BYAPR11MB3110.namprd11.prod.outlook.com ([fe80::5130:372a:481e:db62%4]) with mapi id 15.20.4415.024; Wed, 18 Aug 2021 08:22:49 +0000 From: "Jayatheerthan, Jay" To: "pbhagavatula@marvell.com" , "jerinj@marvell.com" , Ray Kinsella , Shijith Thotton , "Naga Harish K, S V" CC: "dev@dpdk.org" Thread-Topic: [dpdk-dev] [PATCH v13] eventdev: simplify Rx adapter event vector config Thread-Index: AQHXk/5bGCNgR/SsJ0qE0bdAJyqCnKt47EhQ Date: Wed, 18 Aug 2021 08:22:49 +0000 Message-ID: References: <20210818045914.1504-1-pbhagavatula@marvell.com> <20210818065728.1877-1-pbhagavatula@marvell.com> In-Reply-To: <20210818065728.1877-1-pbhagavatula@marvell.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.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-ms-publictraffictype: Email x-ms-office365-filtering-correlation-id: a40a0147-01f4-4727-c3d4-08d962215da2 x-ms-traffictypediagnostic: BYAPR11MB3398: x-ms-exchange-transport-forked: True x-microsoft-antispam-prvs: x-ms-oob-tlc-oobclassifiers: OLM:3173; x-ms-exchange-senderadcheck: 1 x-ms-exchange-antispam-relay: 0 x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: vPatYilE4CrlO7XaGZvI2XyS2nej1T1cTuJ40N1qm1+XGoLV9NpcUEhUPfqSlyPfCEGo1oYcazAz7qsZeEZjS2amCG0oV/xsT1ltJ7HasYhPjI0wGRlLuRuy3zeGev9ENSQqIn/56NNq9P9WEnc+Jcrh7pdam8tPeJ2D++d9jlG81Pi2Po53jwhEP/bDKce3q2WAe4nI6k6sqRhT2RDjM4qdWeuvaknY4VeeiUMikhzIOevuGvHrmZLDNkaStk0fcdrhS6tTAtTz9AbIsD4JJg0T59LrSwRYfGwwDyI4oMFk5n9nEQlXp3sCUwOWHJK/OO/PLNQ4jH4fSvnL+fWgSEd+4lgknGURaXKgXIwZRbi5M4Yk6Li9F7rC5S5yle8DdaspScDkpM2kBeCnXZjcLaljl+MhQaBLhpk7ZWZeRVKY3xAABNXOHC1ohj4uD3cJko4rRX8H+2n6RXL2CT72JfKTVHT0esPlMwJJgfPaEQUfhvmTAA8H/13z61jFQhGu2HF7a18VgJ07R2ncXn13vpR4WNJwA3bqM5b0Rk7bUNFa7BgyiVHLPbHSsILDzacc4GNHZIvcHnV3p/T8lPoJVb7NSZ8mqZWs1yEszIWTaPtnm6is6crQfwUljjdzpXVwgW04e/3SiBbE3r/5BvMI462DMdm6mU9kmoPrdZH+Xvwijc/lNQWLJYrL5mm6kFzPVuEzHceCpya1bBrBePf0Yg== x-forefront-antispam-report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:BYAPR11MB3110.namprd11.prod.outlook.com; PTR:; CAT:NONE; SFS:(4636009)(346002)(366004)(376002)(39860400002)(396003)(136003)(26005)(66946007)(76116006)(2906002)(8676002)(33656002)(38070700005)(6506007)(53546011)(83380400001)(186003)(71200400001)(8936002)(4326008)(5660300002)(9686003)(122000001)(30864003)(66446008)(64756008)(66476007)(6636002)(55016002)(38100700002)(66556008)(478600001)(7696005)(316002)(86362001)(110136005)(52536014)(579004)(559001); DIR:OUT; SFP:1102; x-ms-exchange-antispam-messagedata-chunkcount: 1 x-ms-exchange-antispam-messagedata-0: =?us-ascii?Q?EkxknEYfnUoeburYucCHave2NSKEltRDF9c0Jg4VWDzxI9M4arps3LFPeXSp?= =?us-ascii?Q?vnBqB90PwTgnmgv+op2GAI2PicwX7espApUxM09jODJX03c1ugMXQk0yvUCj?= =?us-ascii?Q?zlQn4eZcA5Dbfe2izkZWvZciOz0E0lprGs68t1wfrZ9xPShuHK5zD32hwQc5?= =?us-ascii?Q?mJP9OUrKdnhafcuSs5jL8O1VwdlhbNyTsnJLCdMPQVvzgU+bS/+m5i5bhXqz?= =?us-ascii?Q?ORzslfvExdrRHcXYQI0i5MXEAycsCDOEyW4TIYmEsd38M95B8EmpyRgFznw0?= =?us-ascii?Q?uD5SQrdlQWWjXuQvhQC7ODVy2iwWw1C08LicliSfDL17ECxIGo1nLFzQ6NFB?= =?us-ascii?Q?DUaqbhY4IdubAJL1xGqHXIgsmq6btZ2AXemXsbYrT74I70pg6/lUFmYsNEIs?= =?us-ascii?Q?DOVnzUZmYD8dAm4ti3ozjEbNvM6lcHzzZHLUmT/zcTsetXM1lEYSVLGCRSPx?= =?us-ascii?Q?WdJ5Q2KVuZKR3ojN08t8Kx1T2l4mRyIxIM8fgogtxsSLyyceSltZGbea8wXx?= =?us-ascii?Q?bOvXbKiKQVI92Sn5y89Tz8W8PMiWER0wbbGkFGqebxRlLQc5mkHzb1QROw01?= =?us-ascii?Q?w4Gt2B6lqm9e5r0wp4CEsq22qcZb7cATDKDuZAX9l4l78OrmAwAGkSyIFy6X?= =?us-ascii?Q?fOVxfIBsQS5kykGYD4c+StGEqQi5yow0qRQ6HhRVcex7XOvuRgks+k5ecj6T?= =?us-ascii?Q?akQAt7vzV9cxY8S5TQOWxe5gnmtP7cSHA/eHCRzgbj/YEc+qETtZc0FmZBY2?= =?us-ascii?Q?j6AdSS35NCRzOa+Rda7zNpxKr3RbeeE9V5TAUmGRD0y0h72h6ekaaJAeDYec?= =?us-ascii?Q?8wF7fx4orFPIFADZz5LzfrMKN3UZPIhKY1Mx8e3HWAztH94e/quFX84oGH6q?= =?us-ascii?Q?IslFNeCyPQjEpbd5S79wmLT6WqfrReSBBIomOosH4Frt+DTRkh5krQI3lQJk?= =?us-ascii?Q?3OKdZTmLgX1dlifmMRGs3GajsBEUb5f75fJTvOfQfZrtsVQWDN1Mc0ypgCTP?= =?us-ascii?Q?DNIhMQfpHkBcXc64O1UKCDIU63sh8PBmhAhaavu4qdjONk9w4nvYL0kDCdl7?= =?us-ascii?Q?IrUhlkNKU1wvoybBpbbEDxVd1SDNLAAz90vdc2SSV2MuSqRTrgdkYn/58nRI?= =?us-ascii?Q?/DfRc7CImHZe4BnAEvW+qwU2PyrqgXe436koR4PRAT51rkc9TZ1/Kc9wvnGR?= =?us-ascii?Q?JrGkt2pIhjLczTnkfyIMe1nNSV/iY2fsCvniZEE8XdVw4wR7Om9B+JOfIWrE?= =?us-ascii?Q?2hB3/y6im5g+9tDADWURSg9nkC6r2vYR6lOh/fJ3kwldHp1Q+NmY8PBzdyH5?= =?us-ascii?Q?M1EeBWOmeYC9gSil8+w4t8+P?= 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: BYAPR11MB3110.namprd11.prod.outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: a40a0147-01f4-4727-c3d4-08d962215da2 X-MS-Exchange-CrossTenant-originalarrivaltime: 18 Aug 2021 08:22:49.2827 (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: 9XPS3lTc7HEfi0GpI+QQU6pqBwVgmrSI/7FIByqFwG5R9+J4g8h543Fuf9PFLWgImtvOUHCfOJhVs6GH1ZygeVqFyBPIKXzs9txdEIZHJ8g= X-MS-Exchange-Transport-CrossTenantHeadersStamped: BYAPR11MB3398 X-OriginatorOrg: intel.com Subject: Re: [dpdk-dev] [PATCH v13] eventdev: simplify Rx adapter event vector config 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" HI Harish, Could you review this patch ? -Jay > -----Original Message----- > From: pbhagavatula@marvell.com > Sent: Wednesday, August 18, 2021 12:27 PM > To: jerinj@marvell.com; Ray Kinsella ; Pavan Nikhilesh ; Shijith Thotton > ; Jayatheerthan, Jay > Cc: dev@dpdk.org > Subject: [dpdk-dev] [PATCH v13] eventdev: simplify Rx adapter event vecto= r config >=20 > From: Pavan Nikhilesh >=20 > Include vector configuration into the structure > ``rte_event_eth_rx_adapter_queue_conf`` that is used to configure > Rx adapter ethernet device Rx queue parameters. > This simplifies event vector configuration as it avoids splitting > configuration per Rx queue. >=20 > Signed-off-by: Pavan Nikhilesh > Acked-by: Jay Jayatheerthan > --- > v13 Changes: > - Fix cnxk driver compilation. > v12 Changes: > - Remove deprication notice. > - Remove unnecessary change Id. >=20 > app/test-eventdev/test_pipeline_common.c | 16 +- > doc/guides/rel_notes/deprecation.rst | 9 -- > drivers/event/cnxk/cn10k_eventdev.c | 77 ---------- > drivers/event/cnxk/cnxk_eventdev_adptr.c | 41 ++++++ > lib/eventdev/eventdev_pmd.h | 29 ---- > lib/eventdev/rte_event_eth_rx_adapter.c | 179 ++++++++--------------- > lib/eventdev/rte_event_eth_rx_adapter.h | 30 ---- > lib/eventdev/version.map | 1 - > 8 files changed, 104 insertions(+), 278 deletions(-) >=20 > diff --git a/app/test-eventdev/test_pipeline_common.c b/app/test-eventdev= /test_pipeline_common.c > index 6ee530d4cd..2697547641 100644 > --- a/app/test-eventdev/test_pipeline_common.c > +++ b/app/test-eventdev/test_pipeline_common.c > @@ -332,7 +332,6 @@ pipeline_event_rx_adapter_setup(struct evt_options *o= pt, uint8_t stride, > uint16_t prod; > struct rte_mempool *vector_pool =3D NULL; > struct rte_event_eth_rx_adapter_queue_conf queue_conf; > - struct rte_event_eth_rx_adapter_event_vector_config vec_conf; >=20 > memset(&queue_conf, 0, > sizeof(struct rte_event_eth_rx_adapter_queue_conf)); > @@ -398,8 +397,12 @@ pipeline_event_rx_adapter_setup(struct evt_options *= opt, uint8_t stride, > } >=20 > if (cap & RTE_EVENT_ETH_RX_ADAPTER_CAP_EVENT_VECTOR) { > + queue_conf.vector_sz =3D opt->vector_size; > + queue_conf.vector_timeout_ns =3D > + opt->vector_tmo_nsec; > queue_conf.rx_queue_flags |=3D > RTE_EVENT_ETH_RX_ADAPTER_QUEUE_EVENT_VECTOR; > + queue_conf.vector_mp =3D vector_pool; > } else { > evt_err("Rx adapter doesn't support event vector"); > return -EINVAL; > @@ -419,17 +422,6 @@ pipeline_event_rx_adapter_setup(struct evt_options *= opt, uint8_t stride, > return ret; > } >=20 > - if (opt->ena_vector) { > - vec_conf.vector_sz =3D opt->vector_size; > - vec_conf.vector_timeout_ns =3D opt->vector_tmo_nsec; > - vec_conf.vector_mp =3D vector_pool; > - if (rte_event_eth_rx_adapter_queue_event_vector_config( > - prod, prod, -1, &vec_conf) < 0) { > - evt_err("Failed to configure event vectorization for Rx adapter"); > - return -EINVAL; > - } > - } > - > if (!(cap & RTE_EVENT_ETH_RX_ADAPTER_CAP_INTERNAL_PORT)) { > uint32_t service_id =3D -1U; >=20 > diff --git a/doc/guides/rel_notes/deprecation.rst b/doc/guides/rel_notes/= deprecation.rst > index 76a4abfd6b..2c37d7222c 100644 > --- a/doc/guides/rel_notes/deprecation.rst > +++ b/doc/guides/rel_notes/deprecation.rst > @@ -257,15 +257,6 @@ Deprecation Notices > An 8-byte reserved field will be added to the structure ``rte_event_ti= mer`` to > support future extensions. >=20 > -* eventdev: The structure ``rte_event_eth_rx_adapter_queue_conf`` will b= e > - extended to include ``rte_event_eth_rx_adapter_event_vector_config`` e= lements > - and the function ``rte_event_eth_rx_adapter_queue_event_vector_config`= ` will > - be removed in DPDK 21.11. > - > - An application can enable event vectorization by passing the desired v= ector > - values to the function ``rte_event_eth_rx_adapter_queue_add`` using > - the structure ``rte_event_eth_rx_adapter_queue_add``. > - > * eventdev: Reserved bytes of ``rte_event_crypto_request`` is a space ho= lder > for ``response_info``. Both should be decoupled for better clarity. > New space for ``response_info`` can be made by changing > diff --git a/drivers/event/cnxk/cn10k_eventdev.c b/drivers/event/cnxk/cn1= 0k_eventdev.c > index 6f37c5bd23..160192bb27 100644 > --- a/drivers/event/cnxk/cn10k_eventdev.c > +++ b/drivers/event/cnxk/cn10k_eventdev.c > @@ -696,81 +696,6 @@ cn10k_sso_rx_adapter_vector_limits( > return 0; > } >=20 > -static int > -cnxk_sso_rx_adapter_vwqe_enable(struct cnxk_eth_dev *cnxk_eth_dev, > - uint16_t port_id, uint16_t rq_id, uint16_t sz, > - uint64_t tmo_ns, struct rte_mempool *vmp) > -{ > - struct roc_nix_rq *rq; > - > - rq =3D &cnxk_eth_dev->rqs[rq_id]; > - > - if (!rq->sso_ena) > - return -EINVAL; > - if (rq->flow_tag_width =3D=3D 0) > - return -EINVAL; > - > - rq->vwqe_ena =3D 1; > - rq->vwqe_first_skip =3D 0; > - rq->vwqe_aura_handle =3D roc_npa_aura_handle_to_aura(vmp->pool_id); > - rq->vwqe_max_sz_exp =3D rte_log2_u32(sz); > - rq->vwqe_wait_tmo =3D > - tmo_ns / > - ((roc_nix_get_vwqe_interval(&cnxk_eth_dev->nix) + 1) * 100); > - rq->tag_mask =3D (port_id & 0xF) << 20; > - rq->tag_mask |=3D > - (((port_id >> 4) & 0xF) | (RTE_EVENT_TYPE_ETHDEV_VECTOR << 4)) > - << 24; > - > - return roc_nix_rq_modify(&cnxk_eth_dev->nix, rq, 0); > -} > - > -static int > -cn10k_sso_rx_adapter_vector_config( > - const struct rte_eventdev *event_dev, const struct rte_eth_dev *eth_dev= , > - int32_t rx_queue_id, > - const struct rte_event_eth_rx_adapter_event_vector_config *config) > -{ > - struct cnxk_eth_dev *cnxk_eth_dev; > - struct cnxk_sso_evdev *dev; > - int i, rc; > - > - rc =3D strncmp(eth_dev->device->driver->name, "net_cn10k", 8); > - if (rc) > - return -EINVAL; > - > - dev =3D cnxk_sso_pmd_priv(event_dev); > - cnxk_eth_dev =3D cnxk_eth_pmd_priv(eth_dev); > - if (rx_queue_id < 0) { > - for (i =3D 0; i < eth_dev->data->nb_rx_queues; i++) { > - cnxk_sso_updt_xae_cnt(dev, config->vector_mp, > - RTE_EVENT_TYPE_ETHDEV_VECTOR); > - rc =3D cnxk_sso_xae_reconfigure( > - (struct rte_eventdev *)(uintptr_t)event_dev); > - rc =3D cnxk_sso_rx_adapter_vwqe_enable( > - cnxk_eth_dev, eth_dev->data->port_id, i, > - config->vector_sz, config->vector_timeout_ns, > - config->vector_mp); > - if (rc) > - return -EINVAL; > - } > - } else { > - > - cnxk_sso_updt_xae_cnt(dev, config->vector_mp, > - RTE_EVENT_TYPE_ETHDEV_VECTOR); > - rc =3D cnxk_sso_xae_reconfigure( > - (struct rte_eventdev *)(uintptr_t)event_dev); > - rc =3D cnxk_sso_rx_adapter_vwqe_enable( > - cnxk_eth_dev, eth_dev->data->port_id, rx_queue_id, > - config->vector_sz, config->vector_timeout_ns, > - config->vector_mp); > - if (rc) > - return -EINVAL; > - } > - > - return 0; > -} > - > static int > cn10k_sso_tx_adapter_caps_get(const struct rte_eventdev *dev, > const struct rte_eth_dev *eth_dev, uint32_t *caps) > @@ -841,8 +766,6 @@ static struct rte_eventdev_ops cn10k_sso_dev_ops =3D = { > .eth_rx_adapter_stop =3D cnxk_sso_rx_adapter_stop, >=20 > .eth_rx_adapter_vector_limits_get =3D cn10k_sso_rx_adapter_vector_limit= s, > - .eth_rx_adapter_event_vector_config =3D > - cn10k_sso_rx_adapter_vector_config, >=20 > .eth_tx_adapter_caps_get =3D cn10k_sso_tx_adapter_caps_get, > .eth_tx_adapter_queue_add =3D cn10k_sso_tx_adapter_queue_add, > diff --git a/drivers/event/cnxk/cnxk_eventdev_adptr.c b/drivers/event/cnx= k/cnxk_eventdev_adptr.c > index baf2f2aa6b..80f5602286 100644 > --- a/drivers/event/cnxk/cnxk_eventdev_adptr.c > +++ b/drivers/event/cnxk/cnxk_eventdev_adptr.c > @@ -156,6 +156,35 @@ cnxk_sso_rxq_disable(struct cnxk_eth_dev *cnxk_eth_d= ev, uint16_t rq_id) > return roc_nix_rq_modify(&cnxk_eth_dev->nix, rq, 0); > } >=20 > +static int > +cnxk_sso_rx_adapter_vwqe_enable(struct cnxk_eth_dev *cnxk_eth_dev, > + uint16_t port_id, uint16_t rq_id, uint16_t sz, > + uint64_t tmo_ns, struct rte_mempool *vmp) > +{ > + struct roc_nix_rq *rq; > + > + rq =3D &cnxk_eth_dev->rqs[rq_id]; > + > + if (!rq->sso_ena) > + return -EINVAL; > + if (rq->flow_tag_width =3D=3D 0) > + return -EINVAL; > + > + rq->vwqe_ena =3D 1; > + rq->vwqe_first_skip =3D 0; > + rq->vwqe_aura_handle =3D roc_npa_aura_handle_to_aura(vmp->pool_id); > + rq->vwqe_max_sz_exp =3D rte_log2_u32(sz); > + rq->vwqe_wait_tmo =3D > + tmo_ns / > + ((roc_nix_get_vwqe_interval(&cnxk_eth_dev->nix) + 1) * 100); > + rq->tag_mask =3D (port_id & 0xF) << 20; > + rq->tag_mask |=3D > + (((port_id >> 4) & 0xF) | (RTE_EVENT_TYPE_ETHDEV_VECTOR << 4)) > + << 24; > + > + return roc_nix_rq_modify(&cnxk_eth_dev->nix, rq, 0); > +} > + > int > cnxk_sso_rx_adapter_queue_add( > const struct rte_eventdev *event_dev, const struct rte_eth_dev *eth_dev= , > @@ -183,6 +212,18 @@ cnxk_sso_rx_adapter_queue_add( > &queue_conf->ev, > !!(queue_conf->rx_queue_flags & > RTE_EVENT_ETH_RX_ADAPTER_CAP_OVERRIDE_FLOW_ID)); > + if (queue_conf->rx_queue_flags & > + RTE_EVENT_ETH_RX_ADAPTER_QUEUE_EVENT_VECTOR) { > + cnxk_sso_updt_xae_cnt(dev, queue_conf->vector_mp, > + RTE_EVENT_TYPE_ETHDEV_VECTOR); > + rc |=3D cnxk_sso_xae_reconfigure( > + (struct rte_eventdev *)(uintptr_t)event_dev); > + rc |=3D cnxk_sso_rx_adapter_vwqe_enable( > + cnxk_eth_dev, port, rx_queue_id, > + queue_conf->vector_sz, > + queue_conf->vector_timeout_ns, > + queue_conf->vector_mp); > + } > rox_nix_fc_npa_bp_cfg(&cnxk_eth_dev->nix, > rxq_sp->qconf.mp->pool_id, true, > dev->force_ena_bp); > diff --git a/lib/eventdev/eventdev_pmd.h b/lib/eventdev/eventdev_pmd.h > index 0f724ac85d..63b3bc4b51 100644 > --- a/lib/eventdev/eventdev_pmd.h > +++ b/lib/eventdev/eventdev_pmd.h > @@ -667,32 +667,6 @@ typedef int (*eventdev_eth_rx_adapter_vector_limits_= get_t)( > const struct rte_eventdev *dev, const struct rte_eth_dev *eth_dev, > struct rte_event_eth_rx_adapter_vector_limits *limits); >=20 > -struct rte_event_eth_rx_adapter_event_vector_config; > -/** > - * Enable event vector on an given Rx queue of a ethernet devices belong= ing to > - * the Rx adapter. > - * > - * @param dev > - * Event device pointer > - * > - * @param eth_dev > - * Ethernet device pointer > - * > - * @param rx_queue_id > - * The Rx queue identifier > - * > - * @param config > - * Pointer to the event vector configuration structure. > - * > - * @return > - * - 0: Success. > - * - <0: Error code returned by the driver function. > - */ > -typedef int (*eventdev_eth_rx_adapter_event_vector_config_t)( > - const struct rte_eventdev *dev, const struct rte_eth_dev *eth_dev, > - int32_t rx_queue_id, > - const struct rte_event_eth_rx_adapter_event_vector_config *config); > - > typedef uint32_t rte_event_pmd_selftest_seqn_t; > extern int rte_event_pmd_selftest_seqn_dynfield_offset; >=20 > @@ -1118,9 +1092,6 @@ struct rte_eventdev_ops { > eventdev_eth_rx_adapter_vector_limits_get_t > eth_rx_adapter_vector_limits_get; > /**< Get event vector limits for the Rx adapter */ > - eventdev_eth_rx_adapter_event_vector_config_t > - eth_rx_adapter_event_vector_config; > - /**< Configure Rx adapter with event vector */ >=20 > eventdev_timer_adapter_caps_get_t timer_adapter_caps_get; > /**< Get timer adapter capabilities */ > diff --git a/lib/eventdev/rte_event_eth_rx_adapter.c b/lib/eventdev/rte_e= vent_eth_rx_adapter.c > index 13dfb28401..2b2dd688fc 100644 > --- a/lib/eventdev/rte_event_eth_rx_adapter.c > +++ b/lib/eventdev/rte_event_eth_rx_adapter.c > @@ -1895,6 +1895,24 @@ rxa_add_queue(struct rte_event_eth_rx_adapter *rx_= adapter, > } else > qi_ev->flow_id =3D 0; >=20 > + if (conf->rx_queue_flags & > + RTE_EVENT_ETH_RX_ADAPTER_QUEUE_EVENT_VECTOR) { > + queue_info->ena_vector =3D 1; > + qi_ev->event_type =3D RTE_EVENT_TYPE_ETH_RX_ADAPTER_VECTOR; > + rxa_set_vector_data(queue_info, conf->vector_sz, > + conf->vector_timeout_ns, conf->vector_mp, > + rx_queue_id, dev_info->dev->data->port_id); > + rx_adapter->ena_vector =3D 1; > + rx_adapter->vector_tmo_ticks =3D > + rx_adapter->vector_tmo_ticks ? > + RTE_MIN(queue_info->vector_data > + .vector_timeout_ticks >> > + 1, > + rx_adapter->vector_tmo_ticks) : > + queue_info->vector_data.vector_timeout_ticks >> > + 1; > + } > + > rxa_update_queue(rx_adapter, dev_info, rx_queue_id, 1); > if (rxa_polled_queue(dev_info, rx_queue_id)) { > rx_adapter->num_rx_polled +=3D !pollq; > @@ -1920,42 +1938,6 @@ rxa_add_queue(struct rte_event_eth_rx_adapter *rx_= adapter, > } > } >=20 > -static void > -rxa_sw_event_vector_configure( > - struct rte_event_eth_rx_adapter *rx_adapter, uint16_t eth_dev_id, > - int rx_queue_id, > - const struct rte_event_eth_rx_adapter_event_vector_config *config) > -{ > - struct eth_device_info *dev_info =3D &rx_adapter->eth_devices[eth_dev_i= d]; > - struct eth_rx_queue_info *queue_info; > - struct rte_event *qi_ev; > - > - if (rx_queue_id =3D=3D -1) { > - uint16_t nb_rx_queues; > - uint16_t i; > - > - nb_rx_queues =3D dev_info->dev->data->nb_rx_queues; > - for (i =3D 0; i < nb_rx_queues; i++) > - rxa_sw_event_vector_configure(rx_adapter, eth_dev_id, i, > - config); > - return; > - } > - > - queue_info =3D &dev_info->rx_queue[rx_queue_id]; > - qi_ev =3D (struct rte_event *)&queue_info->event; > - queue_info->ena_vector =3D 1; > - qi_ev->event_type =3D RTE_EVENT_TYPE_ETH_RX_ADAPTER_VECTOR; > - rxa_set_vector_data(queue_info, config->vector_sz, > - config->vector_timeout_ns, config->vector_mp, > - rx_queue_id, dev_info->dev->data->port_id); > - rx_adapter->ena_vector =3D 1; > - rx_adapter->vector_tmo_ticks =3D > - rx_adapter->vector_tmo_ticks ? > - RTE_MIN(config->vector_timeout_ns >> 1, > - rx_adapter->vector_tmo_ticks) : > - config->vector_timeout_ns >> 1; > -} > - > static int rxa_sw_add(struct rte_event_eth_rx_adapter *rx_adapter, > uint16_t eth_dev_id, > int rx_queue_id, > @@ -2270,6 +2252,7 @@ rte_event_eth_rx_adapter_queue_add(uint8_t id, > struct rte_event_eth_rx_adapter *rx_adapter; > struct rte_eventdev *dev; > struct eth_device_info *dev_info; > + struct rte_event_eth_rx_adapter_vector_limits limits; >=20 > RTE_EVENT_ETH_RX_ADAPTER_ID_VALID_OR_ERR_RET(id, -EINVAL); > RTE_ETH_VALID_PORTID_OR_ERR_RET(eth_dev_id, -EINVAL); > @@ -2297,13 +2280,46 @@ rte_event_eth_rx_adapter_queue_add(uint8_t id, > return -EINVAL; > } >=20 > - if ((cap & RTE_EVENT_ETH_RX_ADAPTER_CAP_EVENT_VECTOR) =3D=3D 0 && > - (queue_conf->rx_queue_flags & > - RTE_EVENT_ETH_RX_ADAPTER_QUEUE_EVENT_VECTOR)) { > - RTE_EDEV_LOG_ERR("Event vectorization is not supported," > - " eth port: %" PRIu16 " adapter id: %" PRIu8, > - eth_dev_id, id); > - return -EINVAL; > + if (queue_conf->rx_queue_flags & > + RTE_EVENT_ETH_RX_ADAPTER_QUEUE_EVENT_VECTOR) { > + > + if ((cap & RTE_EVENT_ETH_RX_ADAPTER_CAP_EVENT_VECTOR) =3D=3D 0) { > + RTE_EDEV_LOG_ERR("Event vectorization is not supported," > + " eth port: %" PRIu16 > + " adapter id: %" PRIu8, > + eth_dev_id, id); > + return -EINVAL; > + } > + > + ret =3D rte_event_eth_rx_adapter_vector_limits_get( > + rx_adapter->eventdev_id, eth_dev_id, &limits); > + if (ret < 0) { > + RTE_EDEV_LOG_ERR("Failed to get event device vector limits," > + " eth port: %" PRIu16 > + " adapter id: %" PRIu8, > + eth_dev_id, id); > + return -EINVAL; > + } > + if (queue_conf->vector_sz < limits.min_sz || > + queue_conf->vector_sz > limits.max_sz || > + queue_conf->vector_timeout_ns < limits.min_timeout_ns || > + queue_conf->vector_timeout_ns > limits.max_timeout_ns || > + queue_conf->vector_mp =3D=3D NULL) { > + RTE_EDEV_LOG_ERR("Invalid event vector configuration," > + " eth port: %" PRIu16 > + " adapter id: %" PRIu8, > + eth_dev_id, id); > + return -EINVAL; > + } > + if (queue_conf->vector_mp->elt_size < > + (sizeof(struct rte_event_vector) + > + (sizeof(uintptr_t) * queue_conf->vector_sz))) { > + RTE_EDEV_LOG_ERR("Invalid event vector configuration," > + " eth port: %" PRIu16 > + " adapter id: %" PRIu8, > + eth_dev_id, id); > + return -EINVAL; > + } > } >=20 > if ((cap & RTE_EVENT_ETH_RX_ADAPTER_CAP_MULTI_EVENTQ) =3D=3D 0 && > @@ -2499,83 +2515,6 @@ rte_event_eth_rx_adapter_queue_del(uint8_t id, uin= t16_t eth_dev_id, > return ret; > } >=20 > -int > -rte_event_eth_rx_adapter_queue_event_vector_config( > - uint8_t id, uint16_t eth_dev_id, int32_t rx_queue_id, > - struct rte_event_eth_rx_adapter_event_vector_config *config) > -{ > - struct rte_event_eth_rx_adapter_vector_limits limits; > - struct rte_event_eth_rx_adapter *rx_adapter; > - struct rte_eventdev *dev; > - uint32_t cap; > - int ret; > - > - RTE_EVENT_ETH_RX_ADAPTER_ID_VALID_OR_ERR_RET(id, -EINVAL); > - RTE_ETH_VALID_PORTID_OR_ERR_RET(eth_dev_id, -EINVAL); > - > - rx_adapter =3D rxa_id_to_adapter(id); > - if ((rx_adapter =3D=3D NULL) || (config =3D=3D NULL)) > - return -EINVAL; > - > - dev =3D &rte_eventdevs[rx_adapter->eventdev_id]; > - ret =3D rte_event_eth_rx_adapter_caps_get(rx_adapter->eventdev_id, > - eth_dev_id, &cap); > - if (ret) { > - RTE_EDEV_LOG_ERR("Failed to get adapter caps edev %" PRIu8 > - "eth port %" PRIu16, > - id, eth_dev_id); > - return ret; > - } > - > - if (!(cap & RTE_EVENT_ETH_RX_ADAPTER_CAP_EVENT_VECTOR)) { > - RTE_EDEV_LOG_ERR("Event vectorization is not supported," > - " eth port: %" PRIu16 " adapter id: %" PRIu8, > - eth_dev_id, id); > - return -EINVAL; > - } > - > - ret =3D rte_event_eth_rx_adapter_vector_limits_get( > - rx_adapter->eventdev_id, eth_dev_id, &limits); > - if (ret) { > - RTE_EDEV_LOG_ERR("Failed to get vector limits edev %" PRIu8 > - "eth port %" PRIu16, > - rx_adapter->eventdev_id, eth_dev_id); > - return ret; > - } > - > - if (config->vector_sz < limits.min_sz || > - config->vector_sz > limits.max_sz || > - config->vector_timeout_ns < limits.min_timeout_ns || > - config->vector_timeout_ns > limits.max_timeout_ns || > - config->vector_mp =3D=3D NULL) { > - RTE_EDEV_LOG_ERR("Invalid event vector configuration," > - " eth port: %" PRIu16 " adapter id: %" PRIu8, > - eth_dev_id, id); > - return -EINVAL; > - } > - if (config->vector_mp->elt_size < > - (sizeof(struct rte_event_vector) + > - (sizeof(uintptr_t) * config->vector_sz))) { > - RTE_EDEV_LOG_ERR("Invalid event vector configuration," > - " eth port: %" PRIu16 " adapter id: %" PRIu8, > - eth_dev_id, id); > - return -EINVAL; > - } > - > - if (cap & RTE_EVENT_ETH_RX_ADAPTER_CAP_INTERNAL_PORT) { > - RTE_FUNC_PTR_OR_ERR_RET( > - *dev->dev_ops->eth_rx_adapter_event_vector_config, > - -ENOTSUP); > - ret =3D dev->dev_ops->eth_rx_adapter_event_vector_config( > - dev, &rte_eth_devices[eth_dev_id], rx_queue_id, config); > - } else { > - rxa_sw_event_vector_configure(rx_adapter, eth_dev_id, > - rx_queue_id, config); > - } > - > - return ret; > -} > - > int > rte_event_eth_rx_adapter_vector_limits_get( > uint8_t dev_id, uint16_t eth_port_id, > diff --git a/lib/eventdev/rte_event_eth_rx_adapter.h b/lib/eventdev/rte_e= vent_eth_rx_adapter.h > index 182dd2e5dd..3f8b362295 100644 > --- a/lib/eventdev/rte_event_eth_rx_adapter.h > +++ b/lib/eventdev/rte_event_eth_rx_adapter.h > @@ -171,9 +171,6 @@ struct rte_event_eth_rx_adapter_queue_conf { > * The event adapter sets ev.event_type to RTE_EVENT_TYPE_ETHDEV in the > * enqueued event. > */ > -}; > - > -struct rte_event_eth_rx_adapter_event_vector_config { > uint16_t vector_sz; > /**< > * Indicates the maximum number for mbufs to combine and form a vector. > @@ -548,33 +545,6 @@ int rte_event_eth_rx_adapter_vector_limits_get( > uint8_t dev_id, uint16_t eth_port_id, > struct rte_event_eth_rx_adapter_vector_limits *limits); >=20 > -/** > - * Configure event vectorization for a given ethernet device queue, that= has > - * been added to a event eth Rx adapter. > - * > - * @param id > - * The identifier of the ethernet Rx event adapter. > - * > - * @param eth_dev_id > - * The identifier of the ethernet device. > - * > - * @param rx_queue_id > - * Ethernet device receive queue index. > - * If rx_queue_id is -1, then all Rx queues configured for the ethernet= device > - * are configured with event vectorization. > - * > - * @param config > - * Event vector configuration structure. > - * > - * @return > - * - 0: Success, Receive queue configured correctly. > - * - <0: Error code on failure. > - */ > -__rte_experimental > -int rte_event_eth_rx_adapter_queue_event_vector_config( > - uint8_t id, uint16_t eth_dev_id, int32_t rx_queue_id, > - struct rte_event_eth_rx_adapter_event_vector_config *config); > - > #ifdef __cplusplus > } > #endif > diff --git a/lib/eventdev/version.map b/lib/eventdev/version.map > index 88625621ec..cd86d2d908 100644 > --- a/lib/eventdev/version.map > +++ b/lib/eventdev/version.map > @@ -142,7 +142,6 @@ EXPERIMENTAL { > #added in 21.05 > rte_event_vector_pool_create; > rte_event_eth_rx_adapter_vector_limits_get; > - rte_event_eth_rx_adapter_queue_event_vector_config; > __rte_eventdev_trace_crypto_adapter_enqueue; > }; >=20 > -- > 2.17.1