* RE: [PATCH] eventdev/rx_adapter: add event port get api
2021-12-22 6:13 [PATCH] eventdev/rx_adapter: add event port get api Naga Harish K S V
@ 2021-12-27 6:48 ` Jayatheerthan, Jay
2022-01-21 10:25 ` Jerin Jacob
2022-01-22 17:07 ` [PATCH v2] " Naga Harish K S V
2 siblings, 0 replies; 6+ messages in thread
From: Jayatheerthan, Jay @ 2021-12-27 6:48 UTC (permalink / raw)
To: Naga Harish K, S V, jerinjacobk; +Cc: dev
Looks good. Thanks for the patch.
Acked-by: Jay Jayatheerthan <jay.jayatheerthan@intel.com>
> -----Original Message-----
> From: Naga Harish K, S V <s.v.naga.harish.k@intel.com>
> Sent: Wednesday, December 22, 2021 11:44 AM
> To: Jayatheerthan, Jay <jay.jayatheerthan@intel.com>; jerinjacobk@gmail.com
> Cc: dev@dpdk.org
> Subject: [PATCH] eventdev/rx_adapter: add event port get api
>
> This patch introduces new api for retrieving event port id
> of eth rx adapter.
>
> Signed-off-by: Naga Harish K S V <s.v.naga.harish.k@intel.com>
> ---
> lib/eventdev/rte_event_eth_rx_adapter.c | 20 ++++++++++++++++++++
> lib/eventdev/rte_event_eth_rx_adapter.h | 20 ++++++++++++++++++++
> lib/eventdev/version.map | 1 +
> 3 files changed, 41 insertions(+)
>
> diff --git a/lib/eventdev/rte_event_eth_rx_adapter.c b/lib/eventdev/rte_event_eth_rx_adapter.c
> index 809416d9b7..fca2e38690 100644
> --- a/lib/eventdev/rte_event_eth_rx_adapter.c
> +++ b/lib/eventdev/rte_event_eth_rx_adapter.c
> @@ -3119,6 +3119,26 @@ rte_event_eth_rx_adapter_service_id_get(uint8_t id, uint32_t *service_id)
> return rx_adapter->service_inited ? 0 : -ESRCH;
> }
>
> +int
> +rte_event_eth_rx_adapter_event_port_get(uint8_t id, uint8_t *event_port_id)
> +{
> + struct event_eth_rx_adapter *rx_adapter;
> +
> + if (rxa_memzone_lookup())
> + return -ENOMEM;
> +
> + RTE_EVENT_ETH_RX_ADAPTER_ID_VALID_OR_ERR_RET(id, -EINVAL);
> +
> + rx_adapter = rxa_id_to_adapter(id);
> + if (rx_adapter == NULL || event_port_id == NULL)
> + return -EINVAL;
> +
> + if (rx_adapter->service_inited)
> + *event_port_id = rx_adapter->event_port_id;
> +
> + return rx_adapter->service_inited ? 0 : -ESRCH;
> +}
> +
> int
> rte_event_eth_rx_adapter_cb_register(uint8_t id,
> uint16_t eth_dev_id,
> diff --git a/lib/eventdev/rte_event_eth_rx_adapter.h b/lib/eventdev/rte_event_eth_rx_adapter.h
> index 9546d792e9..1364eafe38 100644
> --- a/lib/eventdev/rte_event_eth_rx_adapter.h
> +++ b/lib/eventdev/rte_event_eth_rx_adapter.h
> @@ -37,6 +37,7 @@
> * - rte_event_eth_rx_adapter_queue_conf_get()
> * - rte_event_eth_rx_adapter_queue_stats_get()
> * - rte_event_eth_rx_adapter_queue_stats_reset()
> + * - rte_event_eth_rx_adapter_event_port_get()
> *
> * The application creates an ethernet to event adapter using
> * rte_event_eth_rx_adapter_create_ext() or rte_event_eth_rx_adapter_create()
> @@ -684,6 +685,25 @@ rte_event_eth_rx_adapter_queue_stats_reset(uint8_t id,
> uint16_t eth_dev_id,
> uint16_t rx_queue_id);
>
> +/**
> + * Retrieve the event port ID of an adapter. If the adapter doesn't use
> + * a rte_service function, this function returns -ESRCH.
> + *
> + * @param id
> + * Adapter identifier.
> + *
> + * @param [out] event_port_id
> + * A pointer to a uint32_t, to be filled in with the port id.
> + *
> + * @return
> + * - 0: Success
> + * - <0: Error code on failure, if the adapter doesn't use a rte_service
> + * function, this function returns -ESRCH.
> + */
> +__rte_experimental
> +int
> +rte_event_eth_rx_adapter_event_port_get(uint8_t id, uint8_t *event_port_id);
> +
> #ifdef __cplusplus
> }
> #endif
> diff --git a/lib/eventdev/version.map b/lib/eventdev/version.map
> index ade1f1182e..91d2b5723b 100644
> --- a/lib/eventdev/version.map
> +++ b/lib/eventdev/version.map
> @@ -102,6 +102,7 @@ EXPERIMENTAL {
>
> # added in 21.11
> rte_event_eth_rx_adapter_create_with_params;
> + rte_event_eth_rx_adapter_event_port_get;
> rte_event_eth_rx_adapter_queue_conf_get;
> rte_event_eth_rx_adapter_queue_stats_get;
> rte_event_eth_rx_adapter_queue_stats_reset;
> --
> 2.25.1
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH] eventdev/rx_adapter: add event port get api
2021-12-22 6:13 [PATCH] eventdev/rx_adapter: add event port get api Naga Harish K S V
2021-12-27 6:48 ` Jayatheerthan, Jay
@ 2022-01-21 10:25 ` Jerin Jacob
2022-01-22 17:07 ` [PATCH v2] " Naga Harish K S V
2 siblings, 0 replies; 6+ messages in thread
From: Jerin Jacob @ 2022-01-21 10:25 UTC (permalink / raw)
To: Naga Harish K S V; +Cc: Jayatheerthan, Jay, dpdk-dev
On Wed, Dec 22, 2021 at 11:43 AM Naga Harish K S V
<s.v.naga.harish.k@intel.com> wrote:
>
> This patch introduces new api for retrieving event port id
> of eth rx adapter.
>
> Signed-off-by: Naga Harish K S V <s.v.naga.harish.k@intel.com>
> ---
> lib/eventdev/rte_event_eth_rx_adapter.c | 20 ++++++++++++++++++++
> lib/eventdev/rte_event_eth_rx_adapter.h | 20 ++++++++++++++++++++
> lib/eventdev/version.map | 1 +
> 3 files changed, 41 insertions(+)
>
> diff --git a/lib/eventdev/rte_event_eth_rx_adapter.c b/lib/eventdev/rte_event_eth_rx_adapter.c
> index 809416d9b7..fca2e38690 100644
> --- a/lib/eventdev/rte_event_eth_rx_adapter.c
> +++ b/lib/eventdev/rte_event_eth_rx_adapter.c
> @@ -3119,6 +3119,26 @@ rte_event_eth_rx_adapter_service_id_get(uint8_t id, uint32_t *service_id)
> return rx_adapter->service_inited ? 0 : -ESRCH;
> }
>
> +int
> +rte_event_eth_rx_adapter_event_port_get(uint8_t id, uint8_t *event_port_id)
> +{
> + struct event_eth_rx_adapter *rx_adapter;
> +
> + if (rxa_memzone_lookup())
> + return -ENOMEM;
> +
> + RTE_EVENT_ETH_RX_ADAPTER_ID_VALID_OR_ERR_RET(id, -EINVAL);
> +
> + rx_adapter = rxa_id_to_adapter(id);
> + if (rx_adapter == NULL || event_port_id == NULL)
> + return -EINVAL;
> +
> + if (rx_adapter->service_inited)
> + *event_port_id = rx_adapter->event_port_id;
> +
> + return rx_adapter->service_inited ? 0 : -ESRCH;
> +}
> +
> int
> rte_event_eth_rx_adapter_cb_register(uint8_t id,
> uint16_t eth_dev_id,
> diff --git a/lib/eventdev/rte_event_eth_rx_adapter.h b/lib/eventdev/rte_event_eth_rx_adapter.h
> index 9546d792e9..1364eafe38 100644
> --- a/lib/eventdev/rte_event_eth_rx_adapter.h
> +++ b/lib/eventdev/rte_event_eth_rx_adapter.h
> @@ -37,6 +37,7 @@
> * - rte_event_eth_rx_adapter_queue_conf_get()
> * - rte_event_eth_rx_adapter_queue_stats_get()
> * - rte_event_eth_rx_adapter_queue_stats_reset()
> + * - rte_event_eth_rx_adapter_event_port_get()
> *
> * The application creates an ethernet to event adapter using
> * rte_event_eth_rx_adapter_create_ext() or rte_event_eth_rx_adapter_create()
> @@ -684,6 +685,25 @@ rte_event_eth_rx_adapter_queue_stats_reset(uint8_t id,
> uint16_t eth_dev_id,
> uint16_t rx_queue_id);
>
> +/**
> + * Retrieve the event port ID of an adapter. If the adapter doesn't use
> + * a rte_service function, this function returns -ESRCH.
> + *
> + * @param id
> + * Adapter identifier.
> + *
> + * @param [out] event_port_id
> + * A pointer to a uint32_t, to be filled in with the port id.
Pointer to uint8t_t. Right?
> + *
> + * @return
> + * - 0: Success
> + * - <0: Error code on failure, if the adapter doesn't use a rte_service
> + * function, this function returns -ESRCH.
> + */
> +__rte_experimental
> +int
> +rte_event_eth_rx_adapter_event_port_get(uint8_t id, uint8_t *event_port_id);
> +
> #ifdef __cplusplus
> }
> #endif
> diff --git a/lib/eventdev/version.map b/lib/eventdev/version.map
> index ade1f1182e..91d2b5723b 100644
> --- a/lib/eventdev/version.map
> +++ b/lib/eventdev/version.map
> @@ -102,6 +102,7 @@ EXPERIMENTAL {
>
> # added in 21.11
See below
> rte_event_eth_rx_adapter_create_with_params;
Added in 22.03.
Also please update the release note for the new API addition.
> + rte_event_eth_rx_adapter_event_port_get;
> rte_event_eth_rx_adapter_queue_conf_get;
> rte_event_eth_rx_adapter_queue_stats_get;
> rte_event_eth_rx_adapter_queue_stats_reset;
> --
> 2.25.1
>
^ permalink raw reply [flat|nested] 6+ messages in thread
* [PATCH v2] eventdev/rx_adapter: add event port get api
2021-12-22 6:13 [PATCH] eventdev/rx_adapter: add event port get api Naga Harish K S V
2021-12-27 6:48 ` Jayatheerthan, Jay
2022-01-21 10:25 ` Jerin Jacob
@ 2022-01-22 17:07 ` Naga Harish K S V
2022-01-22 17:14 ` [PATCH v3] eventdev/eth_rx: " Naga Harish K S V
2 siblings, 1 reply; 6+ messages in thread
From: Naga Harish K S V @ 2022-01-22 17:07 UTC (permalink / raw)
To: jerinjacobk, jay.jayatheerthan; +Cc: dev
This patch introduces new api for retrieving event port id
of eth rx adapter.
Signed-off-by: Naga Harish K S V <s.v.naga.harish.k@intel.com>
Acked-by: Jay Jayatheerthan <jay.jayatheerthan@intel.com>
---
doc/guides/rel_notes/release_22_03.rst | 2 ++
lib/eventdev/rte_event_eth_rx_adapter.c | 20 ++++++++++++++++++++
lib/eventdev/rte_event_eth_rx_adapter.h | 20 ++++++++++++++++++++
lib/eventdev/version.map | 3 +++
4 files changed, 45 insertions(+)
diff --git a/doc/guides/rel_notes/release_22_03.rst b/doc/guides/rel_notes/release_22_03.rst
index 6d99d1eaa9..288d94c0e6 100644
--- a/doc/guides/rel_notes/release_22_03.rst
+++ b/doc/guides/rel_notes/release_22_03.rst
@@ -83,6 +83,8 @@ API Changes
This section is a comment. Do not overwrite or remove it.
Also, make sure to start the actual text at the margin.
=======================================================
+* eventdev: Added new API ``rte_event_eth_rx_adapter_event_port_get``,
+ to retrieve event port id of eth rx adapter.
ABI Changes
diff --git a/lib/eventdev/rte_event_eth_rx_adapter.c b/lib/eventdev/rte_event_eth_rx_adapter.c
index f946137b25..ae1e260c08 100644
--- a/lib/eventdev/rte_event_eth_rx_adapter.c
+++ b/lib/eventdev/rte_event_eth_rx_adapter.c
@@ -3123,6 +3123,26 @@ rte_event_eth_rx_adapter_service_id_get(uint8_t id, uint32_t *service_id)
return rx_adapter->service_inited ? 0 : -ESRCH;
}
+int
+rte_event_eth_rx_adapter_event_port_get(uint8_t id, uint8_t *event_port_id)
+{
+ struct event_eth_rx_adapter *rx_adapter;
+
+ if (rxa_memzone_lookup())
+ return -ENOMEM;
+
+ RTE_EVENT_ETH_RX_ADAPTER_ID_VALID_OR_ERR_RET(id, -EINVAL);
+
+ rx_adapter = rxa_id_to_adapter(id);
+ if (rx_adapter == NULL || event_port_id == NULL)
+ return -EINVAL;
+
+ if (rx_adapter->service_inited)
+ *event_port_id = rx_adapter->event_port_id;
+
+ return rx_adapter->service_inited ? 0 : -ESRCH;
+}
+
int
rte_event_eth_rx_adapter_cb_register(uint8_t id,
uint16_t eth_dev_id,
diff --git a/lib/eventdev/rte_event_eth_rx_adapter.h b/lib/eventdev/rte_event_eth_rx_adapter.h
index 9546d792e9..3608a7b2cf 100644
--- a/lib/eventdev/rte_event_eth_rx_adapter.h
+++ b/lib/eventdev/rte_event_eth_rx_adapter.h
@@ -37,6 +37,7 @@
* - rte_event_eth_rx_adapter_queue_conf_get()
* - rte_event_eth_rx_adapter_queue_stats_get()
* - rte_event_eth_rx_adapter_queue_stats_reset()
+ * - rte_event_eth_rx_adapter_event_port_get()
*
* The application creates an ethernet to event adapter using
* rte_event_eth_rx_adapter_create_ext() or rte_event_eth_rx_adapter_create()
@@ -684,6 +685,25 @@ rte_event_eth_rx_adapter_queue_stats_reset(uint8_t id,
uint16_t eth_dev_id,
uint16_t rx_queue_id);
+/**
+ * Retrieve the event port ID of an adapter. If the adapter doesn't use
+ * a rte_service function, this function returns -ESRCH.
+ *
+ * @param id
+ * Adapter identifier.
+ *
+ * @param [out] event_port_id
+ * A pointer to a uint8_t, to be filled in with the port id.
+ *
+ * @return
+ * - 0: Success
+ * - <0: Error code on failure, if the adapter doesn't use a rte_service
+ * function, this function returns -ESRCH.
+ */
+__rte_experimental
+int
+rte_event_eth_rx_adapter_event_port_get(uint8_t id, uint8_t *event_port_id);
+
#ifdef __cplusplus
}
#endif
diff --git a/lib/eventdev/version.map b/lib/eventdev/version.map
index ade1f1182e..cd5dada07f 100644
--- a/lib/eventdev/version.map
+++ b/lib/eventdev/version.map
@@ -105,6 +105,9 @@ EXPERIMENTAL {
rte_event_eth_rx_adapter_queue_conf_get;
rte_event_eth_rx_adapter_queue_stats_get;
rte_event_eth_rx_adapter_queue_stats_reset;
+
+ # added in 22.03
+ rte_event_eth_rx_adapter_event_port_get;
};
INTERNAL {
--
2.25.1
^ permalink raw reply [flat|nested] 6+ messages in thread
* [PATCH v3] eventdev/eth_rx: add event port get api
2022-01-22 17:07 ` [PATCH v2] " Naga Harish K S V
@ 2022-01-22 17:14 ` Naga Harish K S V
2022-01-23 15:32 ` Jerin Jacob
0 siblings, 1 reply; 6+ messages in thread
From: Naga Harish K S V @ 2022-01-22 17:14 UTC (permalink / raw)
To: jerinjacobk, jay.jayatheerthan; +Cc: dev
This patch introduces new api for retrieving event port id
of eth rx adapter.
Signed-off-by: Naga Harish K S V <s.v.naga.harish.k@intel.com>
Acked-by: Jay Jayatheerthan <jay.jayatheerthan@intel.com>
---
v3:
* update commit message head line
v2:
* address review comments
v1:
* initial implementation
---
doc/guides/rel_notes/release_22_03.rst | 2 ++
lib/eventdev/rte_event_eth_rx_adapter.c | 20 ++++++++++++++++++++
lib/eventdev/rte_event_eth_rx_adapter.h | 20 ++++++++++++++++++++
lib/eventdev/version.map | 3 +++
4 files changed, 45 insertions(+)
diff --git a/doc/guides/rel_notes/release_22_03.rst b/doc/guides/rel_notes/release_22_03.rst
index 6d99d1eaa9..288d94c0e6 100644
--- a/doc/guides/rel_notes/release_22_03.rst
+++ b/doc/guides/rel_notes/release_22_03.rst
@@ -83,6 +83,8 @@ API Changes
This section is a comment. Do not overwrite or remove it.
Also, make sure to start the actual text at the margin.
=======================================================
+* eventdev: Added new API ``rte_event_eth_rx_adapter_event_port_get``,
+ to retrieve event port id of eth rx adapter.
ABI Changes
diff --git a/lib/eventdev/rte_event_eth_rx_adapter.c b/lib/eventdev/rte_event_eth_rx_adapter.c
index f946137b25..ae1e260c08 100644
--- a/lib/eventdev/rte_event_eth_rx_adapter.c
+++ b/lib/eventdev/rte_event_eth_rx_adapter.c
@@ -3123,6 +3123,26 @@ rte_event_eth_rx_adapter_service_id_get(uint8_t id, uint32_t *service_id)
return rx_adapter->service_inited ? 0 : -ESRCH;
}
+int
+rte_event_eth_rx_adapter_event_port_get(uint8_t id, uint8_t *event_port_id)
+{
+ struct event_eth_rx_adapter *rx_adapter;
+
+ if (rxa_memzone_lookup())
+ return -ENOMEM;
+
+ RTE_EVENT_ETH_RX_ADAPTER_ID_VALID_OR_ERR_RET(id, -EINVAL);
+
+ rx_adapter = rxa_id_to_adapter(id);
+ if (rx_adapter == NULL || event_port_id == NULL)
+ return -EINVAL;
+
+ if (rx_adapter->service_inited)
+ *event_port_id = rx_adapter->event_port_id;
+
+ return rx_adapter->service_inited ? 0 : -ESRCH;
+}
+
int
rte_event_eth_rx_adapter_cb_register(uint8_t id,
uint16_t eth_dev_id,
diff --git a/lib/eventdev/rte_event_eth_rx_adapter.h b/lib/eventdev/rte_event_eth_rx_adapter.h
index 9546d792e9..3608a7b2cf 100644
--- a/lib/eventdev/rte_event_eth_rx_adapter.h
+++ b/lib/eventdev/rte_event_eth_rx_adapter.h
@@ -37,6 +37,7 @@
* - rte_event_eth_rx_adapter_queue_conf_get()
* - rte_event_eth_rx_adapter_queue_stats_get()
* - rte_event_eth_rx_adapter_queue_stats_reset()
+ * - rte_event_eth_rx_adapter_event_port_get()
*
* The application creates an ethernet to event adapter using
* rte_event_eth_rx_adapter_create_ext() or rte_event_eth_rx_adapter_create()
@@ -684,6 +685,25 @@ rte_event_eth_rx_adapter_queue_stats_reset(uint8_t id,
uint16_t eth_dev_id,
uint16_t rx_queue_id);
+/**
+ * Retrieve the event port ID of an adapter. If the adapter doesn't use
+ * a rte_service function, this function returns -ESRCH.
+ *
+ * @param id
+ * Adapter identifier.
+ *
+ * @param [out] event_port_id
+ * A pointer to a uint8_t, to be filled in with the port id.
+ *
+ * @return
+ * - 0: Success
+ * - <0: Error code on failure, if the adapter doesn't use a rte_service
+ * function, this function returns -ESRCH.
+ */
+__rte_experimental
+int
+rte_event_eth_rx_adapter_event_port_get(uint8_t id, uint8_t *event_port_id);
+
#ifdef __cplusplus
}
#endif
diff --git a/lib/eventdev/version.map b/lib/eventdev/version.map
index ade1f1182e..cd5dada07f 100644
--- a/lib/eventdev/version.map
+++ b/lib/eventdev/version.map
@@ -105,6 +105,9 @@ EXPERIMENTAL {
rte_event_eth_rx_adapter_queue_conf_get;
rte_event_eth_rx_adapter_queue_stats_get;
rte_event_eth_rx_adapter_queue_stats_reset;
+
+ # added in 22.03
+ rte_event_eth_rx_adapter_event_port_get;
};
INTERNAL {
--
2.25.1
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH v3] eventdev/eth_rx: add event port get api
2022-01-22 17:14 ` [PATCH v3] eventdev/eth_rx: " Naga Harish K S V
@ 2022-01-23 15:32 ` Jerin Jacob
0 siblings, 0 replies; 6+ messages in thread
From: Jerin Jacob @ 2022-01-23 15:32 UTC (permalink / raw)
To: Naga Harish K S V; +Cc: Jayatheerthan, Jay, dpdk-dev
On Sat, Jan 22, 2022 at 10:44 PM Naga Harish K S V
<s.v.naga.harish.k@intel.com> wrote:
>
> This patch introduces new api for retrieving event port id
> of eth rx adapter.
>
> Signed-off-by: Naga Harish K S V <s.v.naga.harish.k@intel.com>
> Acked-by: Jay Jayatheerthan <jay.jayatheerthan@intel.com>
>
> ---
> v3:
> * update commit message head line
Applied to dpdk-next-net-eventdev/for-main with the following changes. Thanks
1) api -> API in git commit message
2) Added following in "New Features" section in
doc/guides/rel_notes/release_22_03.rst
* **Added an API to retrieve event port id of eth rx adapter.**
A new API, ``rte_event_eth_rx_adapter_event_port_get()``, was added.
>
> v2:
> * address review comments
>
> v1:
> * initial implementation
> ---
> doc/guides/rel_notes/release_22_03.rst | 2 ++
> lib/eventdev/rte_event_eth_rx_adapter.c | 20 ++++++++++++++++++++
> lib/eventdev/rte_event_eth_rx_adapter.h | 20 ++++++++++++++++++++
> lib/eventdev/version.map | 3 +++
> 4 files changed, 45 insertions(+)
>
> diff --git a/doc/guides/rel_notes/release_22_03.rst b/doc/guides/rel_notes/release_22_03.rst
> index 6d99d1eaa9..288d94c0e6 100644
> --- a/doc/guides/rel_notes/release_22_03.rst
> +++ b/doc/guides/rel_notes/release_22_03.rst
> @@ -83,6 +83,8 @@ API Changes
> This section is a comment. Do not overwrite or remove it.
> Also, make sure to start the actual text at the margin.
> =======================================================
> +* eventdev: Added new API ``rte_event_eth_rx_adapter_event_port_get``,
> + to retrieve event port id of eth rx adapter.
>
>
> ABI Changes
> diff --git a/lib/eventdev/rte_event_eth_rx_adapter.c b/lib/eventdev/rte_event_eth_rx_adapter.c
> index f946137b25..ae1e260c08 100644
> --- a/lib/eventdev/rte_event_eth_rx_adapter.c
> +++ b/lib/eventdev/rte_event_eth_rx_adapter.c
> @@ -3123,6 +3123,26 @@ rte_event_eth_rx_adapter_service_id_get(uint8_t id, uint32_t *service_id)
> return rx_adapter->service_inited ? 0 : -ESRCH;
> }
>
> +int
> +rte_event_eth_rx_adapter_event_port_get(uint8_t id, uint8_t *event_port_id)
> +{
> + struct event_eth_rx_adapter *rx_adapter;
> +
> + if (rxa_memzone_lookup())
> + return -ENOMEM;
> +
> + RTE_EVENT_ETH_RX_ADAPTER_ID_VALID_OR_ERR_RET(id, -EINVAL);
> +
> + rx_adapter = rxa_id_to_adapter(id);
> + if (rx_adapter == NULL || event_port_id == NULL)
> + return -EINVAL;
> +
> + if (rx_adapter->service_inited)
> + *event_port_id = rx_adapter->event_port_id;
> +
> + return rx_adapter->service_inited ? 0 : -ESRCH;
> +}
> +
> int
> rte_event_eth_rx_adapter_cb_register(uint8_t id,
> uint16_t eth_dev_id,
> diff --git a/lib/eventdev/rte_event_eth_rx_adapter.h b/lib/eventdev/rte_event_eth_rx_adapter.h
> index 9546d792e9..3608a7b2cf 100644
> --- a/lib/eventdev/rte_event_eth_rx_adapter.h
> +++ b/lib/eventdev/rte_event_eth_rx_adapter.h
> @@ -37,6 +37,7 @@
> * - rte_event_eth_rx_adapter_queue_conf_get()
> * - rte_event_eth_rx_adapter_queue_stats_get()
> * - rte_event_eth_rx_adapter_queue_stats_reset()
> + * - rte_event_eth_rx_adapter_event_port_get()
> *
> * The application creates an ethernet to event adapter using
> * rte_event_eth_rx_adapter_create_ext() or rte_event_eth_rx_adapter_create()
> @@ -684,6 +685,25 @@ rte_event_eth_rx_adapter_queue_stats_reset(uint8_t id,
> uint16_t eth_dev_id,
> uint16_t rx_queue_id);
>
> +/**
> + * Retrieve the event port ID of an adapter. If the adapter doesn't use
> + * a rte_service function, this function returns -ESRCH.
> + *
> + * @param id
> + * Adapter identifier.
> + *
> + * @param [out] event_port_id
> + * A pointer to a uint8_t, to be filled in with the port id.
> + *
> + * @return
> + * - 0: Success
> + * - <0: Error code on failure, if the adapter doesn't use a rte_service
> + * function, this function returns -ESRCH.
> + */
> +__rte_experimental
> +int
> +rte_event_eth_rx_adapter_event_port_get(uint8_t id, uint8_t *event_port_id);
> +
> #ifdef __cplusplus
> }
> #endif
> diff --git a/lib/eventdev/version.map b/lib/eventdev/version.map
> index ade1f1182e..cd5dada07f 100644
> --- a/lib/eventdev/version.map
> +++ b/lib/eventdev/version.map
> @@ -105,6 +105,9 @@ EXPERIMENTAL {
> rte_event_eth_rx_adapter_queue_conf_get;
> rte_event_eth_rx_adapter_queue_stats_get;
> rte_event_eth_rx_adapter_queue_stats_reset;
> +
> + # added in 22.03
> + rte_event_eth_rx_adapter_event_port_get;
> };
>
> INTERNAL {
> --
> 2.25.1
>
^ permalink raw reply [flat|nested] 6+ messages in thread