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 F2EA5A034F; Mon, 30 Aug 2021 16:41:46 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id B9992410FC; Mon, 30 Aug 2021 16:41:46 +0200 (CEST) Received: from mga14.intel.com (mga14.intel.com [192.55.52.115]) by mails.dpdk.org (Postfix) with ESMTP id 78C68410F3 for ; Mon, 30 Aug 2021 16:41:45 +0200 (CEST) X-IronPort-AV: E=McAfee;i="6200,9189,10092"; a="218003163" X-IronPort-AV: E=Sophos;i="5.84,363,1620716400"; d="scan'208";a="218003163" Received: from fmsmga002.fm.intel.com ([10.253.24.26]) by fmsmga103.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 30 Aug 2021 07:41:34 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.84,363,1620716400"; d="scan'208";a="540488951" Received: from orsmsx606.amr.corp.intel.com ([10.22.229.19]) by fmsmga002.fm.intel.com with ESMTP; 30 Aug 2021 07:41:33 -0700 Received: from orsmsx602.amr.corp.intel.com (10.22.229.15) by ORSMSX606.amr.corp.intel.com (10.22.229.19) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2242.10; Mon, 30 Aug 2021 07:41:32 -0700 Received: from ORSEDG601.ED.cps.intel.com (10.7.248.6) by orsmsx602.amr.corp.intel.com (10.22.229.15) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2242.10 via Frontend Transport; Mon, 30 Aug 2021 07:41:32 -0700 Received: from NAM10-BN7-obe.outbound.protection.outlook.com (104.47.70.102) 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.2242.10; Mon, 30 Aug 2021 07:41:32 -0700 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=dKjVU8ueBx3EvnwhczRWfKU4D4AKydOFUtwwpIGaHGaLuwzRM9JcJVYvQrkYTxGW7fBtoRDwGSbA7vnxVYjTrmrHGsKoua5WkbnglBmOrMS9KITKt8hTzb60CjkL1tGUWtJig1tVObgGdEJmIJfxFnZBszpdGwcSOTn7I8Sdmaomt7nJmuSLdyDaeusB9vpkkKu/8Lb6bx03mNZTrQQiSZRAHF7iQB63cf1J8fDOC+MRrmmKx3UtclVs/FAtJvpJtHWfLQ12nspy270KLPxpCw60LafKy+s41nsz6pjN0WMLGVZaUwAwKaVgUKdiNr+XbuxHkQM750V3IZ/+iZg/nQ== 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=7GRQn5H/jSVquDyNAhTRRwP5DqJiFWBJOMXXEYstq60=; b=oVrWt+H/AnLnCjIWd3uW/LM2DXiSMf4u0ZRElzaFYq80Qv/k9fM+CzzGxlsScHwqfl7KhMwyYit5D0XfiUiAY1UByalD4wsCOZJ4vIaNeM/20b4iuVq4h2IM9Dq++riCJVUbhucHt74NZPp8hDWfivQhoWgsjFxpb6uCvGftx69KEgiHXQ22rWzBYPyH3HSMdkUQAqF4YUkCjG27O0LDQeMys4xXmEih+qx2OlQjV3pBQKFXEb4QtErvZ6mRYZoHAsNFEi++TdiA9F6fEp0HmsexBqyV8fP+Yrf0uVQdN/L2QTrvBTTWXoWtiN2nY/CdcXv1Mph9W+KuHwin++S4qQ== 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=7GRQn5H/jSVquDyNAhTRRwP5DqJiFWBJOMXXEYstq60=; b=JBkGYorZcNRDSLI5EMGbwz9NZn7Yhr0dxY00fTYnMZYx9kelUGSl3rD27bJoYYvxqb4ylAV5+z5FSYLlApxw4eSEM3K2khLw3N8UalGhKAFlp/42zTELpMiRwtwVx+aodN5KWtrekVcTnG80PDKhNwJCK4edVOMEzdbt49/fnaQ= Received: from SN6PR11MB3117.namprd11.prod.outlook.com (2603:10b6:805:d7::32) by SA2PR11MB4876.namprd11.prod.outlook.com (2603:10b6:806:119::13) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4457.20; Mon, 30 Aug 2021 14:41:31 +0000 Received: from SN6PR11MB3117.namprd11.prod.outlook.com ([fe80::a140:8726:8fcb:6809]) by SN6PR11MB3117.namprd11.prod.outlook.com ([fe80::a140:8726:8fcb:6809%7]) with mapi id 15.20.4457.024; Mon, 30 Aug 2021 14:41:31 +0000 From: "Jayatheerthan, Jay" To: "pbhagavatula@marvell.com" , "jerinj@marvell.com" , "Gujjar, Abhinandan S" CC: "Ananyev, Konstantin" , "dev@dpdk.org" Thread-Topic: [dpdk-dev] [RFC 06/15] eventdev: use new API for inline functions Thread-Index: AQHXmFbLXZ6e+P+JR0Ci5/UdRBe7UKuMKPeA Date: Mon, 30 Aug 2021 14:41:30 +0000 Message-ID: References: <20210823194020.1229-1-pbhagavatula@marvell.com> <20210823194020.1229-6-pbhagavatula@marvell.com> In-Reply-To: <20210823194020.1229-6-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: 3504844e-2876-4ca3-17dc-08d96bc441c4 x-ms-traffictypediagnostic: SA2PR11MB4876: x-ms-exchange-transport-forked: True x-microsoft-antispam-prvs: x-ms-oob-tlc-oobclassifiers: OLM:1186; x-ms-exchange-senderadcheck: 1 x-ms-exchange-antispam-relay: 0 x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: Tqj6qO7EtzJ6z5fjkZ0qw1yo9OME6GDrwN5Eo4Z/faUtBpg9iqOeI+6DiCmkOMs1TbH5J7h7lvRGi8AGV2vVqFLeOQBGDxanP1twe5om9fo6Aa3D230bNRMgr0MCXyIvBZRtWJFkW2Hn70Ve2G6nVtRDh7QJDU7Pg8aOnwwnlz6wawNw7HeGj799Zd0kcaCo1IR28PWGQfaoZ9NdebZfYlEBsKosS2IAiF6R8b6iqbLcS0OENdTt3VUhbKGicwQ+ErIx7pXXZsJrb1wziUP3SM6GYwjDCQNUhFAlC1VLPfmeIP1SmIcJN2t47QhD6of628XYv4mfDd7gm+ttzLgdUR6rdPUJD9VGJbEQszdORNakdPFuOFJ8NZeD9x5fkbS7ULEyA9uUZClFHMDFsadWbcHO6cgO68nAPPge+ybWZPA+Fk3vubBDDEgGkRrJP69ZF796HLkLAVqso/RfCpmc9a3nJ9NacPjcq18PIsex7lzN7NdNbwn/8OgKc85o2gYebB9PVC137BEvXqZBqXP95tBz5mBqGhgWDVE4mzb2bOGIItDwlzKY7I29msUS6Yob+rlknh9PQyIn2B+40P3JAU/qbRqIgTw4JjA+aR/6M+EmbULz8oMuCN8dbU4aNlxPkBfWG5ahvfNdMeMLZlXpSlVXhN+3wCoskrKsVsByqULZR28u0vOq5LjCagvQ1E2xYucFIaQu5IAhpW0e0T5twQ== x-forefront-antispam-report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:SN6PR11MB3117.namprd11.prod.outlook.com; PTR:; CAT:NONE; SFS:(4636009)(346002)(39860400002)(396003)(376002)(366004)(136003)(66946007)(76116006)(66446008)(7696005)(64756008)(71200400001)(66556008)(2906002)(4326008)(8676002)(186003)(83380400001)(8936002)(53546011)(26005)(6506007)(86362001)(33656002)(478600001)(5660300002)(55016002)(122000001)(9686003)(38100700002)(55236004)(6636002)(316002)(110136005)(54906003)(52536014)(66476007)(38070700005); DIR:OUT; SFP:1102; x-ms-exchange-antispam-messagedata-chunkcount: 1 x-ms-exchange-antispam-messagedata-0: =?us-ascii?Q?NTXEhnw08x7pwMNqoFZCF+9sfuJzBbEfJvwhPB8bUf88fgyNzMsg92D+ptu7?= =?us-ascii?Q?ie/wAMT6J2pM/bt8MDTl3YrDxCbR8el9UOm2XAIpeSaCDV4F80ZejWkd95wn?= =?us-ascii?Q?pRCgLGdh7GmL7zPvzX/zGwP+BfVhzoDdefYabEf6TAtbyYRfLSG8FdzIzIhk?= =?us-ascii?Q?tVZB+oqw4/R05CClE7a9fomOJ1TshTS5rMpxhiwSL0knt52rHqdIl/sUDkrH?= =?us-ascii?Q?iGMTiO+9K/Ikvh6W7mgJem4VMapiuiORfLRvBsi5DnU9ehSNbJIpxqW+4zRB?= =?us-ascii?Q?+uNyInH4Lt4ZePpCihEXG9QGUIfiBKGCdn43tIaib2IrXFo/SvAqwSqBCCxg?= =?us-ascii?Q?BRM42YsEsYF9BQx5tBERyBLU53KikNqWfqrqYTQuEL07H3MJ91Jp8CbJBW3t?= =?us-ascii?Q?Gyv6hBheNePu3jTQe4IcUIlXg7iHI9P6gyWL+A+nPZvEb5uVtyisJ446rVwg?= =?us-ascii?Q?9jy8eLtQR5C8QcI87AniDavvZMto6DtDlz++eRSa+8YFafWpBIaAzzbjVz2S?= =?us-ascii?Q?F/XYrIMtaWn+jf5iQX5ehaKD2nlFaDw1IOgZcZh8JHIxiTiV2rKUX/dOeWKW?= =?us-ascii?Q?HbRfFm5zfelKE9OxnQJ6AvTdr7DkLYtfzU48Cs0naQKdpBly0gBehYBcn3NE?= =?us-ascii?Q?cqOUNNd7E3qYN0NAD0sHbtFYWLSODYaxxKuhk6N5/WhBNmkQwMgKruQmgArm?= =?us-ascii?Q?fPschsbyyVuncXdpRqxlyDqdDWX5KwZI5ooRKaS+JvBB5Tdv4Y6RYLm73U74?= =?us-ascii?Q?/yrnuxIfRinVmCxP8ofvJh2cA3E1rR15UMaY8h7QvuDNxC39wEMy8o7hQ/Vo?= =?us-ascii?Q?ZhQIVnRUF/6OBLXLZQH3L7TKnJPhh29rRLxjVEjshfS0k1zF3eaBQjTOo9tH?= =?us-ascii?Q?o4uoSYSxQjzdWi0ImkzBsYcCGd5adkcHZMDNnDHm48L7Ls9AYdg4IgPxC4oH?= =?us-ascii?Q?JCekUxRDWJbW2U4O26J5XpkPbTrIGce3C8GWf0prVvTRQDGQSWpGEAt6Jnve?= =?us-ascii?Q?BtnniOqe7jkipPdfcn+jakDhNPhzC/vviArkaeoHPyAP5H2AtSZbqLnqqN/o?= =?us-ascii?Q?Fe/zBLRlr806jE2tLWugBkF48WBk/Wdr0Tm4D67SPNWALgByDLl5thKID8Sm?= =?us-ascii?Q?AoALY8zogLpjZgx4KBv2nOq3lM7OYyfOmqaO0wfH4itjRaJkQi1UIqkb1Kr5?= =?us-ascii?Q?2JOoNnAFRYamosR8ALigjVeL5qX6FUmU9uU6gP/b2bs6oEV8TXb8kZ25/Ts1?= =?us-ascii?Q?e/ZNubskRfguVOzBfPt+bnSzpBelnvx2f3lUgfiPdhx56/Bph+M7+5Ly8K9N?= =?us-ascii?Q?bCnWZWgAum91cEeKw/Ca9Ap2?= 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: SN6PR11MB3117.namprd11.prod.outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: 3504844e-2876-4ca3-17dc-08d96bc441c4 X-MS-Exchange-CrossTenant-originalarrivaltime: 30 Aug 2021 14:41:31.0084 (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: 8vdeqFg5wmfikW7nzeNi7i03ncadKHuBfcriJCaeUi5WBYKFtedBkTD4Q2EzSP82nKAxr0BbaKuR4FIzOpoBO7GiRjx4MSVCK/5VeDCicX4= X-MS-Exchange-Transport-CrossTenantHeadersStamped: SA2PR11MB4876 X-OriginatorOrg: intel.com Subject: Re: [dpdk-dev] [RFC 06/15] eventdev: use new API for inline functions 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: pbhagavatula@marvell.com > Sent: Tuesday, August 24, 2021 1:10 AM > To: jerinj@marvell.com; Gujjar, Abhinandan S ; Jayatheerthan, Jay > Cc: Ananyev, Konstantin ; dev@dpdk.org; Pav= an Nikhilesh > Subject: [dpdk-dev] [RFC 06/15] eventdev: use new API for inline function= s >=20 > From: Pavan Nikhilesh >=20 > Use new driver interface for the fastpath enqueue/dequeue inline > functions. >=20 > Signed-off-by: Pavan Nikhilesh > --- > lib/eventdev/rte_event_crypto_adapter.h | 13 +----- > lib/eventdev/rte_event_eth_tx_adapter.h | 22 ++------- > lib/eventdev/rte_eventdev.h | 61 +++++++------------------ > 3 files changed, 22 insertions(+), 74 deletions(-) >=20 > diff --git a/lib/eventdev/rte_event_crypto_adapter.h b/lib/eventdev/rte_e= vent_crypto_adapter.h > index 431d05b6ed..a91585a369 100644 > --- a/lib/eventdev/rte_event_crypto_adapter.h > +++ b/lib/eventdev/rte_event_crypto_adapter.h > @@ -568,20 +568,11 @@ rte_event_crypto_adapter_enqueue(uint8_t dev_id, > struct rte_event ev[], > uint16_t nb_events) > { > - const struct rte_eventdev *dev =3D &rte_eventdevs[dev_id]; > - > -#ifdef RTE_LIBRTE_EVENTDEV_DEBUG > - RTE_EVENTDEV_VALID_DEVID_OR_ERR_RET(dev_id, -EINVAL); > - > - if (port_id >=3D dev->data->nb_ports) { > - rte_errno =3D EINVAL; > - return 0; > - } > -#endif > rte_eventdev_trace_crypto_adapter_enqueue(dev_id, port_id, ev, > nb_events); >=20 > - return dev->ca_enqueue(dev->data->ports[port_id], ev, nb_events); > + return rte_eventdev_api[dev_id].ca_enqueue(dev_id, port_id, ev, > + nb_events); > } >=20 > #ifdef __cplusplus > diff --git a/lib/eventdev/rte_event_eth_tx_adapter.h b/lib/eventdev/rte_e= vent_eth_tx_adapter.h > index 8c59547165..e3e78a5616 100644 > --- a/lib/eventdev/rte_event_eth_tx_adapter.h > +++ b/lib/eventdev/rte_event_eth_tx_adapter.h > @@ -355,28 +355,14 @@ rte_event_eth_tx_adapter_enqueue(uint8_t dev_id, > uint16_t nb_events, > const uint8_t flags) > { > - const struct rte_eventdev *dev =3D &rte_eventdevs[dev_id]; > - > -#ifdef RTE_LIBRTE_EVENTDEV_DEBUG > - if (dev_id >=3D RTE_EVENT_MAX_DEVS || > - !rte_eventdevs[dev_id].attached) { > - rte_errno =3D EINVAL; > - return 0; > - } > - > - if (port_id >=3D dev->data->nb_ports) { > - rte_errno =3D EINVAL; > - return 0; > - } > -#endif > rte_eventdev_trace_eth_tx_adapter_enqueue(dev_id, port_id, ev, > nb_events, flags); > if (flags) > - return dev->txa_enqueue_same_dest(dev->data->ports[port_id], > - ev, nb_events); > + return rte_eventdev_api[dev_id].txa_enqueue_same_dest( > + dev_id, port_id, ev, nb_events); > else > - return dev->txa_enqueue(dev->data->ports[port_id], ev, > - nb_events); > + return rte_eventdev_api[dev_id].txa_enqueue(dev_id, port_id, ev, > + nb_events); > } >=20 Looks good to me. Acked-by: Jay Jayatheerthan > /** > diff --git a/lib/eventdev/rte_eventdev.h b/lib/eventdev/rte_eventdev.h > index 1b11d4576d..7378597846 100644 > --- a/lib/eventdev/rte_eventdev.h > +++ b/lib/eventdev/rte_eventdev.h > @@ -1745,30 +1745,17 @@ rte_event_vector_pool_create(const char *name, un= signed int n, > static __rte_always_inline uint16_t > __rte_event_enqueue_burst(uint8_t dev_id, uint8_t port_id, > const struct rte_event ev[], uint16_t nb_events, > - const event_enqueue_burst_t fn) > + const rte_event_enqueue_burst_t fn) > { > - const struct rte_eventdev *dev =3D &rte_eventdevs[dev_id]; > - > -#ifdef RTE_LIBRTE_EVENTDEV_DEBUG > - if (dev_id >=3D RTE_EVENT_MAX_DEVS || !rte_eventdevs[dev_id].attached) = { > - rte_errno =3D EINVAL; > - return 0; > - } > - > - if (port_id >=3D dev->data->nb_ports) { > - rte_errno =3D EINVAL; > - return 0; > - } > -#endif > rte_eventdev_trace_enq_burst(dev_id, port_id, ev, nb_events, fn); > /* > * Allow zero cost non burst mode routine invocation if application > * requests nb_events as const one > */ > if (nb_events =3D=3D 1) > - return (*dev->enqueue)(dev->data->ports[port_id], ev); > + return rte_eventdev_api[dev_id].enqueue(dev_id, port_id, ev); > else > - return fn(dev->data->ports[port_id], ev, nb_events); > + return fn(dev_id, port_id, ev, nb_events); > } >=20 > /** > @@ -1818,10 +1805,9 @@ static inline uint16_t > rte_event_enqueue_burst(uint8_t dev_id, uint8_t port_id, > const struct rte_event ev[], uint16_t nb_events) > { > - const struct rte_eventdev *dev =3D &rte_eventdevs[dev_id]; > - > - return __rte_event_enqueue_burst(dev_id, port_id, ev, nb_events, > - dev->enqueue_burst); > + return __rte_event_enqueue_burst( > + dev_id, port_id, ev, nb_events, > + rte_eventdev_api[dev_id].enqueue_burst); > } >=20 > /** > @@ -1869,10 +1855,9 @@ static inline uint16_t > rte_event_enqueue_new_burst(uint8_t dev_id, uint8_t port_id, > const struct rte_event ev[], uint16_t nb_events) > { > - const struct rte_eventdev *dev =3D &rte_eventdevs[dev_id]; > - > - return __rte_event_enqueue_burst(dev_id, port_id, ev, nb_events, > - dev->enqueue_new_burst); > + return __rte_event_enqueue_burst( > + dev_id, port_id, ev, nb_events, > + rte_eventdev_api[dev_id].enqueue_new_burst); > } >=20 > /** > @@ -1920,10 +1905,9 @@ static inline uint16_t > rte_event_enqueue_forward_burst(uint8_t dev_id, uint8_t port_id, > const struct rte_event ev[], uint16_t nb_events) > { > - const struct rte_eventdev *dev =3D &rte_eventdevs[dev_id]; > - > - return __rte_event_enqueue_burst(dev_id, port_id, ev, nb_events, > - dev->enqueue_forward_burst); > + return __rte_event_enqueue_burst( > + dev_id, port_id, ev, nb_events, > + rte_eventdev_api[dev_id].enqueue_forward_burst); > } >=20 > /** > @@ -1996,30 +1980,17 @@ static inline uint16_t > rte_event_dequeue_burst(uint8_t dev_id, uint8_t port_id, struct rte_even= t ev[], > uint16_t nb_events, uint64_t timeout_ticks) > { > - struct rte_eventdev *dev =3D &rte_eventdevs[dev_id]; > - > -#ifdef RTE_LIBRTE_EVENTDEV_DEBUG > - if (dev_id >=3D RTE_EVENT_MAX_DEVS || !rte_eventdevs[dev_id].attached) = { > - rte_errno =3D EINVAL; > - return 0; > - } > - > - if (port_id >=3D dev->data->nb_ports) { > - rte_errno =3D EINVAL; > - return 0; > - } > -#endif > rte_eventdev_trace_deq_burst(dev_id, port_id, ev, nb_events); > /* > * Allow zero cost non burst mode routine invocation if application > * requests nb_events as const one > */ > if (nb_events =3D=3D 1) > - return (*dev->dequeue)(dev->data->ports[port_id], ev, > - timeout_ticks); > + return rte_eventdev_api[dev_id].dequeue(dev_id, port_id, ev, > + timeout_ticks); > else > - return (*dev->dequeue_burst)(dev->data->ports[port_id], ev, > - nb_events, timeout_ticks); > + return rte_eventdev_api[dev_id].dequeue_burst( > + dev_id, port_id, ev, nb_events, timeout_ticks); > } >=20 > #ifdef __cplusplus > -- > 2.17.1