Added capability structure and a function to query it. Capability limits are used for advanced pktio configuration, like configuration of multiple input/output queues.
Signed-off-by: Petri Savolainen <petri.savolai...@nokia.com> --- include/odp/api/packet_io.h | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) diff --git a/include/odp/api/packet_io.h b/include/odp/api/packet_io.h index 9409388..264fa75 100644 --- a/include/odp/api/packet_io.h +++ b/include/odp/api/packet_io.h @@ -98,6 +98,16 @@ typedef struct odp_pktio_param_t { } odp_pktio_param_t; /** + * Packet IO capabilities + */ +typedef struct odp_pktio_capability_t { + /** Maximum number of input queues */ + unsigned max_input_queues; + /** Maximum number of output queues */ + unsigned max_output_queues; +} odp_pktio_capability_t; + +/** * Open a packet IO interface * * An ODP program can open a single packet IO interface per device, attempts @@ -135,6 +145,19 @@ odp_pktio_t odp_pktio_open(const char *dev, odp_pool_t pool, const odp_pktio_param_t *param); /** + * Query packet IO interface capabilities + * + * Outputs packet IO interface capabilities on success. + * + * @param pktio Packet IO handle + * @param[out] capa Pointer to capability structure for output + * + * @retval 0 on success + * @retval <0 on failure + */ +int odp_pktio_capability(odp_pktio_t pktio, odp_pktio_capability_t *capa); + +/** * Start packet receive and transmit * * Activate packet receive and transmit on a previously opened or stopped -- 2.6.2 _______________________________________________ lng-odp mailing list lng-odp@lists.linaro.org https://lists.linaro.org/mailman/listinfo/lng-odp