Go to the source code of this file.
|
int | dao_portq_group_init (uint32_t num_portq_groups) |
|
int | dao_portq_group_create (const char *portq_name, uint32_t num_cores, uint32_t num_portqs, dao_portq_group_t *epg) |
|
int | dao_portq_group_get_by_name (const char *portq_name, dao_portq_group_t *epg) |
|
int | dao_portq_group_portq_add (dao_portq_group_t epg, uint32_t core_id, dao_portq_t *portq, int32_t *returned_index) |
|
int | dao_portq_group_portq_get (dao_portq_group_t epg, uint32_t core_id, int32_t returned_index, dao_portq_t *portq) |
|
int | dao_portq_group_portq_get_num (dao_portq_group_t epg, uint32_t core_id, uint32_t *num_ports) |
|
int | dao_portq_group_portq_delete (dao_portq_group_t epg, uint32_t core_id, int32_t returned_index) |
|
int | dao_portq_group_destroy (dao_portq_group_t epg) |
|
dao_portq_group.h
Control Path PortQ [port, queue] group APIs
Definition in file dao_portq_group.h.
◆ DAO_PORTQ_GROUP_INITIALIZER
◆ dao_portq_group_t
◆ dao_portq_t
DAO Port-queue aka combination of [port, rq_id]
◆ dao_portq_group_init()
int dao_portq_group_init |
( |
uint32_t |
num_portq_groups | ) |
|
Port queue group library
Port queue group library allow applications to poll list-of [port, queue] (dao_portq_t) per core in fast path.
In a typical fast path processing, each worker core calls rte_eth_rx_burst() for combination of [port/ethdev, rq_id] assigned to each core via RSS based scheme. In a runtime environment, number of ethdevs/port can change based on how many of them are newly probed or unprobed. This library facilitates maintaining [port, queue] per worker core as per any change in control path actions.
This file declares control path APIs for Portq group object:
Maintenance of dao_portq_t (aka [port, rq_id]) in a portq_group per core:
If not explicitly called, dao_portq_group_create() internally calls with default value of num_portq_groups
- Parameters
-
num_portq_groups | Initialize dao portq main library to support num_portq_groups |
- Returns
- <0: Failure 0: Success
◆ dao_portq_group_create()
int dao_portq_group_create |
( |
const char * |
portq_name, |
|
|
uint32_t |
num_cores, |
|
|
uint32_t |
num_portqs, |
|
|
dao_portq_group_t * |
epg |
|
) |
| |
Create portq_group object
- Parameters
-
| portq_name | Name of portq group |
| num_cores | Number of worker cores for which dao_portq_t to be maintained |
| num_portqs | Number of dao_portq_t per core. |
[out] | epg | Pointer to dao_portq_group_t. Valid when return is success |
- Returns
- <0: Failure 0: Success
◆ dao_portq_group_get_by_name()
Get portq_group object by name
- Parameters
-
| portq_name | Name of portq group |
[out] | epg | Pointer to dao_portq_group_t. Valid when return is SUCCESS |
- Returns
- <0: Failure 0: Success
◆ dao_portq_group_portq_add()
Add dao_portq_t to portq_group object for a core
- Parameters
-
| epg | dao_portq_group_t object |
| core_id | Core_id ranging from 0 to "num_cores-1" ("num_cores" provided in dao_portq_group_create()) |
| portq | Pointer to dao_portq_t provided by caller |
[out] | returned_index | Returned index where portq is added. Valid when return is SUCCESS |
- Returns
- <0: Failure 0: Success
◆ dao_portq_group_portq_get()
Get dao_portq_t for a core using returned index
- Parameters
-
| epg | dao_portq_group_t object |
| core_id | Core_id ranging from 0 to "num_cores-1" ("num_cores" provided in dao_portq_group_create()) |
| returned_index | Returned index where portq is added |
[out] | portq | Pointer to dao_portq_t provided by caller. Valid if return is SUCCESS |
- Returns
- <0: Failure 0: Success
◆ dao_portq_group_portq_get_num()
int dao_portq_group_portq_get_num |
( |
dao_portq_group_t |
epg, |
|
|
uint32_t |
core_id, |
|
|
uint32_t * |
num_ports |
|
) |
| |
Get number of dao_portq_t for a core in a portq_group object
- Parameters
-
| epg | dao_portq_group_t object |
| core_id | Core_id ranging from 0 to "num_cores-1" ("num_cores" provided in dao_portq_group_create()) |
[out] | num_ports | Pointer to num_ports set by API. Valid if API returns successfully |
- Returns
- <0: Failure 0: Success
◆ dao_portq_group_portq_delete()
int dao_portq_group_portq_delete |
( |
dao_portq_group_t |
epg, |
|
|
uint32_t |
core_id, |
|
|
int32_t |
returned_index |
|
) |
| |
Delete dao_portq_t for a core using returned index
- Parameters
-
epg | dao_portq_group_t object |
core_id | Core_id ranging from 0 to "num_cores-1" ("num_cores" provided in dao_portq_group_create()) |
returned_index | Returned index where portq is added |
- Returns
- <0: Failure 0: Success
◆ dao_portq_group_destroy()
Delete portq_group object
<0: Failure 0: Success