* [RFC DPDK 21.11] net/ice/base: support customized DDP package
@ 2023-06-05 10:25 Simei Su
0 siblings, 0 replies; only message in thread
From: Simei Su @ 2023-06-05 10:25 UTC (permalink / raw)
To: qi.z.zhang, qiming.yang; +Cc: dev, Simei Su
This patch adds support for custom DDP version 255.4.0.0
based on DPDK 21.11.
Signed-off-by: Simei Su <simei.su@intel.com>
---
drivers/net/ice/base/ice_flex_pipe.c | 43 +++++++++++++++++++++++++---
drivers/net/ice/base/ice_flex_pipe.h | 1 +
2 files changed, 40 insertions(+), 4 deletions(-)
diff --git a/drivers/net/ice/base/ice_flex_pipe.c b/drivers/net/ice/base/ice_flex_pipe.c
index 395787806b..38976df106 100644
--- a/drivers/net/ice/base/ice_flex_pipe.c
+++ b/drivers/net/ice/base/ice_flex_pipe.c
@@ -1457,15 +1457,32 @@ static void ice_init_pkg_regs(struct ice_hw *hw)
}
/**
- * ice_chk_pkg_version - check package version for compatibility with driver
+ * ice_chk_pkg_vesrion_customize - check package version for custom package
* @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_status ice_chk_pkg_version(struct ice_pkg_ver *pkg_ver)
+static enum ice_status
+ice_chk_pkg_vesrion_customize(struct ice_pkg_ver *pkg_ver)
+{
+ if (pkg_ver->major == ICE_PKG_SUPP_VER_CUSTOM_MAJ)
+ return ICE_SUCCESS;
+ else
+ return ICE_ERR_NOT_SUPPORTED;
+}
+
+/**
+ * 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_status
+ice_chk_pkg_vesrion_general(struct ice_pkg_ver *pkg_ver)
{
if (pkg_ver->major != ICE_PKG_SUPP_VER_MAJ ||
pkg_ver->minor != ICE_PKG_SUPP_VER_MNR)
@@ -1474,6 +1491,24 @@ static enum ice_status ice_chk_pkg_version(struct ice_pkg_ver *pkg_ver)
return ICE_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. 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_status 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_SUCCESS;
+ else
+ return ICE_ERR_NOT_SUPPORTED;
+}
+
/**
* ice_chk_pkg_compat
* @hw: pointer to the hardware structure
diff --git a/drivers/net/ice/base/ice_flex_pipe.h b/drivers/net/ice/base/ice_flex_pipe.h
index 23ba45564a..2e0f4bed7f 100644
--- a/drivers/net/ice/base/ice_flex_pipe.h
+++ b/drivers/net/ice/base/ice_flex_pipe.h
@@ -10,6 +10,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
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2023-06-05 10:25 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-06-05 10:25 [RFC DPDK 21.11] net/ice/base: support customized DDP package Simei Su
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).