From b95e6d4e75be250629b69e18290f866b1a737a41 Mon Sep 17 00:00:00 2001 From: Ting Xu Date: Fri, 25 Mar 2022 03:45:07 +0000 Subject: flow: enable RSS queue group action for 5G enhancement Enable the flow action for RSS queue group. Packets can be distributed among queues in group based on specific fields. Queues must be continous in the group. This feature is to support 5G enhancement requirement. Type: feature Signed-off-by: Ting Xu Change-Id: I74fdc617659bcb61f00b3b1934c95ab1c73bb8f3 --- src/vnet/flow/flow_cli.c | 19 ++++++++++++++++++- 1 file changed, 18 insertions(+), 1 deletion(-) (limited to 'src/vnet/flow/flow_cli.c') diff --git a/src/vnet/flow/flow_cli.c b/src/vnet/flow/flow_cli.c index f3e6c3912bd..5f44a099f57 100644 --- a/src/vnet/flow/flow_cli.c +++ b/src/vnet/flow/flow_cli.c @@ -364,6 +364,7 @@ test_flow (vlib_main_t * vm, unformat_input_t * input, int rv; u32 teid = 0, session_id = 0, spi = 0; u32 vni = 0; + u32 queue_start = 0, queue_end = 0; vnet_flow_type_t type = VNET_FLOW_TYPE_UNKNOWN; ip4_address_and_mask_t ip4s = { }; ip4_address_and_mask_t ip4d = { }; @@ -522,6 +523,21 @@ test_flow (vlib_main_t * vm, unformat_input_t * input, #undef _ flow.actions |= VNET_FLOW_ACTION_RSS; } + else if (unformat (line_input, "rss queues")) + { + if (unformat (line_input, "%d to %d", &queue_start, &queue_end)) + ; + else + { + return clib_error_return (0, "unknown input `%U'", + format_unformat_error, line_input); + } + + flow.queue_index = queue_start; + flow.queue_num = queue_end - queue_start + 1; + + flow.actions |= VNET_FLOW_ACTION_RSS; + } else if (unformat (line_input, "%U", unformat_vnet_hw_interface, vnm, &hw_if_index)) ; @@ -728,7 +744,8 @@ VLIB_CLI_COMMAND (test_flow_command, static) = { "[spec ] [mask ]" "[next-node ] [mark ] [buffer-advance ] " "[redirect-to-queue ] [drop] " - "[rss function ] [rss types ]", + "[rss function ] [rss types ]" + "[rss queues to ]", .function = test_flow, }; /* *INDENT-ON* */ -- cgit 1.2.3-korg