From patchwork Wed Dec 16 11:38:32 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Simei Su X-Patchwork-Id: 85233 X-Patchwork-Delegate: qi.z.zhang@intel.com Return-Path: X-Original-To: patchwork@inbox.dpdk.org Delivered-To: patchwork@inbox.dpdk.org Received: from dpdk.org (dpdk.org [92.243.14.124]) by inbox.dpdk.org (Postfix) with ESMTP id 18614A09EF; Wed, 16 Dec 2020 12:49:28 +0100 (CET) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id E638EC99E; Wed, 16 Dec 2020 12:49:26 +0100 (CET) Received: from mga17.intel.com (mga17.intel.com [192.55.52.151]) by dpdk.org (Postfix) with ESMTP id C022FC996 for ; Wed, 16 Dec 2020 12:49:24 +0100 (CET) IronPort-SDR: 6KTjZo7LdAHUBzxGYWv44G1H3rkmFjZ7mf3J5DVvNDfqI7og9IuCZqRXHxRqWNWsLe9imlZj+q /kSu4f5sEz1w== X-IronPort-AV: E=McAfee;i="6000,8403,9836"; a="154856852" X-IronPort-AV: E=Sophos;i="5.78,424,1599548400"; d="scan'208";a="154856852" Received: from orsmga001.jf.intel.com ([10.7.209.18]) by fmsmga107.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 16 Dec 2020 03:49:22 -0800 IronPort-SDR: irHMulqmJC8b9Y/8BuOxJow7Pts+4vst2r8jEG0Za6Gux2dwYoi3FdS2JbejivfWwPyg0LjVF3 jPhnXCOgJVtA== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.78,424,1599548400"; d="scan'208";a="412558688" Received: from unknown (HELO npg-dpdk-cvl-simeisu-118d193.sh.intel.com) ([10.67.119.195]) by orsmga001.jf.intel.com with ESMTP; 16 Dec 2020 03:49:20 -0800 From: Simei Su To: qi.z.zhang@intel.com Cc: dev@dpdk.org, haiyue.wang@intel.com, jia.guo@intel.com, yahui.cao@intel.com, Simei Su Date: Wed, 16 Dec 2020 19:38:32 +0800 Message-Id: <20201216113832.423273-1-simei.su@intel.com> X-Mailer: git-send-email 2.9.5 Subject: [dpdk-dev] [PATCH] net/ice: add GTP over GRE package name X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" Add new GTPoGRE package name and handle the new package when initializing each flow engine. Signed-off-by: Simei Su --- 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;