diff mbox series

net/ice: add GTP over GRE package name

Message ID 20201216113832.423273-1-simei.su@intel.com (mailing list archive)
State Rejected, archived
Delegated to: Qi Zhang
Headers show
Series net/ice: add GTP over GRE package name | expand

Checks

Context Check Description
ci/iol-intel-Performance success Performance Testing PASS
ci/iol-intel-Functional success Functional Testing PASS
ci/iol-testing success Testing PASS
ci/iol-broadcom-Functional success Functional Testing PASS
ci/iol-broadcom-Performance success Performance Testing PASS
ci/Intel-compilation success Compilation OK
ci/checkpatch success coding style OK

Commit Message

Simei Su Dec. 16, 2020, 11:38 a.m. UTC
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 mbox series

Patch

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;