DPDK patches and discussions
 help / color / mirror / Atom feed
From: Simei Su <simei.su@intel.com>
To: qi.z.zhang@intel.com, qiming.yang@intel.com
Cc: dev@dpdk.org, Simei Su <simei.su@intel.com>
Subject: [RFC DPDK 21.11] net/ice/base: support customized DDP package
Date: Mon,  5 Jun 2023 18:25:04 +0800	[thread overview]
Message-ID: <20230605102504.2434887-1-simei.su@intel.com> (raw)

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


                 reply	other threads:[~2023-06-05 10:25 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20230605102504.2434887-1-simei.su@intel.com \
    --to=simei.su@intel.com \
    --cc=dev@dpdk.org \
    --cc=qi.z.zhang@intel.com \
    --cc=qiming.yang@intel.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).