net/ice: add GTP over GRE package name
Checks
Commit Message
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(+)
@@ -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;
@@ -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;
@@ -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;
@@ -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
@@ -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;