From a6d16b71308f1badf4b362d26d2326a2977fe462 Mon Sep 17 00:00:00 2001 From: Ting Xu Date: Fri, 21 Oct 2022 16:48:44 +0800 Subject: avf: support generic flow Support generic flow in native avf. Enable necessary RSS hash function for generic flow. Extend some structures and functions from for FDIR only to for both RSS and FDIR flows. Modify virtual channel message to align with ice kernel driver. Add functions to parse generic flow patterns. The parsing results will be delivered to the kernel driver and create corresponding flow rules. Type: feature Signed-off-by: Ting Xu Change-Id: I82ce102a21993f1bae8a8bf23e491d5e1c261f61 --- src/plugins/avf/avf.h | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) (limited to 'src/plugins/avf/avf.h') diff --git a/src/plugins/avf/avf.h b/src/plugins/avf/avf.h index a1da4c8866b..293a1a89937 100644 --- a/src/plugins/avf/avf.h +++ b/src/plugins/avf/avf.h @@ -19,6 +19,7 @@ #define _AVF_H_ #include +#include #include #include @@ -37,6 +38,7 @@ #define AVF_AQ_ENQ_SUSPEND_TIME 50e-6 #define AVF_AQ_ENQ_MAX_WAIT_TIME 250e-3 +#define AVF_AQ_BUF_SIZE 4096 #define AVF_RESET_SUSPEND_TIME 20e-3 #define AVF_RESET_MAX_WAIT_TIME 1 @@ -202,7 +204,9 @@ typedef struct { u32 flow_index; u32 mark; + u8 flow_type_flag; struct avf_fdir_conf *rcfg; + struct virtchnl_rss_cfg *rss_cfg; } avf_flow_entry_t; typedef struct @@ -291,6 +295,7 @@ typedef struct u32 calling_process_index; u8 eth_addr[6]; int is_add, is_enable; + enum virthnl_adv_ops vc_op; /* below parameters are used for 'program flow' event */ u8 *rule; @@ -349,7 +354,8 @@ extern vlib_node_registration_t avf_input_node; extern vlib_node_registration_t avf_process_node; extern vnet_device_class_t avf_device_class; -clib_error_t *avf_program_flow (u32 dev_instance, int is_add, u8 *rule, +clib_error_t *avf_program_flow (u32 dev_instance, int is_add, + enum virthnl_adv_ops vc_op, u8 *rule, u32 rule_len, u8 *program_status, u32 status_len); -- cgit 1.2.3-korg