[V1] tests/rte_flow_common: add a method for gtpogre

Message ID 20210428135738.29605-1-qinx.sun@intel.com (mailing list archive)
State Accepted
Headers
Series [V1] tests/rte_flow_common: add a method for gtpogre |

Commit Message

Sun, QinX April 28, 2021, 1:57 p.m. UTC
  add a method for pf/iavf gtpogre suite to call

Signed-off-by: Qin Sun <qinx.sun@intel.com>
---
 tests/rte_flow_common.py | 9 +++++++++
 1 file changed, 9 insertions(+)
  

Comments

Sun, QinX April 28, 2021, 5:49 a.m. UTC | #1
> -----Original Message-----
> From: Sun, QinX <qinx.sun@intel.com>
> Sent: Wednesday, April 28, 2021 9:58 PM
> To: dts@dpdk.org
> Cc: Sun, QinX <qinx.sun@intel.com>
> Subject: [dts] [PATCH V1] tests/rte_flow_common: add a method for gtpogre

Tested-by: Qin Sun  <qinx.sun@intel.com>
  
Tu, Lijuan May 7, 2021, 6:31 a.m. UTC | #2
> -----Original Message-----
> From: dts <dts-bounces@dpdk.org> On Behalf Of Qin Sun
> Sent: 2021年4月28日 21:58
> To: dts@dpdk.org
> Cc: Sun, QinX <qinx.sun@intel.com>
> Subject: [dts] [PATCH V1] tests/rte_flow_common: add a method for gtpogre
> 
> add a method for pf/iavf gtpogre suite to call
> 
> Signed-off-by: Qin Sun <qinx.sun@intel.com>

Applied
  

Patch

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