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/cli.c | |
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/cli.c')
-rwxr-xr-x | src/plugins/odp/cli.c | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/src/plugins/odp/cli.c b/src/plugins/odp/cli.c index e965022e..4da921a0 100755 --- a/src/plugins/odp/cli.c +++ b/src/plugins/odp/cli.c @@ -26,7 +26,8 @@ odp_packet_create_command_fn (vlib_main_t * vm, unformat_input_t * input, u8 hwaddr[6]; u8 *hw_addr_ptr = 0; u32 sw_if_index; - u32 mode = 0; + u32 mode = APPL_MODE_PKT_BURST; + u32 rx_queues = 0; int r; if (!unformat_user (input, unformat_line_input, line_input)) @@ -43,6 +44,8 @@ odp_packet_create_command_fn (vlib_main_t * vm, unformat_input_t * input, hw_addr_ptr = hwaddr; else if (unformat (line_input, "mode %d", &mode)) ; + else if (unformat (line_input, "rx-queues %d", &rx_queues)) + ; else return clib_error_return (0, "unknown input `%U'", format_unformat_error, input); @@ -52,8 +55,8 @@ odp_packet_create_command_fn (vlib_main_t * vm, unformat_input_t * input, if (host_if_name == NULL) return clib_error_return (0, "missing host interface name"); - r = - odp_packet_create_if (vm, host_if_name, hw_addr_ptr, &sw_if_index, mode); + r = odp_packet_create_if (vm, host_if_name, hw_addr_ptr, &sw_if_index, + mode, rx_queues); vec_free (host_if_name); if (r == VNET_API_ERROR_SYSCALL_ERROR_1) |