diff options
author | Michal Mazur <mkm@semihalf.com> | 2017-09-19 20:18:41 +0200 |
---|---|---|
committer | Michal Mazur <mkm@semihalf.com> | 2017-12-14 15:18:05 +0100 |
commit | 7e1f3998634c89aa6344468d26df0de519578a5f (patch) | |
tree | faa92641c1f2c5e4c330d522bfa08e4ffa6d2e91 /src/plugins/odp/odp_packet.h | |
parent | 0c552959dc425c5f00499d6a587d16275a6399db (diff) |
Add support for multiple Rx and Tx queues
1) Incoming packets can be spread across multiple worker
threads based on IP and TCP/UDP headers.
2) Multiple output queues are used in Burst mode if supported
by hardware (checked in interface capabilities)
3) Synchronization of output traffic can be disabled due to
multiple Tx queues - one for each thread.
Change-Id: Ib5ee18103c860eae3b56ffc453a5953c729bb521
Signed-off-by: Michal Mazur <mkm@semihalf.com>
Diffstat (limited to 'src/plugins/odp/odp_packet.h')
-rwxr-xr-x | src/plugins/odp/odp_packet.h | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/src/plugins/odp/odp_packet.h b/src/plugins/odp/odp_packet.h index f9c793bd..81b4a8e2 100755 --- a/src/plugins/odp/odp_packet.h +++ b/src/plugins/odp/odp_packet.h @@ -16,6 +16,7 @@ #define APPL_MODE_PKT_SCHED 2 #define MAX_WORKERS 32 +#define MAX_QUEUES (MAX_WORKERS + 1) typedef struct { @@ -31,6 +32,12 @@ typedef struct u32 per_interface_next_index; u8 is_admin_up; u32 mode; + odp_queue_t rxq[MAX_QUEUES]; + odp_pktin_queue_t inq[MAX_QUEUES]; + odp_pktout_queue_t outq[MAX_QUEUES]; + odp_queue_t txq[MAX_QUEUES]; + u16 rx_queues; + u16 tx_queues; } odp_packet_if_t; typedef struct @@ -53,7 +60,8 @@ extern vnet_device_class_t odp_packet_device_class; extern vlib_node_registration_t odp_packet_input_node; u32 odp_packet_create_if (vlib_main_t * vm, u8 * host_if_name, - u8 * hw_addr_set, u32 * sw_if_index, u32 mode); + u8 * hw_addr_set, u32 * sw_if_index, u32 mode, + u32 rx_queues); u32 odp_packet_delete_if (vlib_main_t * vm, u8 * host_if_name); u32 drop_err_pkts (odp_packet_t pkt_tbl[], u32 len); |