* [dts] [PATCH] tests checksum_offload: remove source mac filter
@ 2015-11-03 3:07 Yong Liu
2015-11-03 8:08 ` Tang, HaifengX
0 siblings, 1 reply; 3+ messages in thread
From: Yong Liu @ 2015-11-03 3:07 UTC (permalink / raw)
To: dts
From: Marvin Liu <yong.liu@intel.com>
testpmd csum forwarding will replace source mac address with port mac.
So remove source mac filter from this case.
Signed-off-by: Marvin Liu <yong.liu@intel.com>
diff --git a/tests/TestSuite_checksum_offload.py b/tests/TestSuite_checksum_offload.py
index abfebb6..0f3c8af 100644
--- a/tests/TestSuite_checksum_offload.py
+++ b/tests/TestSuite_checksum_offload.py
@@ -109,7 +109,7 @@ class TestChecksumOffload(TestCase):
self.tester.scapy_append('sys.path.append("./")')
self.tester.scapy_append('import sctp')
self.tester.scapy_append('from sctp import *')
- self.tester.scapy_append('p = sniff(filter="ether src 52:00:00:00:00:00", iface="%s", count=%d)' % (rx_interface, len(packets_sent)))
+ self.tester.scapy_append('p = sniff(iface="%s", count=%d)' % (rx_interface, len(packets_sent)))
self.tester.scapy_append('nr_packets=len(p)')
self.tester.scapy_append('reslist = [p[i].sprintf("%IP.chksum%;%TCP.chksum%;%UDP.chksum%;%SCTP.chksum%") for i in range(nr_packets)]')
self.tester.scapy_append('import string')
@@ -162,16 +162,16 @@ class TestChecksumOffload(TestCase):
traffic generator side.
"""
dmac = self.dut.get_mac_address(self.dut_ports[1])
- pktsChkErr = {'IP/UDP': 'Ether(dst="%s", src="52:00:00:00:00:00")/IP(chksum=0x0)/UDP(chksum=0xf)/("X"*46)' % dmac,
- 'IP/TCP': 'Ether(dst="%s", src="52:00:00:00:00:00")/IP(chksum=0x0)/TCP(chksum=0xf)/("X"*46)' % dmac,
- 'IP/SCTP': 'Ether(dst="%s", src="52:00:00:00:00:00")/IP(chksum=0x0)/SCTP(chksum=0xf)/("X"*48)' % dmac,
- 'IPv6/UDP': 'Ether(dst="%s", src="52:00:00:00:00:00")/IPv6(src="::1")/UDP(chksum=0xf)/("X"*46)' % dmac,
- 'IPv6/TCP': 'Ether(dst="%s", src="52:00:00:00:00:00")/IPv6(src="::1")/TCP(chksum=0xf)/("X"*46)' % dmac}
- pkts = {'IP/UDP': 'Ether(dst="%s", src="52:00:00:00:00:00")/IP(src="127.0.0.2")/UDP()/("X"*46)' % dmac,
- 'IP/TCP': 'Ether(dst="%s", src="52:00:00:00:00:00")/IP(src="127.0.0.2")/TCP()/("X"*46)' % dmac,
- 'IP/SCTP': 'Ether(dst="%s", src="52:00:00:00:00:00")/IP(src="127.0.0.2")/SCTP()/("X"*48)' % dmac,
- 'IPv6/UDP': 'Ether(dst="%s", src="52:00:00:00:00:00")/IPv6(src="::2")/UDP()/("X"*46)' % dmac,
- 'IPv6/TCP': 'Ether(dst="%s", src="52:00:00:00:00:00")/IPv6(src="::2")/TCP()/("X"*46)' % dmac}
+ pktsChkErr = {'IP/UDP': 'Ether(dst="%s")/IP(chksum=0x0)/UDP(chksum=0xf)/("X"*46)' % dmac,
+ 'IP/TCP': 'Ether(dst="%s")/IP(chksum=0x0)/TCP(chksum=0xf)/("X"*46)' % dmac,
+ 'IP/SCTP': 'Ether(dst="%s")/IP(chksum=0x0)/SCTP(chksum=0xf)/("X"*48)' % dmac,
+ 'IPv6/UDP': 'Ether(dst="%s")/IPv6(src="::1")/UDP(chksum=0xf)/("X"*46)' % dmac,
+ 'IPv6/TCP': 'Ether(dst="%s")/IPv6(src="::1")/TCP(chksum=0xf)/("X"*46)' % dmac}
+ pkts = {'IP/UDP': 'Ether(dst="%s")/IP(src="127.0.0.2")/UDP()/("X"*46)' % dmac,
+ 'IP/TCP': 'Ether(dst="%s")/IP(src="127.0.0.2")/TCP()/("X"*46)' % dmac,
+ 'IP/SCTP': 'Ether(dst="%s")/IP(src="127.0.0.2")/SCTP()/("X"*48)' % dmac,
+ 'IPv6/UDP': 'Ether(dst="%s")/IPv6(src="::2")/UDP()/("X"*46)' % dmac,
+ 'IPv6/TCP': 'Ether(dst="%s")/IPv6(src="::2")/TCP()/("X"*46)' % dmac}
self.checksum_enablehw(self.dut_ports[0])
self.checksum_enablehw(self.dut_ports[1])
self.dut.send_expect("start", "testpmd>")
@@ -188,17 +188,17 @@ class TestChecksumOffload(TestCase):
"""
dmac = self.dut.get_mac_address(self.dut_ports[1])
- pkts = {'IP/UDP': 'Ether(dst="%s", src="52:00:00:00:00:00")/IP(chksum=0x0)/UDP(chksum=0xf)/("X"*46)' % dmac,
- 'IP/TCP': 'Ether(dst="%s", src="52:00:00:00:00:00")/IP(chksum=0x0)/TCP(chksum=0xf)/("X"*46)' % dmac,
- 'IP/SCTP': 'Ether(dst="%s", src="52:00:00:00:00:00")/IP(chksum=0x0)/SCTP(chksum=0xf)/("X"*48)' % dmac,
- 'IPv6/UDP': 'Ether(dst="%s", src="52:00:00:00:00:00")/IPv6(src="::1")/UDP(chksum=0xf)/("X"*46)' % dmac,
- 'IPv6/TCP': 'Ether(dst="%s", src="52:00:00:00:00:00")/IPv6(src="::1")/TCP(chksum=0xf)/("X"*46)' % dmac}
+ pkts = {'IP/UDP': 'Ether(dst="%s")/IP(chksum=0x0)/UDP(chksum=0xf)/("X"*46)' % dmac,
+ 'IP/TCP': 'Ether(dst="%s")/IP(chksum=0x0)/TCP(chksum=0xf)/("X"*46)' % dmac,
+ 'IP/SCTP': 'Ether(dst="%s")/IP(chksum=0x0)/SCTP(chksum=0xf)/("X"*48)' % dmac,
+ 'IPv6/UDP': 'Ether(dst="%s")/IPv6(src="::1")/UDP(chksum=0xf)/("X"*46)' % dmac,
+ 'IPv6/TCP': 'Ether(dst="%s")/IPv6(src="::1")/TCP(chksum=0xf)/("X"*46)' % dmac}
- pkts_ref = {'IP/UDP': 'Ether(dst="%s", src="52:00:00:00:00:00")/IP(src="127.0.0.2")/UDP()/("X"*46)' % dmac,
- 'IP/TCP': 'Ether(dst="%s", src="52:00:00:00:00:00")/IP(src="127.0.0.2")/TCP()/("X"*46)' % dmac,
- 'IP/SCTP': 'Ether(dst="%s", src="52:00:00:00:00:00")/IP(src="127.0.0.2")/SCTP()/("X"*48)' % dmac,
- 'IPv6/UDP': 'Ether(dst="%s", src="52:00:00:00:00:00")/IPv6(src="::2")/UDP()/("X"*46)' % dmac,
- 'IPv6/TCP': 'Ether(dst="%s", src="52:00:00:00:00:00")/IPv6(src="::2")/TCP()/("X"*46)' % dmac}
+ pkts_ref = {'IP/UDP': 'Ether(dst="%s")/IP(src="127.0.0.2")/UDP()/("X"*46)' % dmac,
+ 'IP/TCP': 'Ether(dst="%s")/IP(src="127.0.0.2")/TCP()/("X"*46)' % dmac,
+ 'IP/SCTP': 'Ether(dst="%s")/IP(src="127.0.0.2")/SCTP()/("X"*48)' % dmac,
+ 'IPv6/UDP': 'Ether(dst="%s")/IPv6(src="::2")/UDP()/("X"*46)' % dmac,
+ 'IPv6/TCP': 'Ether(dst="%s")/IPv6(src="::2")/TCP()/("X"*46)' % dmac}
self.checksum_enablehw(self.dut_ports[0])
self.checksum_enablehw(self.dut_ports[1])
@@ -221,17 +221,17 @@ class TestChecksumOffload(TestCase):
dmac = self.dut.get_mac_address(self.dut_ports[1])
sndIP = '10.0.0.1'
sndIPv6 = '::1'
- sndPkts = {'IP/UDP': 'Ether(dst="%s", src="52:00:00:00:00:00")/IP(src="%s",chksum=0x0)/UDP(chksum=0xf)/("X"*46)' % (dmac, sndIP),
- 'IP/TCP': 'Ether(dst="%s", src="52:00:00:00:00:00")/IP(src="%s",chksum=0x0)/TCP(chksum=0xf)/("X"*46)' % (dmac, sndIP),
- 'IPv6/UDP': 'Ether(dst="%s", src="52:00:00:00:00:00")/IPv6(src="%s")/UDP(chksum=0xf)/("X"*46)' % (dmac, sndIPv6),
- 'IPv6/TCP': 'Ether(dst="%s", src="52:00:00:00:00:00")/IPv6(src="%s")/TCP(chksum=0xf)/("X"*46)' % (dmac, sndIPv6)}
+ sndPkts = {'IP/UDP': 'Ether(dst="%s")/IP(src="%s",chksum=0x0)/UDP(chksum=0xf)/("X"*46)' % (dmac, sndIP),
+ 'IP/TCP': 'Ether(dst="%s")/IP(src="%s",chksum=0x0)/TCP(chksum=0xf)/("X"*46)' % (dmac, sndIP),
+ 'IPv6/UDP': 'Ether(dst="%s")/IPv6(src="%s")/UDP(chksum=0xf)/("X"*46)' % (dmac, sndIPv6),
+ 'IPv6/TCP': 'Ether(dst="%s")/IPv6(src="%s")/TCP(chksum=0xf)/("X"*46)' % (dmac, sndIPv6)}
expIP = "10.0.0.2"
expIPv6 = '::2'
- expPkts = {'IP/UDP': 'Ether(dst="%s", src="52:00:00:00:00:00")/IP(src="%s")/UDP()/("X"*46)' % (dmac, expIP),
- 'IP/TCP': 'Ether(dst="%s", src="52:00:00:00:00:00")/IP(src="%s")/TCP()/("X"*46)' % (dmac, expIP),
- 'IPv6/UDP': 'Ether(dst="%s", src="52:00:00:00:00:00")/IPv6(src="%s")/UDP()/("X"*46)' % (dmac, expIPv6),
- 'IPv6/TCP': 'Ether(dst="%s", src="52:00:00:00:00:00")/IPv6(src="%s")/TCP()/("X"*46)' % (dmac, expIPv6)}
+ expPkts = {'IP/UDP': 'Ether(dst="%s")/IP(src="%s")/UDP()/("X"*46)' % (dmac, expIP),
+ 'IP/TCP': 'Ether(dst="%s")/IP(src="%s")/TCP()/("X"*46)' % (dmac, expIP),
+ 'IPv6/UDP': 'Ether(dst="%s")/IPv6(src="%s")/UDP()/("X"*46)' % (dmac, expIPv6),
+ 'IPv6/TCP': 'Ether(dst="%s")/IPv6(src="%s")/TCP()/("X"*46)' % (dmac, expIPv6)}
self.dut.send_expect("start", "testpmd>")
result = self.checksum_validate(sndPkts, expPkts)
@@ -277,11 +277,11 @@ class TestChecksumOffload(TestCase):
"""
# sizes = [64, 128, 256, 512, 1024]
sizes = [64, 128]
- pkts = {'IP/UDP': 'Ether(dst="%s", src="52:00:00:00:00:00")/IP()/UDP()/("X"*(%d-46))',
- 'IP/TCP': 'Ether(dst="%s", src="52:00:00:00:00:00")/IP()/TCP()/("X"*(%d-58))',
- 'IP/SCTP': 'Ether(dst="%s", src="52:00:00:00:00:00")/IP()/SCTP()/("X"*(%d-50+2))',
- 'IPv6/UDP': 'Ether(dst="%s", src="52:00:00:00:00:00")/IPv6()/UDP()/("X"* (lambda x: x - 66 if x > 66 else 0)(%d))',
- 'IPv6/TCP': 'Ether(dst="%s", src="52:00:00:00:00:00")/IPv6()/TCP()/("X"* (lambda x: x - 78 if x > 78 else 0)(%d))'}
+ pkts = {'IP/UDP': 'Ether(dst="%s")/IP()/UDP()/("X"*(%d-46))',
+ 'IP/TCP': 'Ether(dst="%s")/IP()/TCP()/("X"*(%d-58))',
+ 'IP/SCTP': 'Ether(dst="%s")/IP()/SCTP()/("X"*(%d-50+2))',
+ 'IPv6/UDP': 'Ether(dst="%s")/IPv6()/UDP()/("X"* (lambda x: x - 66 if x > 66 else 0)(%d))',
+ 'IPv6/TCP': 'Ether(dst="%s")/IPv6()/TCP()/("X"* (lambda x: x - 78 if x > 78 else 0)(%d))'}
lcore = "1S/2C/1T"
portMask = dts.create_mask([self.dut_ports[0], self.dut_ports[1]])
--
1.9.3
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [dts] [PATCH] tests checksum_offload: remove source mac filter
2015-11-03 3:07 [dts] [PATCH] tests checksum_offload: remove source mac filter Yong Liu
@ 2015-11-03 8:08 ` Tang, HaifengX
2015-11-03 9:27 ` Liu, Yong
0 siblings, 1 reply; 3+ messages in thread
From: Tang, HaifengX @ 2015-11-03 8:08 UTC (permalink / raw)
To: Liu, Yong, dts; +Cc: Gu, YongjieX
Hi liuyong:
This patch have been verified by yongjie , and u can merge it toady .
thanks
>
>
>-----Original Message-----
>From: dts [mailto:dts-bounces@dpdk.org] On Behalf Of Yong Liu
>Sent: Tuesday, November 03, 2015 11:07 AM
>To: dts@dpdk.org
>Subject: [dts] [PATCH] tests checksum_offload: remove source mac filter
>
>From: Marvin Liu <yong.liu@intel.com>
>
>testpmd csum forwarding will replace source mac address with port mac.
>So remove source mac filter from this case.
>
>Signed-off-by: Marvin Liu <yong.liu@intel.com>
>
>diff --git a/tests/TestSuite_checksum_offload.py b/tests/TestSuite_checksum_offload.py
>index abfebb6..0f3c8af 100644
>--- a/tests/TestSuite_checksum_offload.py
>+++ b/tests/TestSuite_checksum_offload.py
>@@ -109,7 +109,7 @@ class TestChecksumOffload(TestCase):
> self.tester.scapy_append('sys.path.append("./")')
> self.tester.scapy_append('import sctp')
> self.tester.scapy_append('from sctp import *')
>- self.tester.scapy_append('p = sniff(filter="ether src 52:00:00:00:00:00", iface="%s", count=%d)' % (rx_interface, len(packets_sent)))
>+ self.tester.scapy_append('p = sniff(iface="%s", count=%d)' %
>+ (rx_interface, len(packets_sent)))
> self.tester.scapy_append('nr_packets=len(p)')
> self.tester.scapy_append('reslist = [p[i].sprintf("%IP.chksum%;%TCP.chksum%;%UDP.chksum%;%SCTP.chksum%") for i in range(nr_packets)]')
> self.tester.scapy_append('import string') @@ -162,16 +162,16 @@ class TestChecksumOffload(TestCase):
> traffic generator side.
> """
> dmac = self.dut.get_mac_address(self.dut_ports[1])
>- pktsChkErr = {'IP/UDP': 'Ether(dst="%s", src="52:00:00:00:00:00")/IP(chksum=0x0)/UDP(chksum=0xf)/("X"*46)' % dmac,
>- 'IP/TCP': 'Ether(dst="%s", src="52:00:00:00:00:00")/IP(chksum=0x0)/TCP(chksum=0xf)/("X"*46)' % dmac,
>- 'IP/SCTP': 'Ether(dst="%s", src="52:00:00:00:00:00")/IP(chksum=0x0)/SCTP(chksum=0xf)/("X"*48)' % dmac,
>- 'IPv6/UDP': 'Ether(dst="%s", src="52:00:00:00:00:00")/IPv6(src="::1")/UDP(chksum=0xf)/("X"*46)' % dmac,
>- 'IPv6/TCP': 'Ether(dst="%s", src="52:00:00:00:00:00")/IPv6(src="::1")/TCP(chksum=0xf)/("X"*46)' % dmac}
>- pkts = {'IP/UDP': 'Ether(dst="%s", src="52:00:00:00:00:00")/IP(src="127.0.0.2")/UDP()/("X"*46)' % dmac,
>- 'IP/TCP': 'Ether(dst="%s", src="52:00:00:00:00:00")/IP(src="127.0.0.2")/TCP()/("X"*46)' % dmac,
>- 'IP/SCTP': 'Ether(dst="%s", src="52:00:00:00:00:00")/IP(src="127.0.0.2")/SCTP()/("X"*48)' % dmac,
>- 'IPv6/UDP': 'Ether(dst="%s", src="52:00:00:00:00:00")/IPv6(src="::2")/UDP()/("X"*46)' % dmac,
>- 'IPv6/TCP': 'Ether(dst="%s", src="52:00:00:00:00:00")/IPv6(src="::2")/TCP()/("X"*46)' % dmac}
>+ pktsChkErr = {'IP/UDP': 'Ether(dst="%s")/IP(chksum=0x0)/UDP(chksum=0xf)/("X"*46)' % dmac,
>+ 'IP/TCP': 'Ether(dst="%s")/IP(chksum=0x0)/TCP(chksum=0xf)/("X"*46)' % dmac,
>+ 'IP/SCTP': 'Ether(dst="%s")/IP(chksum=0x0)/SCTP(chksum=0xf)/("X"*48)' % dmac,
>+ 'IPv6/UDP': 'Ether(dst="%s")/IPv6(src="::1")/UDP(chksum=0xf)/("X"*46)' % dmac,
>+ 'IPv6/TCP': 'Ether(dst="%s")/IPv6(src="::1")/TCP(chksum=0xf)/("X"*46)' % dmac}
>+ pkts = {'IP/UDP': 'Ether(dst="%s")/IP(src="127.0.0.2")/UDP()/("X"*46)' % dmac,
>+ 'IP/TCP': 'Ether(dst="%s")/IP(src="127.0.0.2")/TCP()/("X"*46)' % dmac,
>+ 'IP/SCTP': 'Ether(dst="%s")/IP(src="127.0.0.2")/SCTP()/("X"*48)' % dmac,
>+ 'IPv6/UDP': 'Ether(dst="%s")/IPv6(src="::2")/UDP()/("X"*46)' % dmac,
>+ 'IPv6/TCP':
>+ 'Ether(dst="%s")/IPv6(src="::2")/TCP()/("X"*46)' % dmac}
> self.checksum_enablehw(self.dut_ports[0])
> self.checksum_enablehw(self.dut_ports[1])
> self.dut.send_expect("start", "testpmd>") @@ -188,17 +188,17 @@ class TestChecksumOffload(TestCase):
> """
> dmac = self.dut.get_mac_address(self.dut_ports[1])
>
>- pkts = {'IP/UDP': 'Ether(dst="%s", src="52:00:00:00:00:00")/IP(chksum=0x0)/UDP(chksum=0xf)/("X"*46)' % dmac,
>- 'IP/TCP': 'Ether(dst="%s", src="52:00:00:00:00:00")/IP(chksum=0x0)/TCP(chksum=0xf)/("X"*46)' % dmac,
>- 'IP/SCTP': 'Ether(dst="%s", src="52:00:00:00:00:00")/IP(chksum=0x0)/SCTP(chksum=0xf)/("X"*48)' % dmac,
>- 'IPv6/UDP': 'Ether(dst="%s", src="52:00:00:00:00:00")/IPv6(src="::1")/UDP(chksum=0xf)/("X"*46)' % dmac,
>- 'IPv6/TCP': 'Ether(dst="%s", src="52:00:00:00:00:00")/IPv6(src="::1")/TCP(chksum=0xf)/("X"*46)' % dmac}
>+ pkts = {'IP/UDP': 'Ether(dst="%s")/IP(chksum=0x0)/UDP(chksum=0xf)/("X"*46)' % dmac,
>+ 'IP/TCP': 'Ether(dst="%s")/IP(chksum=0x0)/TCP(chksum=0xf)/("X"*46)' % dmac,
>+ 'IP/SCTP': 'Ether(dst="%s")/IP(chksum=0x0)/SCTP(chksum=0xf)/("X"*48)' % dmac,
>+ 'IPv6/UDP': 'Ether(dst="%s")/IPv6(src="::1")/UDP(chksum=0xf)/("X"*46)' % dmac,
>+ 'IPv6/TCP':
>+ 'Ether(dst="%s")/IPv6(src="::1")/TCP(chksum=0xf)/("X"*46)' % dmac}
>
>- pkts_ref = {'IP/UDP': 'Ether(dst="%s", src="52:00:00:00:00:00")/IP(src="127.0.0.2")/UDP()/("X"*46)' % dmac,
>- 'IP/TCP': 'Ether(dst="%s", src="52:00:00:00:00:00")/IP(src="127.0.0.2")/TCP()/("X"*46)' % dmac,
>- 'IP/SCTP': 'Ether(dst="%s", src="52:00:00:00:00:00")/IP(src="127.0.0.2")/SCTP()/("X"*48)' % dmac,
>- 'IPv6/UDP': 'Ether(dst="%s", src="52:00:00:00:00:00")/IPv6(src="::2")/UDP()/("X"*46)' % dmac,
>- 'IPv6/TCP': 'Ether(dst="%s", src="52:00:00:00:00:00")/IPv6(src="::2")/TCP()/("X"*46)' % dmac}
>+ pkts_ref = {'IP/UDP': 'Ether(dst="%s")/IP(src="127.0.0.2")/UDP()/("X"*46)' % dmac,
>+ 'IP/TCP': 'Ether(dst="%s")/IP(src="127.0.0.2")/TCP()/("X"*46)' % dmac,
>+ 'IP/SCTP': 'Ether(dst="%s")/IP(src="127.0.0.2")/SCTP()/("X"*48)' % dmac,
>+ 'IPv6/UDP': 'Ether(dst="%s")/IPv6(src="::2")/UDP()/("X"*46)' % dmac,
>+ 'IPv6/TCP':
>+ 'Ether(dst="%s")/IPv6(src="::2")/TCP()/("X"*46)' % dmac}
>
> self.checksum_enablehw(self.dut_ports[0])
> self.checksum_enablehw(self.dut_ports[1])
>@@ -221,17 +221,17 @@ class TestChecksumOffload(TestCase):
> dmac = self.dut.get_mac_address(self.dut_ports[1])
> sndIP = '10.0.0.1'
> sndIPv6 = '::1'
>- sndPkts = {'IP/UDP': 'Ether(dst="%s", src="52:00:00:00:00:00")/IP(src="%s",chksum=0x0)/UDP(chksum=0xf)/("X"*46)' % (dmac, sndIP),
>- 'IP/TCP': 'Ether(dst="%s", src="52:00:00:00:00:00")/IP(src="%s",chksum=0x0)/TCP(chksum=0xf)/("X"*46)' % (dmac, sndIP),
>- 'IPv6/UDP': 'Ether(dst="%s", src="52:00:00:00:00:00")/IPv6(src="%s")/UDP(chksum=0xf)/("X"*46)' % (dmac, sndIPv6),
>- 'IPv6/TCP': 'Ether(dst="%s", src="52:00:00:00:00:00")/IPv6(src="%s")/TCP(chksum=0xf)/("X"*46)' % (dmac, sndIPv6)}
>+ sndPkts = {'IP/UDP': 'Ether(dst="%s")/IP(src="%s",chksum=0x0)/UDP(chksum=0xf)/("X"*46)' % (dmac, sndIP),
>+ 'IP/TCP': 'Ether(dst="%s")/IP(src="%s",chksum=0x0)/TCP(chksum=0xf)/("X"*46)' % (dmac, sndIP),
>+ 'IPv6/UDP': 'Ether(dst="%s")/IPv6(src="%s")/UDP(chksum=0xf)/("X"*46)' % (dmac, sndIPv6),
>+ 'IPv6/TCP':
>+ 'Ether(dst="%s")/IPv6(src="%s")/TCP(chksum=0xf)/("X"*46)' % (dmac,
>+ sndIPv6)}
>
> expIP = "10.0.0.2"
> expIPv6 = '::2'
>- expPkts = {'IP/UDP': 'Ether(dst="%s", src="52:00:00:00:00:00")/IP(src="%s")/UDP()/("X"*46)' % (dmac, expIP),
>- 'IP/TCP': 'Ether(dst="%s", src="52:00:00:00:00:00")/IP(src="%s")/TCP()/("X"*46)' % (dmac, expIP),
>- 'IPv6/UDP': 'Ether(dst="%s", src="52:00:00:00:00:00")/IPv6(src="%s")/UDP()/("X"*46)' % (dmac, expIPv6),
>- 'IPv6/TCP': 'Ether(dst="%s", src="52:00:00:00:00:00")/IPv6(src="%s")/TCP()/("X"*46)' % (dmac, expIPv6)}
>+ expPkts = {'IP/UDP': 'Ether(dst="%s")/IP(src="%s")/UDP()/("X"*46)' % (dmac, expIP),
>+ 'IP/TCP': 'Ether(dst="%s")/IP(src="%s")/TCP()/("X"*46)' % (dmac, expIP),
>+ 'IPv6/UDP': 'Ether(dst="%s")/IPv6(src="%s")/UDP()/("X"*46)' % (dmac, expIPv6),
>+ 'IPv6/TCP':
>+ 'Ether(dst="%s")/IPv6(src="%s")/TCP()/("X"*46)' % (dmac, expIPv6)}
>
> self.dut.send_expect("start", "testpmd>")
> result = self.checksum_validate(sndPkts, expPkts) @@ -277,11 +277,11 @@ class TestChecksumOffload(TestCase):
> """
> # sizes = [64, 128, 256, 512, 1024]
> sizes = [64, 128]
>- pkts = {'IP/UDP': 'Ether(dst="%s", src="52:00:00:00:00:00")/IP()/UDP()/("X"*(%d-46))',
>- 'IP/TCP': 'Ether(dst="%s", src="52:00:00:00:00:00")/IP()/TCP()/("X"*(%d-58))',
>- 'IP/SCTP': 'Ether(dst="%s", src="52:00:00:00:00:00")/IP()/SCTP()/("X"*(%d-50+2))',
>- 'IPv6/UDP': 'Ether(dst="%s", src="52:00:00:00:00:00")/IPv6()/UDP()/("X"* (lambda x: x - 66 if x > 66 else 0)(%d))',
>- 'IPv6/TCP': 'Ether(dst="%s", src="52:00:00:00:00:00")/IPv6()/TCP()/("X"* (lambda x: x - 78 if x > 78 else 0)(%d))'}
>+ pkts = {'IP/UDP': 'Ether(dst="%s")/IP()/UDP()/("X"*(%d-46))',
>+ 'IP/TCP': 'Ether(dst="%s")/IP()/TCP()/("X"*(%d-58))',
>+ 'IP/SCTP': 'Ether(dst="%s")/IP()/SCTP()/("X"*(%d-50+2))',
>+ 'IPv6/UDP': 'Ether(dst="%s")/IPv6()/UDP()/("X"* (lambda x: x - 66 if x > 66 else 0)(%d))',
>+ 'IPv6/TCP': 'Ether(dst="%s")/IPv6()/TCP()/("X"* (lambda
>+ x: x - 78 if x > 78 else 0)(%d))'}
>
> lcore = "1S/2C/1T"
> portMask = dts.create_mask([self.dut_ports[0], self.dut_ports[1]])
>--
>1.9.3
>
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [dts] [PATCH] tests checksum_offload: remove source mac filter
2015-11-03 8:08 ` Tang, HaifengX
@ 2015-11-03 9:27 ` Liu, Yong
0 siblings, 0 replies; 3+ messages in thread
From: Liu, Yong @ 2015-11-03 9:27 UTC (permalink / raw)
To: Tang, HaifengX, dts; +Cc: Gu, YongjieX
Thanks for check the patch, applied in.
> -----Original Message-----
> From: Tang, HaifengX
> Sent: Tuesday, November 03, 2015 4:09 PM
> To: Liu, Yong; dts@dpdk.org
> Cc: Gu, YongjieX
> Subject: RE: [dts] [PATCH] tests checksum_offload: remove source mac
> filter
>
> Hi liuyong:
> This patch have been verified by yongjie , and u can merge it toady .
>
> thanks
> >
> >
> >-----Original Message-----
> >From: dts [mailto:dts-bounces@dpdk.org] On Behalf Of Yong Liu
> >Sent: Tuesday, November 03, 2015 11:07 AM
> >To: dts@dpdk.org
> >Subject: [dts] [PATCH] tests checksum_offload: remove source mac filter
> >
> >From: Marvin Liu <yong.liu@intel.com>
> >
> >testpmd csum forwarding will replace source mac address with port mac.
> >So remove source mac filter from this case.
> >
> >Signed-off-by: Marvin Liu <yong.liu@intel.com>
> >
> >diff --git a/tests/TestSuite_checksum_offload.py
> b/tests/TestSuite_checksum_offload.py
> >index abfebb6..0f3c8af 100644
> >--- a/tests/TestSuite_checksum_offload.py
> >+++ b/tests/TestSuite_checksum_offload.py
> >@@ -109,7 +109,7 @@ class TestChecksumOffload(TestCase):
> > self.tester.scapy_append('sys.path.append("./")')
> > self.tester.scapy_append('import sctp')
> > self.tester.scapy_append('from sctp import *')
> >- self.tester.scapy_append('p = sniff(filter="ether src
> 52:00:00:00:00:00", iface="%s", count=%d)' % (rx_interface,
> len(packets_sent)))
> >+ self.tester.scapy_append('p = sniff(iface="%s", count=%d)' %
> >+ (rx_interface, len(packets_sent)))
> > self.tester.scapy_append('nr_packets=len(p)')
> > self.tester.scapy_append('reslist =
> [p[i].sprintf("%IP.chksum%;%TCP.chksum%;%UDP.chksum%;%SCTP.chksum%") for i
> in range(nr_packets)]')
> > self.tester.scapy_append('import string') @@ -162,16 +162,16 @@
> class TestChecksumOffload(TestCase):
> > traffic generator side.
> > """
> > dmac = self.dut.get_mac_address(self.dut_ports[1])
> >- pktsChkErr = {'IP/UDP': 'Ether(dst="%s",
> src="52:00:00:00:00:00")/IP(chksum=0x0)/UDP(chksum=0xf)/("X"*46)' % dmac,
> >- 'IP/TCP': 'Ether(dst="%s",
> src="52:00:00:00:00:00")/IP(chksum=0x0)/TCP(chksum=0xf)/("X"*46)' % dmac,
> >- 'IP/SCTP': 'Ether(dst="%s",
> src="52:00:00:00:00:00")/IP(chksum=0x0)/SCTP(chksum=0xf)/("X"*48)' % dmac,
> >- 'IPv6/UDP': 'Ether(dst="%s",
> src="52:00:00:00:00:00")/IPv6(src="::1")/UDP(chksum=0xf)/("X"*46)' % dmac,
> >- 'IPv6/TCP': 'Ether(dst="%s",
> src="52:00:00:00:00:00")/IPv6(src="::1")/TCP(chksum=0xf)/("X"*46)' % dmac}
> >- pkts = {'IP/UDP': 'Ether(dst="%s",
> src="52:00:00:00:00:00")/IP(src="127.0.0.2")/UDP()/("X"*46)' % dmac,
> >- 'IP/TCP': 'Ether(dst="%s",
> src="52:00:00:00:00:00")/IP(src="127.0.0.2")/TCP()/("X"*46)' % dmac,
> >- 'IP/SCTP': 'Ether(dst="%s",
> src="52:00:00:00:00:00")/IP(src="127.0.0.2")/SCTP()/("X"*48)' % dmac,
> >- 'IPv6/UDP': 'Ether(dst="%s",
> src="52:00:00:00:00:00")/IPv6(src="::2")/UDP()/("X"*46)' % dmac,
> >- 'IPv6/TCP': 'Ether(dst="%s",
> src="52:00:00:00:00:00")/IPv6(src="::2")/TCP()/("X"*46)' % dmac}
> >+ pktsChkErr = {'IP/UDP':
> 'Ether(dst="%s")/IP(chksum=0x0)/UDP(chksum=0xf)/("X"*46)' % dmac,
> >+ 'IP/TCP':
> 'Ether(dst="%s")/IP(chksum=0x0)/TCP(chksum=0xf)/("X"*46)' % dmac,
> >+ 'IP/SCTP':
> 'Ether(dst="%s")/IP(chksum=0x0)/SCTP(chksum=0xf)/("X"*48)' % dmac,
> >+ 'IPv6/UDP':
> 'Ether(dst="%s")/IPv6(src="::1")/UDP(chksum=0xf)/("X"*46)' % dmac,
> >+ 'IPv6/TCP':
> 'Ether(dst="%s")/IPv6(src="::1")/TCP(chksum=0xf)/("X"*46)' % dmac}
> >+ pkts = {'IP/UDP':
> 'Ether(dst="%s")/IP(src="127.0.0.2")/UDP()/("X"*46)' % dmac,
> >+ 'IP/TCP':
> 'Ether(dst="%s")/IP(src="127.0.0.2")/TCP()/("X"*46)' % dmac,
> >+ 'IP/SCTP':
> 'Ether(dst="%s")/IP(src="127.0.0.2")/SCTP()/("X"*48)' % dmac,
> >+ 'IPv6/UDP':
> 'Ether(dst="%s")/IPv6(src="::2")/UDP()/("X"*46)' % dmac,
> >+ 'IPv6/TCP':
> >+ 'Ether(dst="%s")/IPv6(src="::2")/TCP()/("X"*46)' % dmac}
> > self.checksum_enablehw(self.dut_ports[0])
> > self.checksum_enablehw(self.dut_ports[1])
> > self.dut.send_expect("start", "testpmd>") @@ -188,17 +188,17 @@
> class TestChecksumOffload(TestCase):
> > """
> > dmac = self.dut.get_mac_address(self.dut_ports[1])
> >
> >- pkts = {'IP/UDP': 'Ether(dst="%s",
> src="52:00:00:00:00:00")/IP(chksum=0x0)/UDP(chksum=0xf)/("X"*46)' % dmac,
> >- 'IP/TCP': 'Ether(dst="%s",
> src="52:00:00:00:00:00")/IP(chksum=0x0)/TCP(chksum=0xf)/("X"*46)' % dmac,
> >- 'IP/SCTP': 'Ether(dst="%s",
> src="52:00:00:00:00:00")/IP(chksum=0x0)/SCTP(chksum=0xf)/("X"*48)' % dmac,
> >- 'IPv6/UDP': 'Ether(dst="%s",
> src="52:00:00:00:00:00")/IPv6(src="::1")/UDP(chksum=0xf)/("X"*46)' % dmac,
> >- 'IPv6/TCP': 'Ether(dst="%s",
> src="52:00:00:00:00:00")/IPv6(src="::1")/TCP(chksum=0xf)/("X"*46)' % dmac}
> >+ pkts = {'IP/UDP':
> 'Ether(dst="%s")/IP(chksum=0x0)/UDP(chksum=0xf)/("X"*46)' % dmac,
> >+ 'IP/TCP':
> 'Ether(dst="%s")/IP(chksum=0x0)/TCP(chksum=0xf)/("X"*46)' % dmac,
> >+ 'IP/SCTP':
> 'Ether(dst="%s")/IP(chksum=0x0)/SCTP(chksum=0xf)/("X"*48)' % dmac,
> >+ 'IPv6/UDP':
> 'Ether(dst="%s")/IPv6(src="::1")/UDP(chksum=0xf)/("X"*46)' % dmac,
> >+ 'IPv6/TCP':
> >+ 'Ether(dst="%s")/IPv6(src="::1")/TCP(chksum=0xf)/("X"*46)' % dmac}
> >
> >- pkts_ref = {'IP/UDP': 'Ether(dst="%s",
> src="52:00:00:00:00:00")/IP(src="127.0.0.2")/UDP()/("X"*46)' % dmac,
> >- 'IP/TCP': 'Ether(dst="%s",
> src="52:00:00:00:00:00")/IP(src="127.0.0.2")/TCP()/("X"*46)' % dmac,
> >- 'IP/SCTP': 'Ether(dst="%s",
> src="52:00:00:00:00:00")/IP(src="127.0.0.2")/SCTP()/("X"*48)' % dmac,
> >- 'IPv6/UDP': 'Ether(dst="%s",
> src="52:00:00:00:00:00")/IPv6(src="::2")/UDP()/("X"*46)' % dmac,
> >- 'IPv6/TCP': 'Ether(dst="%s",
> src="52:00:00:00:00:00")/IPv6(src="::2")/TCP()/("X"*46)' % dmac}
> >+ pkts_ref = {'IP/UDP':
> 'Ether(dst="%s")/IP(src="127.0.0.2")/UDP()/("X"*46)' % dmac,
> >+ 'IP/TCP':
> 'Ether(dst="%s")/IP(src="127.0.0.2")/TCP()/("X"*46)' % dmac,
> >+ 'IP/SCTP':
> 'Ether(dst="%s")/IP(src="127.0.0.2")/SCTP()/("X"*48)' % dmac,
> >+ 'IPv6/UDP':
> 'Ether(dst="%s")/IPv6(src="::2")/UDP()/("X"*46)' % dmac,
> >+ 'IPv6/TCP':
> >+ 'Ether(dst="%s")/IPv6(src="::2")/TCP()/("X"*46)' % dmac}
> >
> > self.checksum_enablehw(self.dut_ports[0])
> > self.checksum_enablehw(self.dut_ports[1])
> >@@ -221,17 +221,17 @@ class TestChecksumOffload(TestCase):
> > dmac = self.dut.get_mac_address(self.dut_ports[1])
> > sndIP = '10.0.0.1'
> > sndIPv6 = '::1'
> >- sndPkts = {'IP/UDP': 'Ether(dst="%s",
> src="52:00:00:00:00:00")/IP(src="%s",chksum=0x0)/UDP(chksum=0xf)/("X"*46)'
> % (dmac, sndIP),
> >- 'IP/TCP': 'Ether(dst="%s",
> src="52:00:00:00:00:00")/IP(src="%s",chksum=0x0)/TCP(chksum=0xf)/("X"*46)'
> % (dmac, sndIP),
> >- 'IPv6/UDP': 'Ether(dst="%s",
> src="52:00:00:00:00:00")/IPv6(src="%s")/UDP(chksum=0xf)/("X"*46)' % (dmac,
> sndIPv6),
> >- 'IPv6/TCP': 'Ether(dst="%s",
> src="52:00:00:00:00:00")/IPv6(src="%s")/TCP(chksum=0xf)/("X"*46)' % (dmac,
> sndIPv6)}
> >+ sndPkts = {'IP/UDP':
> 'Ether(dst="%s")/IP(src="%s",chksum=0x0)/UDP(chksum=0xf)/("X"*46)' % (dmac,
> sndIP),
> >+ 'IP/TCP':
> 'Ether(dst="%s")/IP(src="%s",chksum=0x0)/TCP(chksum=0xf)/("X"*46)' % (dmac,
> sndIP),
> >+ 'IPv6/UDP':
> 'Ether(dst="%s")/IPv6(src="%s")/UDP(chksum=0xf)/("X"*46)' % (dmac,
> sndIPv6),
> >+ 'IPv6/TCP':
> >+ 'Ether(dst="%s")/IPv6(src="%s")/TCP(chksum=0xf)/("X"*46)' % (dmac,
> >+ sndIPv6)}
> >
> > expIP = "10.0.0.2"
> > expIPv6 = '::2'
> >- expPkts = {'IP/UDP': 'Ether(dst="%s",
> src="52:00:00:00:00:00")/IP(src="%s")/UDP()/("X"*46)' % (dmac, expIP),
> >- 'IP/TCP': 'Ether(dst="%s",
> src="52:00:00:00:00:00")/IP(src="%s")/TCP()/("X"*46)' % (dmac, expIP),
> >- 'IPv6/UDP': 'Ether(dst="%s",
> src="52:00:00:00:00:00")/IPv6(src="%s")/UDP()/("X"*46)' % (dmac, expIPv6),
> >- 'IPv6/TCP': 'Ether(dst="%s",
> src="52:00:00:00:00:00")/IPv6(src="%s")/TCP()/("X"*46)' % (dmac, expIPv6)}
> >+ expPkts = {'IP/UDP':
> 'Ether(dst="%s")/IP(src="%s")/UDP()/("X"*46)' % (dmac, expIP),
> >+ 'IP/TCP':
> 'Ether(dst="%s")/IP(src="%s")/TCP()/("X"*46)' % (dmac, expIP),
> >+ 'IPv6/UDP':
> 'Ether(dst="%s")/IPv6(src="%s")/UDP()/("X"*46)' % (dmac, expIPv6),
> >+ 'IPv6/TCP':
> >+ 'Ether(dst="%s")/IPv6(src="%s")/TCP()/("X"*46)' % (dmac, expIPv6)}
> >
> > self.dut.send_expect("start", "testpmd>")
> > result = self.checksum_validate(sndPkts, expPkts) @@ -277,11
> +277,11 @@ class TestChecksumOffload(TestCase):
> > """
> > # sizes = [64, 128, 256, 512, 1024]
> > sizes = [64, 128]
> >- pkts = {'IP/UDP': 'Ether(dst="%s",
> src="52:00:00:00:00:00")/IP()/UDP()/("X"*(%d-46))',
> >- 'IP/TCP': 'Ether(dst="%s",
> src="52:00:00:00:00:00")/IP()/TCP()/("X"*(%d-58))',
> >- 'IP/SCTP': 'Ether(dst="%s",
> src="52:00:00:00:00:00")/IP()/SCTP()/("X"*(%d-50+2))',
> >- 'IPv6/UDP': 'Ether(dst="%s",
> src="52:00:00:00:00:00")/IPv6()/UDP()/("X"* (lambda x: x - 66 if x > 66
> else 0)(%d))',
> >- 'IPv6/TCP': 'Ether(dst="%s",
> src="52:00:00:00:00:00")/IPv6()/TCP()/("X"* (lambda x: x - 78 if x > 78
> else 0)(%d))'}
> >+ pkts = {'IP/UDP': 'Ether(dst="%s")/IP()/UDP()/("X"*(%d-46))',
> >+ 'IP/TCP': 'Ether(dst="%s")/IP()/TCP()/("X"*(%d-58))',
> >+ 'IP/SCTP': 'Ether(dst="%s")/IP()/SCTP()/("X"*(%d-50+2))',
> >+ 'IPv6/UDP': 'Ether(dst="%s")/IPv6()/UDP()/("X"* (lambda
> x: x - 66 if x > 66 else 0)(%d))',
> >+ 'IPv6/TCP': 'Ether(dst="%s")/IPv6()/TCP()/("X"* (lambda
> >+ x: x - 78 if x > 78 else 0)(%d))'}
> >
> > lcore = "1S/2C/1T"
> > portMask = dts.create_mask([self.dut_ports[0],
> self.dut_ports[1]])
> >--
> >1.9.3
> >
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2015-11-03 9:31 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-11-03 3:07 [dts] [PATCH] tests checksum_offload: remove source mac filter Yong Liu
2015-11-03 8:08 ` Tang, HaifengX
2015-11-03 9:27 ` Liu, Yong
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).