From: Jun Yang <jun.yang@nxp.com>
Export API in rte_pmd_dpaa2.h
Signed-off-by: Jun Yang <jun.yang@nxp.com>
---
drivers/net/dpaa2/dpaa2_ethdev.c | 24 ++++++++++++++++++++++++
drivers/net/dpaa2/dpaa2_ethdev.h | 4 ++++
drivers/net/dpaa2/rte_pmd_dpaa2.h | 3 +++
drivers/net/dpaa2/version.map | 1 +
4 files changed, 32 insertions(+)
@@ -2903,6 +2903,30 @@ rte_pmd_dpaa2_dev_is_dpaa2(uint32_t eth_id)
return dev->device->driver == &rte_dpaa2_pmd.driver;
}
+const char *
+rte_pmd_dpaa2_ep_name(uint32_t eth_id)
+{
+ struct rte_eth_dev *dev;
+ struct dpaa2_dev_priv *priv;
+
+ if (eth_id >= RTE_MAX_ETHPORTS)
+ return NULL;
+
+ if (!rte_pmd_dpaa2_dev_is_dpaa2(eth_id))
+ return NULL;
+
+ dev = &rte_eth_devices[eth_id];
+ if (!dev->data)
+ return NULL;
+
+ if (!dev->data->dev_private)
+ return NULL;
+
+ priv = dev->data->dev_private;
+
+ return priv->ep_name;
+}
+
#if defined(RTE_LIBRTE_IEEE1588)
int
rte_pmd_dpaa2_get_one_step_ts(uint16_t port_id, bool mc_query)
@@ -385,6 +385,10 @@ struct dpaa2_dev_priv {
uint8_t max_cgs;
uint8_t cgid_in_use[MAX_RX_QUEUES];
+ enum rte_dpaa2_dev_type ep_dev_type; /**< Endpoint Device Type */
+ uint16_t ep_object_id; /**< Endpoint DPAA2 Object ID */
+ char ep_name[RTE_DEV_NAME_MAX_LEN];
+
struct extract_s extract;
uint16_t ss_offset;
@@ -130,6 +130,9 @@ rte_pmd_dpaa2_get_tlu_hash(uint8_t *key, int size);
__rte_experimental
int
rte_pmd_dpaa2_dev_is_dpaa2(uint32_t eth_id);
+__rte_experimental
+const char *
+rte_pmd_dpaa2_ep_name(uint32_t eth_id);
#if defined(RTE_LIBRTE_IEEE1588)
__rte_experimental
@@ -18,6 +18,7 @@ EXPERIMENTAL {
rte_pmd_dpaa2_get_tlu_hash;
# added in 24.11
rte_pmd_dpaa2_dev_is_dpaa2;
+ rte_pmd_dpaa2_ep_name;
rte_pmd_dpaa2_set_one_step_ts;
rte_pmd_dpaa2_get_one_step_ts;
rte_pmd_dpaa2_mux_dump_counter;