From: "Tu, Lijuan" <lijuan.tu@intel.com>
To: "Peng, Yuan" <yuan.peng@intel.com>, "dts@dpdk.org" <dts@dpdk.org>
Cc: "Peng, Yuan" <yuan.peng@intel.com>
Subject: Re: [dts] [PATCH]tests: correct parameters setting
Date: Wed, 22 May 2019 05:54:23 +0000 [thread overview]
Message-ID: <8CE3E05A3F976642AAB0F4675D0AD20E0BA84035@SHSMSX101.ccr.corp.intel.com> (raw)
In-Reply-To: <1558077510-53389-1-git-send-email-yuan.peng@intel.com>
Applied, thanks
> -----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 <yuan.peng@intel.com>
> Subject: [dts] [PATCH]tests: correct parameters setting
>
> Correct proto and ttl settings.
>
> Signed-off-by: Peng Yuan <yuan.peng@intel.com>
>
> 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 = 4095
> MAX_QUEUE = 15
> MAX_VFQUEUE = 3
> MAX_PORT = 65535
> -MAX_PROTO = 133
> MAX_TTL = 255
> MAX_TOS = 255
> +TCP_PROTO = 6
> +UDP_PROTO = 17
> +SCTP_PROTO = 132
> +RESERVED_PROTO = 255
>
> class TestGeneric_flow_api(TestCase):
>
> @@ -422,17 +425,14 @@ class TestGeneric_flow_api(TestCase):
> pkt += ", src='%s'" % sip
> if 'proto' in flows:
> if "udp" in flows:
> - proto = 17
> - extrapacket['proto'] = '17'
> + proto = UDP_PROTO
> elif "tcp" in flows:
> - proto = 6
> - extrapacket['proto'] = '6'
> + proto = TCP_PROTO
> elif "sctp" in flows:
> - proto = 132
> - extrapacket['proto'] = '132'
> + proto = SCTP_PROTO
> else:
> - proto = self.generate_random_int(0, MAX_PROTO)
> - extrapacket['proto'] = str(proto)
> + proto = RESERVED_PROTO
> + extrapacket['proto'] = str(proto)
> flow_str += "proto is %d " % proto
> if 'sip' in flows or 'dip' in flows:
> pkt += ", proto=%d" % proto @@ -445,7 +445,7 @@ class
> TestGeneric_flow_api(TestCase):
> pkt += ", tos=%d" % tos
> extrapacket['tos'] = tos
> if 'ttl' in flows:
> - ttl = self.generate_random_int(0, MAX_TTL)
> + ttl = self.generate_random_int(1, MAX_TTL)
> flow_str += "ttl is %d " % ttl
> pkt += ", ttl=%d" % ttl
> extrapacket['ttl'] = ttl @@ -464,17 +464,14 @@ class
> TestGeneric_flow_api(TestCase):
> pkt += "/IPv6(src='%s', dst='%s'" % (sip, dip)
> if 'proto' in flows:
> if "udp" in flows:
> - proto = 17
> - extrapacket['proto'] = '17'
> + proto = UDP_PROTO
> elif "tcp" in flows:
> - proto = 6
> - extrapacket['proto'] = '6'
> + proto = TCP_PROTO
> elif "sctp" in flows:
> - proto = 132
> - extrapacket['proto'] = '132'
> + proto = SCTP_PROTO
> else:
> - proto = self.generate_random_int(0, MAX_PROTO)
> - extrapacket['proto'] = str(proto)
> + proto = RESERVED_PROTO
> + extrapacket['proto'] = str(proto)
> flow_str += "proto is %d " % proto
> pkt += ", nh=%d" % proto
> if 'tc' in flows:
> @@ -483,13 +480,13 @@ class TestGeneric_flow_api(TestCase):
> pkt += ", tc=%d" % tc
> extrapacket['tos'] = str(tc)
> if 'hop' in flows:
> - hop = self.generate_random_int(0, 255)
> + hop = self.generate_random_int(1, 255)
> flow_str += "hop is %d " % hop
> pkt += ", hlim=%d" % hop
> extrapacket['ttl'] = str(hop)
> if 'sctp' in flows:
> - pkt += ", nh=132"
> - extrapacket['proto'] = '132'
> + pkt += ", nh=%d" % SCTP_PROTO
> + extrapacket['proto'] = str(SCTP_PROTO)
> pkt += ")"
> elif flow_type == "tcp":
> flow_str += "/ tcp "
> --
> 2.14.3
prev parent reply other threads:[~2019-05-22 5:54 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-05-17 7:18 Peng Yuan
2019-05-21 7:14 ` Yao, BingX Y
2019-05-22 5:54 ` 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=8CE3E05A3F976642AAB0F4675D0AD20E0BA84035@SHSMSX101.ccr.corp.intel.com \
--to=lijuan.tu@intel.com \
--cc=dts@dpdk.org \
--cc=yuan.peng@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).