From: "Liu, Yong" <yong.liu@intel.com>
To: "Xu, HuilongX" <huilongx.xu@intel.com>, "dts@dpdk.org" <dts@dpdk.org>
Cc: "Xu, HuilongX" <huilongx.xu@intel.com>
Subject: Re: [dts] [PATCH V1] update checksum test case
Date: Fri, 14 Oct 2016 14:51:50 +0000 [thread overview]
Message-ID: <86228AFD5BCD8E4EBFD2B90117B5E81E60300B26@SHSMSX103.ccr.corp.intel.com> (raw)
In-Reply-To: <1476432790-4124-1-git-send-email-huilongx.xu@intel.com>
Thanks, applied.
> -----Original Message-----
> From: dts [mailto:dts-bounces@dpdk.org] On Behalf Of xu,huilong
> Sent: Friday, October 14, 2016 3:13 AM
> To: dts@dpdk.org
> Cc: Xu, HuilongX
> Subject: [dts] [PATCH V1] update checksum test case
>
> csum function will not auto add outer ip src address already,
> so update send packet src ip address
>
> Signed-off-by: xu,huilong <huilongx.xu@intel.com>
> ---
> tests/TestSuite_checksum_offload.py | 24 ++++++++++++------------
> tests/TestSuite_nvgre.py | 12 ++++++------
> tests/TestSuite_vxlan.py | 12 ++++++------
> 3 files changed, 24 insertions(+), 24 deletions(-)
>
> diff --git a/tests/TestSuite_checksum_offload.py
> b/tests/TestSuite_checksum_offload.py
> index 57069f0..18e3848 100644
> --- a/tests/TestSuite_checksum_offload.py
> +++ b/tests/TestSuite_checksum_offload.py
> @@ -162,11 +162,11 @@ class TestChecksumOffload(TestCase):
> 'IPv6/UDP': 'Ether(dst="%s",
> src="52:00:00:00:00:00")/Dot1Q(vlan=1)/IPv6(src="::1")/UDP(chksum=0xf)/("X
> "*46)' % mac,
> 'IPv6/TCP': 'Ether(dst="%s",
> src="52:00:00:00:00:00")/Dot1Q(vlan=1)/IPv6(src="::1")/TCP(chksum=0xf)/("X
> "*46)' % mac}
>
> - pkts = {'IP/UDP': 'Ether(dst="02:00:00:00:00:00",
> src="%s")/Dot1Q(vlan=1)/IP(src="127.0.0.2")/UDP()/("X"*46)' % mac,
> - 'IP/TCP': 'Ether(dst="02:00:00:00:00:00",
> src="%s")/Dot1Q(vlan=1)/IP(src="127.0.0.2")/TCP()/("X"*46)' % mac,
> - 'IP/SCTP': 'Ether(dst="02:00:00:00:00:00",
> src="%s")/Dot1Q(vlan=1)/IP(src="127.0.0.2")/SCTP()/("X"*48)' % mac,
> - 'IPv6/UDP': 'Ether(dst="02:00:00:00:00:00",
> src="%s")/Dot1Q(vlan=1)/IPv6(src="::2")/UDP()/("X"*46)' % mac,
> - 'IPv6/TCP': 'Ether(dst="02:00:00:00:00:00",
> src="%s")/Dot1Q(vlan=1)/IPv6(src="::2")/TCP()/("X"*46)' % mac}
> + pkts = {'IP/UDP': 'Ether(dst="02:00:00:00:00:00",
> src="%s")/Dot1Q(vlan=1)/IP(src="127.0.0.1")/UDP()/("X"*46)' % mac,
> + 'IP/TCP': 'Ether(dst="02:00:00:00:00:00",
> src="%s")/Dot1Q(vlan=1)/IP(src="127.0.0.1")/TCP()/("X"*46)' % mac,
> + 'IP/SCTP': 'Ether(dst="02:00:00:00:00:00",
> src="%s")/Dot1Q(vlan=1)/IP(src="127.0.0.1")/SCTP()/("X"*48)' % mac,
> + 'IPv6/UDP': 'Ether(dst="02:00:00:00:00:00",
> src="%s")/Dot1Q(vlan=1)/IPv6(src="::1")/UDP()/("X"*46)' % mac,
> + 'IPv6/TCP': 'Ether(dst="02:00:00:00:00:00",
> src="%s")/Dot1Q(vlan=1)/IPv6(src="::1")/TCP()/("X"*46)' % mac}
>
> if self.kdriver == "fm10k":
> del pktsChkErr['IP/SCTP']
> @@ -193,11 +193,11 @@ class TestChecksumOffload(TestCase):
> 'IPv6/UDP': 'Ether(dst="%s",
> src="52:00:00:00:00:00")/IPv6(src="::1")/UDP(chksum=0xf)/("X"*46)' % mac,
> 'IPv6/TCP': 'Ether(dst="%s",
> src="52:00:00:00:00:00")/IPv6(src="::1")/TCP(chksum=0xf)/("X"*46)' % mac}
>
> - pkts_ref = {'IP/UDP': 'Ether(dst="02:00:00:00:00:00",
> src="%s")/IP(src="127.0.0.2")/UDP()/("X"*46)' % mac,
> - 'IP/TCP': 'Ether(dst="02:00:00:00:00:00",
> src="%s")/IP(src="127.0.0.2")/TCP()/("X"*46)' % mac,
> - 'IP/SCTP': 'Ether(dst="02:00:00:00:00:00",
> src="%s")/IP(src="127.0.0.2")/SCTP()/("X"*48)' % mac,
> - 'IPv6/UDP': 'Ether(dst="02:00:00:00:00:00",
> src="%s")/IPv6(src="::2")/UDP()/("X"*46)' % mac,
> - 'IPv6/TCP': 'Ether(dst="02:00:00:00:00:00",
> src="%s")/IPv6(src="::2")/TCP()/("X"*46)' % mac}
> + pkts_ref = {'IP/UDP': 'Ether(dst="02:00:00:00:00:00",
> src="%s")/IP(src="127.0.0.1")/UDP()/("X"*46)' % mac,
> + 'IP/TCP': 'Ether(dst="02:00:00:00:00:00",
> src="%s")/IP(src="127.0.0.1")/TCP()/("X"*46)' % mac,
> + 'IP/SCTP': 'Ether(dst="02:00:00:00:00:00",
> src="%s")/IP(src="127.0.0.1")/SCTP()/("X"*48)' % mac,
> + 'IPv6/UDP': 'Ether(dst="02:00:00:00:00:00",
> src="%s")/IPv6(src="::1")/UDP()/("X"*46)' % mac,
> + 'IPv6/TCP': 'Ether(dst="02:00:00:00:00:00",
> src="%s")/IPv6(src="::1")/TCP()/("X"*46)' % mac}
>
> if self.kdriver == "fm10k":
> del pkts['IP/SCTP']
> @@ -228,8 +228,8 @@ class TestChecksumOffload(TestCase):
> 'IPv6/UDP': 'Ether(dst="%s",
> src="52:00:00:00:00:00")/IPv6(src="%s")/UDP(chksum=0xf)/("X"*46)' % (mac,
> sndIPv6),
> 'IPv6/TCP': 'Ether(dst="%s",
> src="52:00:00:00:00:00")/IPv6(src="%s")/TCP(chksum=0xf)/("X"*46)' % (mac,
> sndIPv6)}
>
> - expIP = "10.0.0.2"
> - expIPv6 = '::2'
> + expIP = sendIP
> + expIPv6 = sendIPv6
> expPkts = {'IP/UDP': 'Ether(dst="02:00:00:00:00:00",
> src="%s")/IP(src="%s")/UDP()/("X"*46)' % (mac, expIP),
> 'IP/TCP': 'Ether(dst="02:00:00:00:00:00",
> src="%s")/IP(src="%s")/TCP()/("X"*46)' % (mac, expIP),
> 'IPv6/UDP': 'Ether(dst="02:00:00:00:00:00",
> src="%s")/IPv6(src="%s")/UDP()/("X"*46)' % (mac, expIPv6),
> diff --git a/tests/TestSuite_nvgre.py b/tests/TestSuite_nvgre.py
> index 75f5263..c1df309 100644
> --- a/tests/TestSuite_nvgre.py
> +++ b/tests/TestSuite_nvgre.py
> @@ -525,17 +525,17 @@ class TestNvgre(TestCase):
> config = NvgreTestConfig(self, **args)
> # now cloud filter will default enable L2 mac filter, so dst mac
> must be same
> config.outer_mac_dst = self.dut_rx_port_mac
> - # csum function will change outer ipv src address
> + # csum function will not change outer ipv src address already
> if config.outer_ip6_src != "N/A":
> - config.outer_ip6_src = IncreaseIPv6(config.outer_ip6_src)
> + config.outer_ip6_src = config.outer_ip6_src
> else:
> - config.outer_ip_src = IncreaseIP(config.outer_ip_src)
> + config.outer_ip_src = config.outer_ip_src
>
> - # csum function will auto change nvgre inner ipv src address
> + # csum function will not auto change nvgre inner ipv src address
> already
> if config.inner_ip6_src != "N/A":
> - config.inner_ip6_src = IncreaseIPv6(config.inner_ip6_src)
> + config.inner_ip6_src = config.inner_ip6_src
> else:
> - config.inner_ip_src = IncreaseIP(config.inner_ip_src)
> + config.inner_ip_src = config.inner_ip_src
>
> # create abnormal package with wrong checksum
> config.create_pcap()
> diff --git a/tests/TestSuite_vxlan.py b/tests/TestSuite_vxlan.py
> index 03c47d8..b810c13 100644
> --- a/tests/TestSuite_vxlan.py
> +++ b/tests/TestSuite_vxlan.py
> @@ -409,18 +409,18 @@ class TestVxlan(TestCase, IxiaPacketGenerator):
> # now cloud filter will default enable L2 mac filter, so dst mac
> must
> # be same
> config.outer_mac_dst = self.dut_port_mac
> - # csum function will auto add outer ipv src address
> + # csum function will not auto add outer ip src address already,
> so update send packet src ip address
> if config.outer_ip6_src != "N/A":
> - config.outer_ip6_src = IncreaseIPv6(config.outer_ip6_src)
> + config.outer_ip6_src = config.outer_ip6_src
> else:
> - config.outer_ip_src = IncreaseIP(config.outer_ip_src)
> + config.outer_ip_src = config.outer_ip_src
>
> - # csum function will auto add vxlan inner ipv src address
> + # csum function will not auto add outer ip src address already,
> so update send packet src ip address
> if config.outer_udp_dst == VXLAN_PORT:
> if config.inner_ip6_src != "N/A":
> - config.inner_ip6_src = IncreaseIPv6(config.inner_ip6_src)
> + config.inner_ip6_src = config.inner_ip6_src
> else:
> - config.inner_ip_src = IncreaseIP(config.inner_ip_src)
> + config.inner_ip_src = config.inner_ip_src
>
> # extract the checksum value of vxlan packet
> config.create_pcap()
> --
> 1.9.3
prev parent reply other threads:[~2016-10-14 14:53 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-10-14 8:13 xu,huilong
2016-10-14 14:51 ` Liu, Yong [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=86228AFD5BCD8E4EBFD2B90117B5E81E60300B26@SHSMSX103.ccr.corp.intel.com \
--to=yong.liu@intel.com \
--cc=dts@dpdk.org \
--cc=huilongx.xu@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).