From patchwork Wed Apr 28 13:57:38 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Sun, QinX" X-Patchwork-Id: 92297 Return-Path: X-Original-To: patchwork@inbox.dpdk.org Delivered-To: patchwork@inbox.dpdk.org Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id 64F4AA0C3F; Wed, 28 Apr 2021 07:24:58 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 396F240147; Wed, 28 Apr 2021 07:24:58 +0200 (CEST) Received: from mga05.intel.com (mga05.intel.com [192.55.52.43]) by mails.dpdk.org (Postfix) with ESMTP id E3EF940041 for ; Wed, 28 Apr 2021 07:24:56 +0200 (CEST) IronPort-SDR: c9U5AjlP+ggZMWuLW76QdoT8eNCPeRGmCBvzlLZCf1htoCi+l4yZ0tLhuFTvlOpuBmmmGN0jnI xpe9xLdz4BdQ== X-IronPort-AV: E=McAfee;i="6200,9189,9967"; a="281995392" X-IronPort-AV: E=Sophos;i="5.82,257,1613462400"; d="scan'208";a="281995392" Received: from orsmga008.jf.intel.com ([10.7.209.65]) by fmsmga105.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 27 Apr 2021 22:24:55 -0700 IronPort-SDR: AoLwlrJYJbeVQ0ptvb+Sasckbiz4P5YxtPB4lSdS+/yJ4w9Zk2cHOsd6IlUrD/5rJl0uTPtajO 7VRK5yKgHbfA== X-IronPort-AV: E=Sophos;i="5.82,257,1613462400"; d="scan'208";a="430132370" Received: from unknown (HELO cvl_tetser_105.icx.intel.com) ([10.240.183.105]) by orsmga008-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 27 Apr 2021 22:24:53 -0700 From: Qin Sun To: dts@dpdk.org Cc: Qin Sun Date: Wed, 28 Apr 2021 13:57:38 +0000 Message-Id: <20210428135738.29605-1-qinx.sun@intel.com> X-Mailer: git-send-email 2.17.1 Subject: [dts] [PATCH V1] tests/rte_flow_common: add a method for gtpogre X-BeenThere: dts@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: test suite reviews and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dts-bounces@dpdk.org Sender: "dts" add a method for pf/iavf gtpogre suite to call Signed-off-by: Qin Sun Tested-by: Qin Sun --- tests/rte_flow_common.py | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/tests/rte_flow_common.py b/tests/rte_flow_common.py index e0a378f3..46f0b96d 100644 --- a/tests/rte_flow_common.py +++ b/tests/rte_flow_common.py @@ -1063,3 +1063,12 @@ class RssProcessing(object): .replace('IP()', 'IPv6()').replace('mac_ipv4', 'mac_ipv6')) for element in template] return ipv6_template + + @staticmethod + def get_ipv6_template_by_ipv4_gtpogre(template): + if isinstance(template, dict): + template = [template] + ipv6_template = [eval(str(element).replace('eth / ipv4', 'eth / ipv6') + .replace('IP(proto=0x2F)/GRE(proto=0x0800)/IP()', 'IPv6(nh=0x2F)/GRE(proto=0x86DD)/IPv6()').replace('mac_ipv4', 'mac_ipv6')) + for element in template] + return ipv6_template