test suite reviews and discussions
 help / color / mirror / Atom feed
From: "Tu, Lijuan" <lijuan.tu@intel.com>
To: "He, Zhiwei" <zhiwei.he@intel.com>, "dts@dpdk.org" <dts@dpdk.org>
Cc: "He, Zhiwei" <zhiwei.he@intel.com>
Subject: Re: [dts] [PATCH V2] tests:add gtp packet process to cover scapy 2.3	and 2.4 for RSS advanced feature in cvl
Date: Tue, 7 Jan 2020 07:12:43 +0000	[thread overview]
Message-ID: <8CE3E05A3F976642AAB0F4675D0AD20E0BBA3CCB@SHSMSX101.ccr.corp.intel.com> (raw)
In-Reply-To: <1578364442-60435-1-git-send-email-zhiwei.he@intel.com>

applied

> -----Original Message-----
> From: dts [mailto:dts-bounces@dpdk.org] On Behalf Of zhiwei.he
> Sent: Tuesday, January 7, 2020 10:34 AM
> To: dts@dpdk.org
> Cc: He, Zhiwei <zhiwei.he@intel.com>
> Subject: [dts] [PATCH V2] tests:add gtp packet process to cover scapy 2.3 and
> 2.4 for RSS advanced feature in cvl
> 
> From: "zhiwei.he" <zhiwei.he@intel.com>
> 
> Signed-off-by: zhiwei.he <zhiwei.he@intel.com>
> ---
>  tests/TestSuite_cvl_advanced_rss.py | 68 +++++++++++++++++++++------------
> ----
>  1 file changed, 39 insertions(+), 29 deletions(-)
> 
> diff --git a/tests/TestSuite_cvl_advanced_rss.py
> b/tests/TestSuite_cvl_advanced_rss.py
> index 4364b56..27c67b3 100644
> --- a/tests/TestSuite_cvl_advanced_rss.py
> +++ b/tests/TestSuite_cvl_advanced_rss.py
> @@ -2,7 +2,8 @@ import json
>  import time
>  import re
>  import packet
> -
> +import os
> +from scapy.contrib.gtp import *
>  from test_case import TestCase
>  from pmd_output import PmdOutput
>  from utils import BLUE, RED
> @@ -18,6 +19,16 @@ from scapy.layers.l2 import Dot1Q  from
> scapy.layers.sctp import SCTP, SCTPChunkData  from nvgre import NVGRE
> 
> +out = os.popen("pip list|grep scapy ")
> +version_result =out.read()
> +p=re.compile('scapy\s+2\.3\.\d+')
> +m=p.search(version_result)
> +
> +if not m:
> +   GTP_TEID= "teid"
> +else:
> +   GTP_TEID= "TEID"
> +
>  tv_mac_ipv4_l3_src_only = {
>      "name":"tv_mac_ipv4_l3_src_only",
>      "rte_flow_pattern":"flow create 0 ingress pattern eth / ipv4 / end actions
> rss types ipv4 l3-src-only end key_len 0 queues end / end", @@ -356,34
> +367,54 @@ tv_mac_ipv4_pppoe_icmp= {
>      "check_func_param": {"expect_port":0}  }
> 
> +pkt_str=[]
> +pkt =
> +['Ether(dst="68:05:ca:a3:28:94")/IP()/UDP(dport=2152)/GTP_U_Header(GTP
> _TEID=0x123456)/IP(src="192.168.0.%d")/ICMP()/("X"*480)' %i for i in
> range(0,100)] for i in pkt:
> +    pkt_str.append(i.replace('GTP_TEID', GTP_TEID))
> +
>  tv_mac_ipv4_gtpu_icmp= {
>      "name":"tv_mac_ipv4_gtpu_icmp",
>      "rte_flow_pattern":"flow create 0 ingress pattern eth / ipv4 / udp / gtpu /
> gtp_psc / ipv4 / end actions rss types ipv4 l3-src-only end key_len 0 queues
> end / end",
> -
> "scapy_str":['Ether(dst="68:05:ca:a3:28:94")/IP()/UDP(dport=2152)/GTP_U_H
> eader(teid=0x123456)/IP(src="192.168.0.%d")/ICMP()/("X"*480)' %i for i in
> range(0,100)],
> +    "scapy_str":pkt_str,
>      "check_func": rfc.check_packets_of_each_queue,
>      "check_func_param": {"expect_port":0}  }
> 
> +pkt_str=[]
> +pkt =
> +['Ether(dst="68:05:ca:a3:28:94")/IP()/UDP(dport=2152)/GTP_U_Header(GTP
> _TEID=0x123456)/IP(src="192.168.0.%d",
> frag=6)/UDP(dport=%d)/("X"*480)' %(i, i+10) for i in range(0,100)] for i in pkt:
> +    pkt_str.append(i.replace('GTP_TEID', GTP_TEID))
> +
>  tv_mac_ipv4_gtpu_udp_frag= {
>      "name":"tv_mac_ipv4_gtpu_udp_frag",
>      "rte_flow_pattern":"flow create 0 ingress pattern eth / ipv4 / udp / gtpu /
> gtp_psc / ipv4 / udp / end actions rss types ipv4 end key_len 0 queues end /
> end",
> -
> "scapy_str":['Ether(dst="68:05:ca:a3:28:94")/IP()/UDP(dport=2152)/GTP_U_H
> eader(teid=0x123456)/IP(src="192.168.0.%d",
> frag=6)/UDP(dport=%d)/("X"*480)' %(i, i+10) for i in range(0,100)],
> +    "scapy_str":pkt_str,
>      "check_func": rfc.check_packets_of_each_queue,
>      "check_func_param": {"expect_port":0}  }
> 
> +pkt_str=[]
> +pkt =
> +['Ether(dst="68:05:ca:a3:28:94")/IP()/UDP(dport=2152)/GTP_U_Header(GTP
> _TEID=0x123456)/IP(src="192.168.0.%d", frag=6)/("X"*480)' %i for i in
> range(0,100)] for i in pkt:
> +    pkt_str.append(i.replace('GTP_TEID', GTP_TEID))
> +
>  tv_mac_ipv4_gtpu_ipv4_frag= {
>      "name":"tv_mac_ipv4_gtpu_ipv4_frag",
>      "rte_flow_pattern":"flow create 0 ingress pattern eth / ipv4 / udp / gtpu /
> gtp_psc / ipv4 / end actions rss types ipv4 l3-src-only end key_len 0 queues
> end / end",
> -
> "scapy_str":['Ether(dst="68:05:ca:a3:28:94")/IP()/UDP(dport=2152)/GTP_U_H
> eader(teid=0x123456)/IP(src="192.168.0.%d", frag=6)/("X"*480)' %i for i in
> range(0,100)],
> +    "scapy_str":pkt_str,
>      "check_func": rfc.check_packets_of_each_queue,
>      "check_func_param": {"expect_port":0}  }
> 
> +pkt_str=[]
> +pkt
> +=['Ether(dst="68:05:ca:a3:28:94")/IP()/UDP(dport=2152)/GTP_U_Header(GT
> P_TEID=0x123456)/IP(src="192.168.0.%d",
> frag=6)/TCP(dport=%d)/("X"*480)' %(i, i+10) for i in range(0,100)] for i in pkt:
> +    pkt_str.append(i.replace('GTP_TEID', GTP_TEID))
> +
>  tv_mac_ipv4_gtpu_tcp= {
>      "name":"tv_mac_ipv4_gtpu_tcp",
>      "rte_flow_pattern":"flow create 0 ingress pattern eth / ipv4 / udp / gtpu /
> gtp_psc / ipv4 / tcp / end actions rss types ipv4 l3-src-only end key_len 0
> queues end / end",
> -
> "scapy_str":['Ether(dst="68:05:ca:a3:28:94")/IP()/UDP(dport=2152)/GTP_U_H
> eader(teid=0x123456)/IP(src="192.168.0.%d",
> frag=6)/TCP(dport=%d)/("X"*480)' %(i, i+10) for i in range(0,100)],
> +    "scapy_str":pkt_str,
>      "check_func": rfc.check_packets_of_each_queue,
>      "check_func_param": {"expect_port":0}  } @@ -799,7 +830,9 @@ class
> AdvancedRSSTest(TestCase):
>          self.pf_mac = self.dut.get_mac_address(0)
>          self.pf_pci = self.dut.ports_info[self.dut_ports[0]]['pci']
>          self.verify(self.nic in ["columbiaville_25g","columbiaville_100g"], "%s nic
> not support ethertype filter" % self.nic)
> -
> +
> +
> +
>      def set_up(self):
>          """
>          Run before each test case.
> @@ -830,28 +863,6 @@ class AdvancedRSSTest(TestCase):
>          command = "./%s/app/testpmd %s  -- -i %s" % (self.dut.target,
> all_eal_param, "--rxq=64 --txq=64")
>          return command
> 
> -
> -    def create_testpmd_command_pipeline_mode(self):
> -        """
> -        Create testpmd command for pipeline mode
> -        """
> -        #Prepare testpmd EAL and parameters
> -        all_eal_param = self.dut.create_eal_parameters(ports=[0],
> port_options={0:"pipeline-mode-support=1"})
> -        print all_eal_param   #print eal parameters
> -        command = "./%s/app/testpmd %s  -- -i %s" % (self.dut.target,
> all_eal_param, "--rxq=64 --txq=64")
> -        return command
> -
> -
> -    def get_rule_number(self,outstring):
> -        """
> -        get the rule number.
> -        """
> -        result_scanner = r'Flow rule #(\d+) created'
> -        scanner = re.compile(result_scanner, re.DOTALL)
> -        m = scanner.search(outstring)
> -        rule_num = int(m.group(1))
> -        return rule_num
> -
>      def _rte_flow_validate_pattern(self, test_vectors, command, is_vxlan):
> 
>          global test_results
> @@ -951,4 +962,3 @@ class AdvancedRSSTest(TestCase):
>           command = self.create_testpmd_command()
>           self._rte_flow_validate_pattern(tvs_mac_rss_simple_xor, command,
> is_vxlan = True)
> 
> -
> --
> 1.8.3.1


      reply	other threads:[~2020-01-07  7:12 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-01-07  2:34 zhiwei.he
2020-01-07  7:12 ` Tu, Lijuan [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=8CE3E05A3F976642AAB0F4675D0AD20E0BBA3CCB@SHSMSX101.ccr.corp.intel.com \
    --to=lijuan.tu@intel.com \
    --cc=dts@dpdk.org \
    --cc=zhiwei.he@intel.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).