From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from dpdk.org (dpdk.org [92.243.14.124]) by dpdk.space (Postfix) with ESMTP id 474C7A05D3 for ; Tue, 21 May 2019 09:14:58 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id E4816A69; Tue, 21 May 2019 09:14:57 +0200 (CEST) Received: from mga18.intel.com (mga18.intel.com [134.134.136.126]) by dpdk.org (Postfix) with ESMTP id AF460A49 for ; Tue, 21 May 2019 09:14:56 +0200 (CEST) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga008.jf.intel.com ([10.7.209.65]) by orsmga106.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 21 May 2019 00:14:55 -0700 X-ExtLoop1: 1 Received: from fmsmsx105.amr.corp.intel.com ([10.18.124.203]) by orsmga008.jf.intel.com with ESMTP; 21 May 2019 00:14:55 -0700 Received: from fmsmsx115.amr.corp.intel.com (10.18.116.19) by FMSMSX105.amr.corp.intel.com (10.18.124.203) with Microsoft SMTP Server (TLS) id 14.3.408.0; Tue, 21 May 2019 00:14:46 -0700 Received: from shsmsx107.ccr.corp.intel.com (10.239.4.96) by fmsmsx115.amr.corp.intel.com (10.18.116.19) with Microsoft SMTP Server (TLS) id 14.3.408.0; Tue, 21 May 2019 00:14:46 -0700 Received: from shsmsx102.ccr.corp.intel.com ([169.254.2.249]) by SHSMSX107.ccr.corp.intel.com ([169.254.9.7]) with mapi id 14.03.0415.000; Tue, 21 May 2019 15:14:43 +0800 From: "Yao, BingX Y" To: "Peng, Yuan" , "dts@dpdk.org" CC: "Peng, Yuan" Thread-Topic: [dts] [PATCH]tests: correct parameters setting Thread-Index: AQHVDIAzLckjmkU8aU+epnVVPu2oZKZ1MJtQ Date: Tue, 21 May 2019 07:14:42 +0000 Message-ID: <95BCD24840F32441BEA74E0F8A31839E04F2A575@shsmsx102.ccr.corp.intel.com> References: <1558077510-53389-1-git-send-email-yuan.peng@intel.com> In-Reply-To: <1558077510-53389-1-git-send-email-yuan.peng@intel.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [10.239.127.40] Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Subject: Re: [dts] [PATCH]tests: correct parameters setting X-BeenThere: dts@dpdk.org X-Mailman-Version: 2.1.15 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" Tested-by: Yao, BingX Y -----Original Message----- From: dts [mailto:dts-bounces@dpdk.org] On Behalf Of Peng Yuan Sent: Friday, May 17, 2019 3:19 PM To: dts@dpdk.org Cc: Peng, Yuan Subject: [dts] [PATCH]tests: correct parameters setting Correct proto and ttl settings. Signed-off-by: Peng Yuan diff --git a/tests/TestSuite_generic_flow_api.py b/tests/TestSuite_generic_= flow_api.py index af27477..d11c97d 100644 --- a/tests/TestSuite_generic_flow_api.py +++ b/tests/TestSuite_generic_flow_api.py @@ -61,9 +61,12 @@ MAX_VLAN =3D 4095 MAX_QUEUE =3D 15 MAX_VFQUEUE =3D 3 MAX_PORT =3D 65535 -MAX_PROTO =3D 133 MAX_TTL =3D 255 MAX_TOS =3D 255 +TCP_PROTO =3D 6 +UDP_PROTO =3D 17 +SCTP_PROTO =3D 132 +RESERVED_PROTO =3D 255 =20 class TestGeneric_flow_api(TestCase): =20 @@ -422,17 +425,14 @@ class TestGeneric_flow_api(TestCase): pkt +=3D ", src=3D'%s'" % sip if 'proto' in flows: if "udp" in flows: - proto =3D 17 - extrapacket['proto'] =3D '17' + proto =3D UDP_PROTO elif "tcp" in flows: - proto =3D 6 - extrapacket['proto'] =3D '6' + proto =3D TCP_PROTO elif "sctp" in flows: - proto =3D 132 - extrapacket['proto'] =3D '132' + proto =3D SCTP_PROTO else: - proto =3D self.generate_random_int(0, MAX_PROTO) - extrapacket['proto'] =3D str(proto) + proto =3D RESERVED_PROTO + extrapacket['proto'] =3D str(proto) flow_str +=3D "proto is %d " % proto if 'sip' in flows or 'dip' in flows: pkt +=3D ", proto=3D%d" % proto @@ -445,7 +445,7 @= @ class TestGeneric_flow_api(TestCase): pkt +=3D ", tos=3D%d" % tos extrapacket['tos'] =3D tos if 'ttl' in flows: - ttl =3D self.generate_random_int(0, MAX_TTL) + ttl =3D self.generate_random_int(1, MAX_TTL) flow_str +=3D "ttl is %d " % ttl pkt +=3D ", ttl=3D%d" % ttl extrapacket['ttl'] =3D ttl @@ -464,17 +464,14 @@ class= TestGeneric_flow_api(TestCase): pkt +=3D "/IPv6(src=3D'%s', dst=3D'%s'" % (sip, dip) if 'proto' in flows: if "udp" in flows: - proto =3D 17 - extrapacket['proto'] =3D '17' + proto =3D UDP_PROTO elif "tcp" in flows: - proto =3D 6 - extrapacket['proto'] =3D '6' + proto =3D TCP_PROTO elif "sctp" in flows: - proto =3D 132 - extrapacket['proto'] =3D '132' + proto =3D SCTP_PROTO else: - proto =3D self.generate_random_int(0, MAX_PROTO) - extrapacket['proto'] =3D str(proto) + proto =3D RESERVED_PROTO + extrapacket['proto'] =3D str(proto) flow_str +=3D "proto is %d " % proto pkt +=3D ", nh=3D%d" % proto if 'tc' in flows: @@ -483,13 +480,13 @@ class TestGeneric_flow_api(TestCase): pkt +=3D ", tc=3D%d" % tc extrapacket['tos'] =3D str(tc) if 'hop' in flows: - hop =3D self.generate_random_int(0, 255) + hop =3D self.generate_random_int(1, 255) flow_str +=3D "hop is %d " % hop pkt +=3D ", hlim=3D%d" % hop extrapacket['ttl'] =3D str(hop) if 'sctp' in flows: - pkt +=3D ", nh=3D132" - extrapacket['proto'] =3D '132' + pkt +=3D ", nh=3D%d" % SCTP_PROTO + extrapacket['proto'] =3D str(SCTP_PROTO) pkt +=3D ")" elif flow_type =3D=3D "tcp": flow_str +=3D "/ tcp " -- 2.14.3