From: Simei Su <simei.su@intel.com>
To: qi.z.zhang@intel.com
Cc: dev@dpdk.org, haiyue.wang@intel.com, jia.guo@intel.com,
yahui.cao@intel.com, Simei Su <simei.su@intel.com>
Subject: [dpdk-dev] [PATCH] net/ice: add GTP over GRE package name
Date: Wed, 16 Dec 2020 19:38:32 +0800 [thread overview]
Message-ID: <20201216113832.423273-1-simei.su@intel.com> (raw)
Add new GTPoGRE package name and handle the new package when
initializing each flow engine.
Signed-off-by: Simei Su <simei.su@intel.com>
---
drivers/net/ice/ice_ethdev.c | 4 ++++
drivers/net/ice/ice_ethdev.h | 1 +
drivers/net/ice/ice_fdir_filter.c | 4 ++++
drivers/net/ice/ice_hash.c | 4 ++++
drivers/net/ice/ice_switch_filter.c | 8 ++++++++
5 files changed, 21 insertions(+)
diff --git a/drivers/net/ice/ice_ethdev.c b/drivers/net/ice/ice_ethdev.c
index 9a5d6a5..9fd69b6 100644
--- a/drivers/net/ice/ice_ethdev.c
+++ b/drivers/net/ice/ice_ethdev.c
@@ -72,6 +72,7 @@ static struct proto_xtr_ol_flag ice_proto_xtr_ol_flag_params[] = {
#define ICE_OS_DEFAULT_PKG_NAME "ICE OS Default Package"
#define ICE_COMMS_PKG_NAME "ICE COMMS Package"
+#define ICE_GTP_OVER_GRE_PKG_NAME "ICE GTP over GRE Package"
#define ICE_MAX_RES_DESC_NUM 1024
static int ice_dev_configure(struct rte_eth_dev *dev);
@@ -1807,6 +1808,9 @@ ice_load_pkg_type(struct ice_hw *hw)
else if (!strncmp((char *)hw->active_pkg_name, ICE_COMMS_PKG_NAME,
ICE_PKG_NAME_SIZE))
package_type = ICE_PKG_TYPE_COMMS;
+ else if (!strncmp((char *)hw->active_pkg_name,
+ ICE_GTP_OVER_GRE_PKG_NAME, ICE_PKG_NAME_SIZE))
+ package_type = ICE_PKG_TYPE_GTP_OVER_GRE;
else
package_type = ICE_PKG_TYPE_UNKNOWN;
diff --git a/drivers/net/ice/ice_ethdev.h b/drivers/net/ice/ice_ethdev.h
index 899f446..a558936 100644
--- a/drivers/net/ice/ice_ethdev.h
+++ b/drivers/net/ice/ice_ethdev.h
@@ -147,6 +147,7 @@ enum ice_pkg_type {
ICE_PKG_TYPE_UNKNOWN,
ICE_PKG_TYPE_OS_DEFAULT,
ICE_PKG_TYPE_COMMS,
+ ICE_PKG_TYPE_GTP_OVER_GRE,
};
struct ice_adapter;
diff --git a/drivers/net/ice/ice_fdir_filter.c b/drivers/net/ice/ice_fdir_filter.c
index 175abcd..1c51593 100644
--- a/drivers/net/ice/ice_fdir_filter.c
+++ b/drivers/net/ice/ice_fdir_filter.c
@@ -1115,6 +1115,8 @@ ice_fdir_init(struct ice_adapter *ad)
parser = &ice_fdir_parser_comms;
else if (ad->active_pkg_type == ICE_PKG_TYPE_OS_DEFAULT)
parser = &ice_fdir_parser_os;
+ else if (ad->active_pkg_type == ICE_PKG_TYPE_GTP_OVER_GRE)
+ parser = &ice_fdir_parser_comms;
else
return -EINVAL;
@@ -1132,6 +1134,8 @@ ice_fdir_uninit(struct ice_adapter *ad)
if (ad->active_pkg_type == ICE_PKG_TYPE_COMMS)
parser = &ice_fdir_parser_comms;
+ else if (ad->active_pkg_type == ICE_PKG_TYPE_GTP_OVER_GRE)
+ parser = &ice_fdir_parser_comms;
else
parser = &ice_fdir_parser_os;
diff --git a/drivers/net/ice/ice_hash.c b/drivers/net/ice/ice_hash.c
index fe3e06c..a5896c6 100644
--- a/drivers/net/ice/ice_hash.c
+++ b/drivers/net/ice/ice_hash.c
@@ -950,6 +950,8 @@ ice_hash_init(struct ice_adapter *ad)
parser = &ice_hash_parser_os;
else if (ad->active_pkg_type == ICE_PKG_TYPE_COMMS)
parser = &ice_hash_parser_comms;
+ else if (ad->active_pkg_type == ICE_PKG_TYPE_GTP_OVER_GRE)
+ parser = &ice_hash_parser_comms;
else
return -EINVAL;
@@ -1356,6 +1358,8 @@ ice_hash_uninit(struct ice_adapter *ad)
ice_unregister_parser(&ice_hash_parser_os, ad);
else if (ad->active_pkg_type == ICE_PKG_TYPE_COMMS)
ice_unregister_parser(&ice_hash_parser_comms, ad);
+ else if (ad->active_pkg_type == ICE_PKG_TYPE_GTP_OVER_GRE)
+ ice_unregister_parser(&ice_hash_parser_comms, ad);
}
static void
diff --git a/drivers/net/ice/ice_switch_filter.c b/drivers/net/ice/ice_switch_filter.c
index 8cba6eb..14c0d5c 100644
--- a/drivers/net/ice/ice_switch_filter.c
+++ b/drivers/net/ice/ice_switch_filter.c
@@ -1863,12 +1863,16 @@ ice_switch_init(struct ice_adapter *ad)
dist_parser = &ice_switch_dist_parser_comms;
else if (ad->active_pkg_type == ICE_PKG_TYPE_OS_DEFAULT)
dist_parser = &ice_switch_dist_parser_os;
+ else if (ad->active_pkg_type == ICE_PKG_TYPE_GTP_OVER_GRE)
+ dist_parser = &ice_switch_dist_parser_comms;
else
return -EINVAL;
if (ad->devargs.pipe_mode_support) {
if (ad->active_pkg_type == ICE_PKG_TYPE_COMMS)
perm_parser = &ice_switch_perm_parser_comms;
+ else if (ad->active_pkg_type == ICE_PKG_TYPE_GTP_OVER_GRE)
+ perm_parser = &ice_switch_perm_parser_comms;
else
perm_parser = &ice_switch_perm_parser_os;
@@ -1889,12 +1893,16 @@ ice_switch_uninit(struct ice_adapter *ad)
dist_parser = &ice_switch_dist_parser_comms;
else if (ad->active_pkg_type == ICE_PKG_TYPE_OS_DEFAULT)
dist_parser = &ice_switch_dist_parser_os;
+ else if (ad->active_pkg_type == ICE_PKG_TYPE_GTP_OVER_GRE)
+ dist_parser = &ice_switch_dist_parser_comms;
else
return;
if (ad->devargs.pipe_mode_support) {
if (ad->active_pkg_type == ICE_PKG_TYPE_COMMS)
perm_parser = &ice_switch_perm_parser_comms;
+ else if (ad->active_pkg_type == ICE_PKG_TYPE_GTP_OVER_GRE)
+ perm_parser = &ice_switch_perm_parser_comms;
else
perm_parser = &ice_switch_perm_parser_os;
--
2.9.5
reply other threads:[~2020-12-16 11:49 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=20201216113832.423273-1-simei.su@intel.com \
--to=simei.su@intel.com \
--cc=dev@dpdk.org \
--cc=haiyue.wang@intel.com \
--cc=jia.guo@intel.com \
--cc=qi.z.zhang@intel.com \
--cc=yahui.cao@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).