net/ice/base: support customized DDP package
PATCH 1/1 net/ice/base: support customized DDP package
This patch adds support for custom DDP version 255.4.0.0.
--- drivers/net/ice/base/ice_ddp.c | 41 ++++++++++++++++++++++++++++++---- drivers/net/ice/base/ice_ddp.h | 1 + 2 files changed, 38 insertions(+), 4 deletions(-)
drivers/net/ice/base/ice_ddp.c +37 -4
@@ -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
drivers/net/ice/base/ice_ddp.h +1 -0
@@ -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
Signature · 1 line
2.25.1
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.
Quoted 101 lines
-----Original Message-----
From: Su, Simei <[email protected]>
Sent: Monday, June 5, 2023 5:38 PM
To: Zhang, Qi Z <[email protected]>; Yang, Qiming <[email protected]>
Cc: [email protected]; Su, Simei <[email protected]>
Subject: [PATCH]net/ice/base: support customized DDP packageThis patch adds support for custom DDP version 255.4.0.0.
Signed-off-by Simei Su <[email protected]>--- drivers/net/ice/base/ice_ddp.c | 41 ++++++++++++++++++++++++++++++---- drivers/net/ice/base/ice_ddp.h | 1 + 2 files changed, 38 insertions(+), 4 deletions(-)drivers/net/ice/base/ice_ddp.c +2
-2@@ -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 ourICE_PKG_SUPP_VER_MAJandICE_PKG_SUPP_VER_MNR
* definitions.
*/drivers/net/ice/base/ice_ddp.c +15
-1-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.
+ */drivers/net/ice/base/ice_ddp.c +3
-0+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)drivers/net/ice/base/ice_ddp.c +18
-0return 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.hb/drivers/net/ice/base/ice_ddp.hindex53bbbe2a5a..b8d79e89ac100644drivers/net/ice/base/ice_ddp.h +1
-1@@ -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