From patchwork Wed Jul 15 02:07:33 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Zhao1, Wei" X-Patchwork-Id: 74032 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 4BAC4A0540; Wed, 15 Jul 2020 04:33:29 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 8AB3B1C129; Wed, 15 Jul 2020 04:33:28 +0200 (CEST) Received: from mga01.intel.com (mga01.intel.com [192.55.52.88]) by dpdk.org (Postfix) with ESMTP id 896471C120 for ; Wed, 15 Jul 2020 04:33:26 +0200 (CEST) IronPort-SDR: sDVjeW9gFjXV6QGPOKDJfq9ARbNAONurYwravmynao9C3q2kxfTkneZn+WiWlfZKR70851KhjM tOWNzx9SviyA== X-IronPort-AV: E=McAfee;i="6000,8403,9682"; a="167185437" X-IronPort-AV: E=Sophos;i="5.75,353,1589266800"; d="scan'208";a="167185437" X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga005.jf.intel.com ([10.7.209.41]) by fmsmga101.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 14 Jul 2020 19:33:25 -0700 IronPort-SDR: MBa4xV0q8FV0GfJUhUH6n4vK0FCrH/rosf9NbnhaemOvI1tIc+qqOycf6DVZu6alRE6dXyoOpL +Meeir90pqiQ== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.75,353,1589266800"; d="scan'208";a="459911657" Received: from unknown (HELO localhost.localdomain.bj.intel.com) ([172.16.182.123]) by orsmga005.jf.intel.com with ESMTP; 14 Jul 2020 19:33:24 -0700 From: Wei Zhao To: dev@dpdk.org Cc: qi.z.zhang@intel.com, nannan.lu@intel.com, Wei Zhao Date: Wed, 15 Jul 2020 10:07:33 +0800 Message-Id: <20200715020733.45086-1-wei.zhao1@intel.com> X-Mailer: git-send-email 2.19.1 MIME-Version: 1.0 Subject: [dpdk-dev] [PATCH] net/ice: fix tunnel type get error 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" When get tunnel type for ICE_NON_TUN, there need some upodate for gtp related pctype. Fixes: 418d2563d10b ("net/ice/base: get tunnel type for recipe") Signed-off-by: Wei Zhao Tested-by: Nannan Lu --- drivers/net/ice/base/ice_switch.c | 4 ++-- drivers/net/ice/base/ice_switch.h | 1 + 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/drivers/net/ice/base/ice_switch.c b/drivers/net/ice/base/ice_switch.c index 296aa5484..ebf405f7a 100644 --- a/drivers/net/ice/base/ice_switch.c +++ b/drivers/net/ice/base/ice_switch.c @@ -1069,7 +1069,7 @@ static enum ice_sw_tunnel_type ice_get_tun_type_for_recipe(u8 rid) non_tun_valid = true; } - if (j >= ICE_PROFID_IPV4_GTPC_TEID && + if (j >= ICE_PROFID_IPV4_GTPU_EH_IPV4_OTHER && j <= ICE_PROFID_IPV6_GTPU_IPV6_OTHER) gtp_valid = true; @@ -1136,7 +1136,7 @@ static enum ice_sw_tunnel_type ice_get_tun_type_for_recipe(u8 rid) tun_type = ICE_SW_TUN_PPPOE_IPV6_TCP; break; case ICE_PROFID_PPPOE_IPV6_UDP: - tun_type = ICE_SW_TUN_PPPOE_IPV4_UDP; + tun_type = ICE_SW_TUN_PPPOE_IPV6_UDP; break; case ICE_PROFID_PPPOE_IPV6_OTHER: tun_type = ICE_SW_TUN_PPPOE_IPV6; diff --git a/drivers/net/ice/base/ice_switch.h b/drivers/net/ice/base/ice_switch.h index cc3d2702e..77c70d3b2 100644 --- a/drivers/net/ice/base/ice_switch.h +++ b/drivers/net/ice/base/ice_switch.h @@ -28,6 +28,7 @@ #define ICE_PROFID_PPPOE_IPV6_UDP 39 #define ICE_PROFID_PPPOE_IPV6_OTHER 40 #define ICE_PROFID_IPV4_GTPC_TEID 41 +#define ICE_PROFID_IPV4_GTPU_EH_IPV4_OTHER 47 #define ICE_PROFID_IPV6_GTPU_IPV6_OTHER 70 #define ICE_PROFID_IPV4_ESP 71 #define ICE_PROFID_IPV6_ESP 72