> -----Original Message-----
> From: Guo, Junfeng <[email protected]>
> Sent: Tuesday, October 26, 2021 8:01 PM
> To: Zhang, Qi Z <[email protected]>; Wu, Jingjing <[email protected]>;
> Xing, Beilei <[email protected]>
> Cc: [email protected]; Yigit, Ferruh <[email protected]>; Wang, Haiyue
> <[email protected]>; Yan, Zhirun <[email protected]>; Guo, Junfeng
> <[email protected]>
> Subject: [PATCH v4 2/4] net/ice/base: add function to set HW profile for raw
> flow
>
> Based on the parser library, we can directly set HW profile and associate the
> main/ctrl vsi.
>
> Signed-off-by: Junfeng Guo <[email protected]>
> ---
> drivers/net/ice/base/ice_flex_pipe.c | 55 ++++++++++++++++++
> drivers/net/ice/base/ice_flex_pipe.h | 4 ++
> drivers/net/ice/base/ice_flow.c | 85 ++++++++++++++++++++++++++++
> drivers/net/ice/base/ice_flow.h | 4 ++
> 4 files changed, 148 insertions(+)
>
> diff --git a/drivers/net/ice/base/ice_flex_pipe.c
> b/drivers/net/ice/base/ice_flex_pipe.c
> index 06a233990f..030655f3f0 100644
> --- a/drivers/net/ice/base/ice_flex_pipe.c
> +++ b/drivers/net/ice/base/ice_flex_pipe.c
> @@ -6365,3 +6365,58 @@ ice_rem_prof_id_flow(struct ice_hw *hw, enum
> ice_block blk, u16 vsi, u64 hdl)
>
> return status;
> }
> +
> +/**
> + * ice_flow_assoc_hw_prof - add profile id flow for main/ctrl VSI flow
> +entry
> + * @hw: pointer to the HW struct
> + * @blk: HW block
> + * @dest_vsi_handle: dest VSI handle
> + * @fdir_vsi_handle: fdir programming VSI handle
> + * @id: profile id (handle)
> + * @fv_found: found fv in fdir fv list
> + *
> + * Calling this function will update the hardware tables to enable the
> + * profile indicated by the ID parameter for the VSIs specified in the
> +VSI
> + * array. Once successfully called, the flow will be enabled.
> + */
> +enum ice_status
> +ice_flow_assoc_hw_prof(struct ice_hw *hw, enum ice_block blk,
> + u16 dest_vsi_handle, u16 fdir_vsi_handle, int id,
> + bool fv_found)
Do we really need this fv_found parameter?
If fv_found is true, seems nothing has been done in this function, why not just
check the flag outside the function?