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 5C4B8A0C58; Mon, 23 Aug 2021 21:40:35 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 2670E40151; Mon, 23 Aug 2021 21:40:35 +0200 (CEST) Received: from mx0b-0016f401.pphosted.com (mx0a-0016f401.pphosted.com [67.231.148.174]) by mails.dpdk.org (Postfix) with ESMTP id CF6624014D for ; Mon, 23 Aug 2021 21:40:32 +0200 (CEST) Received: from pps.filterd (m0045849.ppops.net [127.0.0.1]) by mx0a-0016f401.pphosted.com (8.16.1.2/8.16.0.43) with SMTP id 17NHFL3D021381; Mon, 23 Aug 2021 12:40:29 -0700 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=marvell.com; h=from : to : cc : subject : date : message-id : mime-version : content-transfer-encoding : content-type; s=pfpt0220; bh=81RuUKER6z1849OGVgxaEJjNCHNlBibQkt7VUS8cgBs=; b=OMrJ0RFUGSRIO2B6APMxBycqex7wzury4iqdMI8hjBPycSCXRvimJRufdSU+JcGENSC3 ATT90KNmfnUISMYEtZqpXhU0hbW1x4OO63UpfoiXmeDNV66ZnSZN/jQLAkAj2KmuoN21 cQpGGx68J2XOzYkUSlxJGYDQJXPI42Df59weYhLOpZ0fWtxHX22sSo0cyKlD5LBgoH2V Um6BOnOWsrpHEBtdLmIUImL8WCmbzwD1G4az4j9oEz6xxBG8lBnuwYkbmo3tn5V9F+OL c7KJk7cxCcOlOYkdcQV9DGH2DwgT4iSXBQ/sYNB1izmt6vF/acQgVdd62OYrpoxssIg4 oA== Received: from dc5-exch02.marvell.com ([199.233.59.182]) by mx0a-0016f401.pphosted.com with ESMTP id 3amfwj0h5h-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-SHA384 bits=256 verify=NOT); Mon, 23 Aug 2021 12:40:29 -0700 Received: from DC5-EXCH02.marvell.com (10.69.176.39) by DC5-EXCH02.marvell.com (10.69.176.39) with Microsoft SMTP Server (TLS) id 15.0.1497.18; Mon, 23 Aug 2021 12:40:28 -0700 Received: from maili.marvell.com (10.69.176.80) by DC5-EXCH02.marvell.com (10.69.176.39) with Microsoft SMTP Server id 15.0.1497.18 via Frontend Transport; Mon, 23 Aug 2021 12:40:28 -0700 Received: from BG-LT7430.marvell.com (BG-LT7430.marvell.com [10.28.177.176]) by maili.marvell.com (Postfix) with ESMTP id 9A25D5B693C; Mon, 23 Aug 2021 12:40:23 -0700 (PDT) From: To: , Pavan Nikhilesh , "Shijith Thotton" , Timothy McDaniel , Hemant Agrawal , "Nipun Gupta" , =?UTF-8?q?Mattias=20R=C3=B6nnblom?= , Liang Ma , "Peter Mccarthy" , Harry van Haaren , Abhinandan Gujjar , Ray Kinsella CC: , Date: Tue, 24 Aug 2021 01:10:05 +0530 Message-ID: <20210823194020.1229-1-pbhagavatula@marvell.com> X-Mailer: git-send-email 2.17.1 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Type: text/plain X-Proofpoint-ORIG-GUID: 3SmpuV7oLXEqJSBDzQJ_aMsvrKZV5oB1 X-Proofpoint-GUID: 3SmpuV7oLXEqJSBDzQJ_aMsvrKZV5oB1 X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.182.1,Aquarius:18.0.790,Hydra:6.0.391,FMLib:17.0.607.475 definitions=2021-08-23_04,2021-08-23_01,2020-04-07_01 Subject: [dpdk-dev] [RFC 01/15] eventdev: make driver interface as internal 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" From: Pavan Nikhilesh Mark all the driver specific functions as internal, remove `rte` prefix from `struct rte_eventdev_ops`. Remove experimental tag from internal functions. Remove `eventdev_pmd.h` from non-internal header files. Signed-off-by: Pavan Nikhilesh --- drivers/event/cnxk/cn10k_eventdev.c | 2 +- drivers/event/cnxk/cn9k_eventdev.c | 2 +- drivers/event/dlb2/dlb2.c | 2 +- drivers/event/dpaa/dpaa_eventdev.c | 2 +- drivers/event/dpaa2/dpaa2_eventdev.c | 2 +- drivers/event/dsw/dsw_evdev.c | 2 +- drivers/event/octeontx/ssovf_evdev.c | 2 +- drivers/event/octeontx2/otx2_evdev.c | 2 +- drivers/event/opdl/opdl_evdev.c | 2 +- drivers/event/skeleton/skeleton_eventdev.c | 2 +- drivers/event/sw/sw_evdev.c | 2 +- lib/eventdev/eventdev_pmd.h | 6 +++++- lib/eventdev/eventdev_pmd_pci.h | 4 +++- lib/eventdev/eventdev_pmd_vdev.h | 2 ++ lib/eventdev/meson.build | 6 ++++++ lib/eventdev/rte_event_crypto_adapter.h | 1 - lib/eventdev/rte_eventdev.h | 4 ++-- lib/eventdev/version.map | 17 +++++++++-------- 18 files changed, 38 insertions(+), 24 deletions(-) diff --git a/drivers/event/cnxk/cn10k_eventdev.c b/drivers/event/cnxk/cn10k_eventdev.c index 6f37c5bd23..697b134041 100644 --- a/drivers/event/cnxk/cn10k_eventdev.c +++ b/drivers/event/cnxk/cn10k_eventdev.c @@ -821,7 +821,7 @@ cn10k_sso_tx_adapter_queue_del(uint8_t id, const struct rte_eventdev *event_dev, return cn10k_sso_updt_tx_adptr_data(event_dev); } -static struct rte_eventdev_ops cn10k_sso_dev_ops = { +static struct eventdev_ops cn10k_sso_dev_ops = { .dev_infos_get = cn10k_sso_info_get, .dev_configure = cn10k_sso_dev_configure, .queue_def_conf = cnxk_sso_queue_def_conf, diff --git a/drivers/event/cnxk/cn9k_eventdev.c b/drivers/event/cnxk/cn9k_eventdev.c index a69edff195..9b439947e5 100644 --- a/drivers/event/cnxk/cn9k_eventdev.c +++ b/drivers/event/cnxk/cn9k_eventdev.c @@ -1069,7 +1069,7 @@ cn9k_sso_tx_adapter_queue_del(uint8_t id, const struct rte_eventdev *event_dev, return cn9k_sso_updt_tx_adptr_data(event_dev); } -static struct rte_eventdev_ops cn9k_sso_dev_ops = { +static struct eventdev_ops cn9k_sso_dev_ops = { .dev_infos_get = cn9k_sso_info_get, .dev_configure = cn9k_sso_dev_configure, .queue_def_conf = cnxk_sso_queue_def_conf, diff --git a/drivers/event/dlb2/dlb2.c b/drivers/event/dlb2/dlb2.c index 252bbd8d5e..c8742ddb2c 100644 --- a/drivers/event/dlb2/dlb2.c +++ b/drivers/event/dlb2/dlb2.c @@ -4384,7 +4384,7 @@ dlb2_entry_points_init(struct rte_eventdev *dev) struct dlb2_eventdev *dlb2; /* Expose PMD's eventdev interface */ - static struct rte_eventdev_ops dlb2_eventdev_entry_ops = { + static struct eventdev_ops dlb2_eventdev_entry_ops = { .dev_infos_get = dlb2_eventdev_info_get, .dev_configure = dlb2_eventdev_configure, .dev_start = dlb2_eventdev_start, diff --git a/drivers/event/dpaa/dpaa_eventdev.c b/drivers/event/dpaa/dpaa_eventdev.c index ec74160325..9f14390d28 100644 --- a/drivers/event/dpaa/dpaa_eventdev.c +++ b/drivers/event/dpaa/dpaa_eventdev.c @@ -925,7 +925,7 @@ dpaa_eventdev_txa_enqueue(void *port, return nb_events; } -static struct rte_eventdev_ops dpaa_eventdev_ops = { +static struct eventdev_ops dpaa_eventdev_ops = { .dev_infos_get = dpaa_event_dev_info_get, .dev_configure = dpaa_event_dev_configure, .dev_start = dpaa_event_dev_start, diff --git a/drivers/event/dpaa2/dpaa2_eventdev.c b/drivers/event/dpaa2/dpaa2_eventdev.c index 5ccf22f77f..d577f64824 100644 --- a/drivers/event/dpaa2/dpaa2_eventdev.c +++ b/drivers/event/dpaa2/dpaa2_eventdev.c @@ -1015,7 +1015,7 @@ dpaa2_eventdev_txa_enqueue(void *port, return nb_events; } -static struct rte_eventdev_ops dpaa2_eventdev_ops = { +static struct eventdev_ops dpaa2_eventdev_ops = { .dev_infos_get = dpaa2_eventdev_info_get, .dev_configure = dpaa2_eventdev_configure, .dev_start = dpaa2_eventdev_start, diff --git a/drivers/event/dsw/dsw_evdev.c b/drivers/event/dsw/dsw_evdev.c index 2301a4b7a0..01f060fff3 100644 --- a/drivers/event/dsw/dsw_evdev.c +++ b/drivers/event/dsw/dsw_evdev.c @@ -398,7 +398,7 @@ dsw_crypto_adapter_caps_get(const struct rte_eventdev *dev __rte_unused, return 0; } -static struct rte_eventdev_ops dsw_evdev_ops = { +static struct eventdev_ops dsw_evdev_ops = { .port_setup = dsw_port_setup, .port_def_conf = dsw_port_def_conf, .port_release = dsw_port_release, diff --git a/drivers/event/octeontx/ssovf_evdev.c b/drivers/event/octeontx/ssovf_evdev.c index b93f6ec8c6..4a8c6a13a5 100644 --- a/drivers/event/octeontx/ssovf_evdev.c +++ b/drivers/event/octeontx/ssovf_evdev.c @@ -790,7 +790,7 @@ ssovf_crypto_adapter_qp_del(const struct rte_eventdev *dev, } /* Initialize and register event driver with DPDK Application */ -static struct rte_eventdev_ops ssovf_ops = { +static struct eventdev_ops ssovf_ops = { .dev_infos_get = ssovf_info_get, .dev_configure = ssovf_configure, .queue_def_conf = ssovf_queue_def_conf, diff --git a/drivers/event/octeontx2/otx2_evdev.c b/drivers/event/octeontx2/otx2_evdev.c index 38a6b651d9..00902ebf53 100644 --- a/drivers/event/octeontx2/otx2_evdev.c +++ b/drivers/event/octeontx2/otx2_evdev.c @@ -1596,7 +1596,7 @@ otx2_sso_close(struct rte_eventdev *event_dev) } /* Initialize and register event driver with DPDK Application */ -static struct rte_eventdev_ops otx2_sso_ops = { +static struct eventdev_ops otx2_sso_ops = { .dev_infos_get = otx2_sso_info_get, .dev_configure = otx2_sso_configure, .queue_def_conf = otx2_sso_queue_def_conf, diff --git a/drivers/event/opdl/opdl_evdev.c b/drivers/event/opdl/opdl_evdev.c index cfa9733b64..739dc64c82 100644 --- a/drivers/event/opdl/opdl_evdev.c +++ b/drivers/event/opdl/opdl_evdev.c @@ -609,7 +609,7 @@ set_do_test(const char *key __rte_unused, const char *value, void *opaque) static int opdl_probe(struct rte_vdev_device *vdev) { - static struct rte_eventdev_ops evdev_opdl_ops = { + static struct eventdev_ops evdev_opdl_ops = { .dev_configure = opdl_dev_configure, .dev_infos_get = opdl_info_get, .dev_close = opdl_close, diff --git a/drivers/event/skeleton/skeleton_eventdev.c b/drivers/event/skeleton/skeleton_eventdev.c index 6fd1102596..c9e17e7cb1 100644 --- a/drivers/event/skeleton/skeleton_eventdev.c +++ b/drivers/event/skeleton/skeleton_eventdev.c @@ -320,7 +320,7 @@ skeleton_eventdev_dump(struct rte_eventdev *dev, FILE *f) /* Initialize and register event driver with DPDK Application */ -static struct rte_eventdev_ops skeleton_eventdev_ops = { +static struct eventdev_ops skeleton_eventdev_ops = { .dev_infos_get = skeleton_eventdev_info_get, .dev_configure = skeleton_eventdev_configure, .dev_start = skeleton_eventdev_start, diff --git a/drivers/event/sw/sw_evdev.c b/drivers/event/sw/sw_evdev.c index a5e6ca22e8..9b72073322 100644 --- a/drivers/event/sw/sw_evdev.c +++ b/drivers/event/sw/sw_evdev.c @@ -945,7 +945,7 @@ static int32_t sw_sched_service_func(void *args) static int sw_probe(struct rte_vdev_device *vdev) { - static struct rte_eventdev_ops evdev_sw_ops = { + static struct eventdev_ops evdev_sw_ops = { .dev_configure = sw_dev_configure, .dev_infos_get = sw_info_get, .dev_close = sw_close, diff --git a/lib/eventdev/eventdev_pmd.h b/lib/eventdev/eventdev_pmd.h index 0f724ac85d..5dab9e2f70 100644 --- a/lib/eventdev/eventdev_pmd.h +++ b/lib/eventdev/eventdev_pmd.h @@ -103,6 +103,7 @@ extern struct rte_eventdev *rte_eventdevs; * @return * - The rte_eventdev structure pointer for the given device ID. */ +__rte_internal static inline struct rte_eventdev * rte_event_pmd_get_named_dev(const char *name) { @@ -131,6 +132,7 @@ rte_event_pmd_get_named_dev(const char *name) * @return * - If the device index is valid (1) or not (0). */ +__rte_internal static inline unsigned rte_event_pmd_is_valid_dev(uint8_t dev_id) { @@ -1060,7 +1062,7 @@ typedef int (*eventdev_eth_tx_adapter_stats_reset_t)(uint8_t id, const struct rte_eventdev *dev); /** Event device operations function pointer table */ -struct rte_eventdev_ops { +struct eventdev_ops { eventdev_info_get_t dev_infos_get; /**< Get device info. */ eventdev_configure_t dev_configure; /**< Configure device. */ eventdev_start_t dev_start; /**< Start device. */ @@ -1178,6 +1180,7 @@ struct rte_eventdev_ops { * @return * - Slot in the rte_dev_devices array for a new device; */ +__rte_internal struct rte_eventdev * rte_event_pmd_allocate(const char *name, int socket_id); @@ -1189,6 +1192,7 @@ rte_event_pmd_allocate(const char *name, int socket_id); * @return * - 0 on success, negative on error */ +__rte_internal int rte_event_pmd_release(struct rte_eventdev *eventdev); diff --git a/lib/eventdev/eventdev_pmd_pci.h b/lib/eventdev/eventdev_pmd_pci.h index d14ea634b8..02c6d42a80 100644 --- a/lib/eventdev/eventdev_pmd_pci.h +++ b/lib/eventdev/eventdev_pmd_pci.h @@ -36,7 +36,7 @@ typedef int (*eventdev_pmd_pci_callback_t)(struct rte_eventdev *dev); * interface. Same as rte_event_pmd_pci_probe, except caller can specify * the name. */ -__rte_experimental +__rte_internal static inline int rte_event_pmd_pci_probe_named(struct rte_pci_driver *pci_drv, struct rte_pci_device *pci_dev, @@ -90,6 +90,7 @@ rte_event_pmd_pci_probe_named(struct rte_pci_driver *pci_drv, * Wrapper for use by pci drivers as a .probe function to attach to a event * interface. */ +__rte_internal static inline int rte_event_pmd_pci_probe(struct rte_pci_driver *pci_drv, struct rte_pci_device *pci_dev, @@ -113,6 +114,7 @@ rte_event_pmd_pci_probe(struct rte_pci_driver *pci_drv, * Wrapper for use by pci drivers as a .remove function to detach a event * interface. */ +__rte_internal static inline int rte_event_pmd_pci_remove(struct rte_pci_device *pci_dev, eventdev_pmd_pci_callback_t devuninit) diff --git a/lib/eventdev/eventdev_pmd_vdev.h b/lib/eventdev/eventdev_pmd_vdev.h index bc0cf44c8c..e645a21aad 100644 --- a/lib/eventdev/eventdev_pmd_vdev.h +++ b/lib/eventdev/eventdev_pmd_vdev.h @@ -41,6 +41,7 @@ extern "C" { * - Eventdev pointer if device is successfully created. * - NULL if device cannot be created. */ +__rte_internal static inline struct rte_eventdev * rte_event_pmd_vdev_init(const char *name, size_t dev_private_size, int socket_id) @@ -78,6 +79,7 @@ rte_event_pmd_vdev_init(const char *name, size_t dev_private_size, * @return * - 0 on success, negative on error */ +__rte_internal static inline int rte_event_pmd_vdev_uninit(const char *name) { diff --git a/lib/eventdev/meson.build b/lib/eventdev/meson.build index 32abeba794..523ea9ccae 100644 --- a/lib/eventdev/meson.build +++ b/lib/eventdev/meson.build @@ -27,5 +27,11 @@ headers = files( 'rte_event_crypto_adapter.h', 'rte_event_eth_tx_adapter.h', ) +driver_sdk_headers += files( + 'eventdev_pmd.h', + 'eventdev_pmd_pci.h', + 'eventdev_pmd_vdev.h', +) + deps += ['ring', 'ethdev', 'hash', 'mempool', 'mbuf', 'timer', 'cryptodev'] deps += ['telemetry'] diff --git a/lib/eventdev/rte_event_crypto_adapter.h b/lib/eventdev/rte_event_crypto_adapter.h index f8c6cca87c..431d05b6ed 100644 --- a/lib/eventdev/rte_event_crypto_adapter.h +++ b/lib/eventdev/rte_event_crypto_adapter.h @@ -171,7 +171,6 @@ extern "C" { #include #include "rte_eventdev.h" -#include "eventdev_pmd.h" /** * Crypto event adapter mode diff --git a/lib/eventdev/rte_eventdev.h b/lib/eventdev/rte_eventdev.h index a9c496fb62..6ba116002f 100644 --- a/lib/eventdev/rte_eventdev.h +++ b/lib/eventdev/rte_eventdev.h @@ -1324,7 +1324,7 @@ int rte_event_eth_tx_adapter_caps_get(uint8_t dev_id, uint16_t eth_port_id, uint32_t *caps); -struct rte_eventdev_ops; +struct eventdev_ops; struct rte_eventdev; typedef uint16_t (*event_enqueue_t)(void *port, const struct rte_event *ev); @@ -1429,7 +1429,7 @@ struct rte_eventdev { /**< Pointer to PMD eth Tx adapter enqueue function. */ struct rte_eventdev_data *data; /**< Pointer to device data */ - struct rte_eventdev_ops *dev_ops; + struct eventdev_ops *dev_ops; /**< Functions exported by PMD */ struct rte_device *dev; /**< Device info. supplied by probing */ diff --git a/lib/eventdev/version.map b/lib/eventdev/version.map index 88625621ec..5f1fe412a4 100644 --- a/lib/eventdev/version.map +++ b/lib/eventdev/version.map @@ -55,12 +55,6 @@ DPDK_22 { rte_event_eth_tx_adapter_stats_get; rte_event_eth_tx_adapter_stats_reset; rte_event_eth_tx_adapter_stop; - rte_event_pmd_allocate; - rte_event_pmd_pci_probe; - rte_event_pmd_pci_remove; - rte_event_pmd_release; - rte_event_pmd_vdev_init; - rte_event_pmd_vdev_uninit; rte_event_port_attr_get; rte_event_port_default_conf_get; rte_event_port_link; @@ -136,8 +130,6 @@ EXPERIMENTAL { # changed in 20.11 __rte_eventdev_trace_port_setup; - # added in 20.11 - rte_event_pmd_pci_probe_named; #added in 21.05 rte_event_vector_pool_create; @@ -150,4 +142,13 @@ INTERNAL { global: rte_event_pmd_selftest_seqn_dynfield_offset; + rte_event_pmd_allocate; + rte_event_pmd_get_named_dev; + rte_event_pmd_is_valid_dev; + rte_event_pmd_pci_probe; + rte_event_pmd_pci_probe_named; + rte_event_pmd_pci_remove; + rte_event_pmd_release; + rte_event_pmd_vdev_init; + rte_event_pmd_vdev_uninit; }; -- 2.17.1