[PATCH] net/ice/base: support customized DDP package
Su, Simei
simei.su at intel.com
Tue Jun 6 11:24:09 CEST 2023
This patch is for customized DDP package based on DPDK 23.03.
Customer use a custom package and a custom kernel driver, so DPDK won't upstream it.
> -----Original Message-----
> From: Su, Simei <simei.su at intel.com>
> Sent: Monday, June 5, 2023 5:38 PM
> To: Zhang, Qi Z <qi.z.zhang at intel.com>; Yang, Qiming
> <qiming.yang at intel.com>
> Cc: dev at dpdk.org; Su, Simei <simei.su at intel.com>
> Subject: [PATCH] net/ice/base: support customized DDP package
>
> This patch adds support for custom DDP version 255.4.0.0.
>
> Signed-off-by: Simei Su <simei.su at intel.com>
> ---
> drivers/net/ice/base/ice_ddp.c | 41 ++++++++++++++++++++++++++++++----
> drivers/net/ice/base/ice_ddp.h | 1 +
> 2 files changed, 38 insertions(+), 4 deletions(-)
>
> diff --git a/drivers/net/ice/base/ice_ddp.c b/drivers/net/ice/base/ice_ddp.c
> index d1cae48047..7164a600b4 100644
> --- a/drivers/net/ice/base/ice_ddp.c
> +++ b/drivers/net/ice/base/ice_ddp.c
> @@ -1014,15 +1014,32 @@ void ice_free_seg(struct ice_hw *hw) }
>
> /**
> - * ice_chk_pkg_version - check package version for compatibility with driver
> + * ice_chk_pkg_vesrion_customize - check package version for GRE_EXTEND
> + support
> * @pkg_ver: pointer to a version structure to check
> *
> - * Check to make sure that the package about to be downloaded is compatible
> with
> - * the driver. To be compatible, the major and minor components of the
> package
> + * To be compatible, the major and minor components of the package
> * version must match our ICE_PKG_SUPP_VER_MAJ and
> ICE_PKG_SUPP_VER_MNR
> * definitions.
> */
> -static enum ice_ddp_state ice_chk_pkg_version(struct ice_pkg_ver *pkg_ver)
> +static enum ice_ddp_state
> +ice_chk_pkg_vesrion_customize(struct ice_pkg_ver *pkg_ver) {
> + if (pkg_ver->major == ICE_PKG_SUPP_VER_CUSTOM_MAJ)
> + return ICE_DDP_PKG_SUCCESS;
> + else
> + return ICE_DDP_PKG_ERR;
> +}
> +
> +/**
> + * ice_chk_pkg_vesrion_general - check package version for general
> +package
> + * @pkg_ver: pointer to a version structure to check
> + *
> + * To be compatible, the major and minor components of the package
> + * version must match our ICE_PKG_SUPP_VER_MAJ and
> ICE_PKG_SUPP_VER_MNR
> + * definitions.
> + */
> +static enum ice_ddp_state
> +ice_chk_pkg_vesrion_general(struct ice_pkg_ver *pkg_ver)
> {
> if (pkg_ver->major > ICE_PKG_SUPP_VER_MAJ ||
> (pkg_ver->major == ICE_PKG_SUPP_VER_MAJ && @@ -1036,6
> +1053,22 @@ static enum ice_ddp_state ice_chk_pkg_version(struct
> ice_pkg_ver *pkg_ver)
> return ICE_DDP_PKG_SUCCESS;
> }
>
> +/**
> + * ice_chk_pkg_version - check package version for compatibility with
> +driver
> + * @pkg_ver: pointer to a version structure to check
> + *
> + * Check to make sure that the package about to be downloaded is
> +compatible with
> + * the driver.
> + */
> +static enum ice_ddp_state ice_chk_pkg_version(struct ice_pkg_ver
> +*pkg_ver) {
> + if (!ice_chk_pkg_vesrion_general(pkg_ver) ||
> + !ice_chk_pkg_vesrion_customize(pkg_ver))
> + return ICE_DDP_PKG_SUCCESS;
> + else
> + return ICE_DDP_PKG_ERR;
> +}
> +
> /**
> * ice_chk_pkg_compat
> * @hw: pointer to the hardware structure diff --git
> a/drivers/net/ice/base/ice_ddp.h b/drivers/net/ice/base/ice_ddp.h index
> 53bbbe2a5a..b8d79e89ac 100644
> --- a/drivers/net/ice/base/ice_ddp.h
> +++ b/drivers/net/ice/base/ice_ddp.h
> @@ -15,6 +15,7 @@
> /* Package minimal version supported */
> #define ICE_PKG_SUPP_VER_MAJ 1
> #define ICE_PKG_SUPP_VER_MNR 3
> +#define ICE_PKG_SUPP_VER_CUSTOM_MAJ 255
>
> /* Package format version */
> #define ICE_PKG_FMT_VER_MAJ 1
> --
> 2.25.1
More information about the dev
mailing list