interface: support configuring RSS steering queues
This patch adds the RSS steering queues set interface, and it's
implementation in DPDK device:
/* Interface to set rss queues of the interface */
typedef clib_error_t *(vnet_interface_rss_queues_set_t)
(struct vnet_main_t * vnm, struct vnet_hw_interface_t * hi,
clib_bitmap_t *bitmap);
This patch also introduces a command line to set the RSS queues:
set interface rss queues <interface> <list <queue-list>>
To display the rss queues, use "show hardware-interfaces"
Below is the example to configure rss queues for interface Gig0:
vpp# set interface rss queues Gig0 list 0,2,4-7
vpp# show hardware-interfaces brief
Name Idx Link Hardware
VirtualFunctionEthernet18/1/0 1 down VirtualFunctionEthernet18/1/0
Link speed: unknown
RSS queues: 0 2 4 5 6 7
local0 0 down local0
Link speed: unknown
vpp#
Users can also configure the rss queues on a dpdk interface in
startup.conf:
dpdk {
dev 0000:18:01.0 {
rss-queues 0,2,5-7
}
}
Type: feature
Signed-off-by: Chenmin Sun <chenmin.sun@intel.com>
Change-Id: I1835595a1c54016a84eabee9fd62ce137935385d
diff --git a/src/vnet/interface.h b/src/vnet/interface.h
index 07da261..895ce2e 100644
--- a/src/vnet/interface.h
+++ b/src/vnet/interface.h
@@ -88,6 +88,11 @@
(struct vnet_main_t * vnm, struct vnet_hw_interface_t * hi,
i32 l2_if_adjust);
+/* Interface to set rss queues of the interface */
+typedef clib_error_t *(vnet_interface_rss_queues_set_t)
+ (struct vnet_main_t * vnm, struct vnet_hw_interface_t * hi,
+ clib_bitmap_t * bitmap);
+
typedef enum
{
VNET_FLOW_DEV_OP_ADD_FLOW,
@@ -273,6 +278,10 @@
/* Function to add/delete additional MAC addresses */
vnet_interface_add_del_mac_address_function_t *mac_addr_add_del_function;
+
+ /* Interface to set rss queues of the interface */
+ vnet_interface_rss_queues_set_t *set_rss_queues_function;
+
} vnet_device_class_t;
#ifndef CLIB_MARCH_VARIANT
@@ -601,6 +610,9 @@
/* numa node that hardware device connects to */
u8 numa_node;
+ /* rss queues bitmap */
+ clib_bitmap_t *rss_queues;
+
/* trace */
i32 n_trace;