DPDK patches and discussions
 help / color / mirror / Atom feed
* [dpdk-dev] [PATCH] net/ice: add GTP over GRE package name
@ 2020-12-16 11:38 Simei Su
  0 siblings, 0 replies; only message in thread
From: Simei Su @ 2020-12-16 11:38 UTC (permalink / raw)
  To: qi.z.zhang; +Cc: dev, haiyue.wang, jia.guo, yahui.cao, Simei Su

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


^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2020-12-16 11:49 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-12-16 11:38 [dpdk-dev] [PATCH] net/ice: add GTP over GRE package name 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).