test suite reviews and discussions
 help / color / mirror / Atom feed
* [dts] [PATCH V1] tests/cvl_switch_filter_pppoe: change ppp port to bytes type
@ 2021-09-30 16:28 Zou Ping
  2021-10-26  5:37 ` Tu, Lijuan
  0 siblings, 1 reply; 2+ messages in thread
From: Zou Ping @ 2021-09-30 16:28 UTC (permalink / raw)
  To: dts; +Cc: Zou Ping

scapy will ignore 00,but dpdk only two bytes can be recognized

Signed-off-by: Zou Ping <pingx.zou@intel.com>
---
 tests/TestSuite_cvl_switch_filter_pppoe.py | 32 +++++++++++-----------
 1 file changed, 16 insertions(+), 16 deletions(-)

diff --git a/tests/TestSuite_cvl_switch_filter_pppoe.py b/tests/TestSuite_cvl_switch_filter_pppoe.py
index a33bb2f..97ca94d 100644
--- a/tests/TestSuite_cvl_switch_filter_pppoe.py
+++ b/tests/TestSuite_cvl_switch_filter_pppoe.py
@@ -113,9 +113,9 @@ tvs_ethertype_filter_pppoes = [
 #ipv4/ipv6 + udp/tcp pipeline mode
 mac_pppoes_ipv4_udp_l4_mask_scapy_str = {
     "matched": [
-        'Ether()/PPPoE(sessionid=3)/PPP(proto=0x0021)/IP(src="192.168.1.1", dst="192.168.1.2")/UDP(sport=2304,dport=23)/Raw("x"*80)'],
+        'Ether()/PPPoE(sessionid=3)/PPP(b\'\\x00\\x21\')/IP(src="192.168.1.1", dst="192.168.1.2")/UDP(sport=2304,dport=23)/Raw("x"*80)'],
     "mismatched": [
-        'Ether()/PPPoE(sessionid=3)/PPP(proto=0x0021)/IP(src="192.168.1.1", dst="192.168.1.2")/UDP(sport=2244,dport=23)/Raw("x"*80)'
+        'Ether()/PPPoE(sessionid=3)/PPP(b\'\\x00\\x21\')/IP(src="192.168.1.1", dst="192.168.1.2")/UDP(sport=2244,dport=23)/Raw("x"*80)'
     ]
 }
 
@@ -137,9 +137,9 @@ tv_mac_pppoes_ipv4_udp_l4_mask_in_queue_01 = {
 
 mac_pppoes_ipv4_tcp_l4_mask_scapy_str = {
     "matched": [
-        'Ether()/PPPoE(sessionid=3)/PPP(proto=0x0021)/IP(src="192.168.1.1", dst="192.168.1.2")/TCP(sport=2304,dport=23)/Raw("x"*80)'],
+        'Ether()/PPPoE(sessionid=3)/PPP(b\'\\x00\\x21\')/IP(src="192.168.1.1", dst="192.168.1.2")/TCP(sport=2304,dport=23)/Raw("x"*80)'],
     "mismatched": [
-        'Ether()/PPPoE(sessionid=3)/PPP(proto=0x0021)/IP(src="192.168.1.1", dst="192.168.1.2")/TCP(sport=2244,dport=23)/Raw("x"*80)'
+        'Ether()/PPPoE(sessionid=3)/PPP(b\'\\x00\\x21\')/IP(src="192.168.1.1", dst="192.168.1.2")/TCP(sport=2244,dport=23)/Raw("x"*80)'
     ]
 }
 
@@ -161,9 +161,9 @@ tv_mac_pppoes_ipv4_tcp_l4_mask_in_queue_02 = {
 
 mac_pppoes_ipv6_udp_l4_mask_scapy_str = {
     "matched":[
-        'Ether()/PPPoE(sessionid=3)/PPP(proto=0x0057)/IPv6(src="CDCD:910A:2222:5498:8475:1111:3900:1536", dst="CDCD:910A:2222:5498:8475:1111:3900:2022")/UDP(sport=25,dport=1282)/Raw("x"*80)'],
+        'Ether()/PPPoE(sessionid=3)/PPP(b\'\\x00\\x57\')/IPv6(src="CDCD:910A:2222:5498:8475:1111:3900:1536", dst="CDCD:910A:2222:5498:8475:1111:3900:2022")/UDP(sport=25,dport=1282)/Raw("x"*80)'],
     "mismatched": [
-        'Ether()/PPPoE(sessionid=3)/PPP(proto=0x0057)/IPv6(src="CDCD:910A:2222:5498:8475:1111:3900:1536", dst="CDCD:910A:2222:5498:8475:1111:3900:2022")/UDP(sport=25,dport=1040)/Raw("x"*80)'
+        'Ether()/PPPoE(sessionid=3)/PPP(b\'\\x00\\x57\')/IPv6(src="CDCD:910A:2222:5498:8475:1111:3900:1536", dst="CDCD:910A:2222:5498:8475:1111:3900:2022")/UDP(sport=25,dport=1040)/Raw("x"*80)'
     ]
 }
 
@@ -185,9 +185,9 @@ tv_mac_pppoes_ipv6_udp_l4_mask_queue_region_03 = {
 
 mac_pppoes_ipv6_tcp_l4_mask_scapy_str = {
     "matched":[
-        'Ether()/PPPoE(sessionid=3)/PPP(proto=0x0057)/IPv6(src="CDCD:910A:2222:5498:8475:1111:3900:1536", dst="CDCD:910A:2222:5498:8475:1111:3900:2022")/TCP(sport=25,dport=1282)/Raw("x"*80)'],
+        'Ether()/PPPoE(sessionid=3)/PPP(b\'\\x00\\x57\')/IPv6(src="CDCD:910A:2222:5498:8475:1111:3900:1536", dst="CDCD:910A:2222:5498:8475:1111:3900:2022")/TCP(sport=25,dport=1282)/Raw("x"*80)'],
     "mismatched": [
-        'Ether()/PPPoE(sessionid=3)/PPP(proto=0x0057)/IPv6(src="CDCD:910A:2222:5498:8475:1111:3900:1536", dst="CDCD:910A:2222:5498:8475:1111:3900:2022")/TCP(sport=25,dport=1040)/Raw("x"*80)'
+        'Ether()/PPPoE(sessionid=3)/PPP(b\'\\x00\\x57\')/IPv6(src="CDCD:910A:2222:5498:8475:1111:3900:1536", dst="CDCD:910A:2222:5498:8475:1111:3900:2022")/TCP(sport=25,dport=1040)/Raw("x"*80)'
     ]
 }
 
@@ -218,9 +218,9 @@ tvs_mac_pppoes_l4_mask = [
 
 mac_vlan_pppoes_ipv4_udp_l4_mask_scapy_str = {
     "matched": [
-        'Ether()/Dot1Q(vlan=1,type=0x8864)/PPPoE(sessionid=3)/PPP(proto=0x0021)/IP(src="192.168.1.1", dst="192.168.1.2")/UDP(sport=50,dport=1024)/Raw("x"*80)'],
+        'Ether()/Dot1Q(vlan=1,type=0x8864)/PPPoE(sessionid=3)/PPP(b\'\\x00\\x21\')/IP(src="192.168.1.1", dst="192.168.1.2")/UDP(sport=50,dport=1024)/Raw("x"*80)'],
     "mismatched": [
-        'Ether()/Dot1Q(vlan=1,type=0x8864)/PPPoE(sessionid=3)/PPP(proto=0x0021)/IP(src="192.168.1.1", dst="192.168.1.2")/UDP(sport=50,dport=1281)/Raw("x"*80)'
+        'Ether()/Dot1Q(vlan=1,type=0x8864)/PPPoE(sessionid=3)/PPP(b\'\\x00\\x21\')/IP(src="192.168.1.1", dst="192.168.1.2")/UDP(sport=50,dport=1281)/Raw("x"*80)'
     ]
 }
 
@@ -242,9 +242,9 @@ tv_mac_vlan_pppoes_ipv4_udp_l4_mask_in_queue_01 = {
 
 mac_vlan_pppoes_ipv4_tcp_l4_mask_scapy_str = {
     "matched": [
-        'Ether()/Dot1Q(vlan=1,type=0x8864)/PPPoE(sessionid=3)/PPP(proto=0x0021)/IP(src="192.168.1.1", dst="192.168.1.2")/TCP(sport=50,dport=1024)/Raw("x"*80)'],
+        'Ether()/Dot1Q(vlan=1,type=0x8864)/PPPoE(sessionid=3)/PPP(b\'\\x00\\x21\')/IP(src="192.168.1.1", dst="192.168.1.2")/TCP(sport=50,dport=1024)/Raw("x"*80)'],
     "mismatched": [
-        'Ether()/Dot1Q(vlan=1,type=0x8864)/PPPoE(sessionid=3)/PPP(proto=0x0021)/IP(src="192.168.1.1", dst="192.168.1.2")/TCP(sport=50,dport=1281)/Raw("x"*80)'
+        'Ether()/Dot1Q(vlan=1,type=0x8864)/PPPoE(sessionid=3)/PPP(b\'\\x00\\x21\')/IP(src="192.168.1.1", dst="192.168.1.2")/TCP(sport=50,dport=1281)/Raw("x"*80)'
     ]
 }
 
@@ -267,9 +267,9 @@ tv_mac_vlan_pppoes_ipv4_tcp_l4_mask_queue_region_02 = {
 #vlan pipeline mode
 mac_vlan_pppoes_ipv6_udp_l4_mask_scapy_str = {
     "matched":[
-        'Ether()/Dot1Q(vlan=1,type=0x8864)/PPPoE(sessionid=3)/PPP(proto=0x0057)/IPv6(src="CDCD:910A:2222:5498:8475:1111:3900:1536", dst="CDCD:910A:2222:5498:8475:1111:3900:2022")/UDP(sport=16,dport=23)/Raw("x"*80)'],
+        'Ether()/Dot1Q(vlan=1,type=0x8864)/PPPoE(sessionid=3)/PPP(b\'\\x00\\x57\')/IPv6(src="CDCD:910A:2222:5498:8475:1111:3900:1536", dst="CDCD:910A:2222:5498:8475:1111:3900:2022")/UDP(sport=16,dport=23)/Raw("x"*80)'],
     "mismatched": [
-        'Ether()/Dot1Q(vlan=1,type=0x8864)/PPPoE(sessionid=3)/PPP(proto=0x0057)/IPv6(src="CDCD:910A:2222:5498:8475:1111:3900:1536", dst="CDCD:910A:2222:5498:8475:1111:3900:2022")/UDP(sport=17,dport=23)/Raw("x"*80)'
+        'Ether()/Dot1Q(vlan=1,type=0x8864)/PPPoE(sessionid=3)/PPP(b\'\\x00\\x57\')/IPv6(src="CDCD:910A:2222:5498:8475:1111:3900:1536", dst="CDCD:910A:2222:5498:8475:1111:3900:2022")/UDP(sport=17,dport=23)/Raw("x"*80)'
     ]
 }
 
@@ -291,9 +291,9 @@ tv_mac_vlan_pppoes_ipv6_udp_l4_mask_drop_03 = {
 
 mac_vlan_pppoes_ipv6_tcp_l4_mask_scapy_str = {
     "matched": [
-        'Ether()/Dot1Q(vlan=1,type=0x8864)/PPPoE(sessionid=3)/PPP(proto=0x0057)/IPv6(src="CDCD:910A:2222:5498:8475:1111:3900:1536", dst="CDCD:910A:2222:5498:8475:1111:3900:2022")/TCP(dport=16)/Raw("x"*80)'],
+        'Ether()/Dot1Q(vlan=1,type=0x8864)/PPPoE(sessionid=3)/PPP(b\'\\x00\\x57\')/IPv6(src="CDCD:910A:2222:5498:8475:1111:3900:1536", dst="CDCD:910A:2222:5498:8475:1111:3900:2022")/TCP(dport=16)/Raw("x"*80)'],
     "mismatched": [
-        'Ether()/Dot1Q(vlan=1,type=0x8864)/PPPoE(sessionid=3)/PPP(proto=0x0057)/IPv6(src="CDCD:910A:2222:5498:8475:1111:3900:1536", dst="CDCD:910A:2222:5498:8475:1111:3900:2022")/TCP(dport=17)/Raw("x"*80)'
+        'Ether()/Dot1Q(vlan=1,type=0x8864)/PPPoE(sessionid=3)/PPP(b\'\\x00\\x57\')/IPv6(src="CDCD:910A:2222:5498:8475:1111:3900:1536", dst="CDCD:910A:2222:5498:8475:1111:3900:2022")/TCP(dport=17)/Raw("x"*80)'
     ]
 }
 
-- 
2.17.1


^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [dts] [PATCH V1] tests/cvl_switch_filter_pppoe: change ppp port to bytes type
  2021-09-30 16:28 [dts] [PATCH V1] tests/cvl_switch_filter_pppoe: change ppp port to bytes type Zou Ping
@ 2021-10-26  5:37 ` Tu, Lijuan
  0 siblings, 0 replies; 2+ messages in thread
From: Tu, Lijuan @ 2021-10-26  5:37 UTC (permalink / raw)
  To: Zou, PingX, dts; +Cc: Zou, PingX

> -----Original Message-----
> From: dts <dts-bounces@dpdk.org> On Behalf Of Zou Ping
> Sent: 2021年10月1日 0:29
> To: dts@dpdk.org
> Cc: Zou, PingX <pingx.zou@intel.com>
> Subject: [dts] [PATCH V1] tests/cvl_switch_filter_pppoe: change ppp port to
> bytes type
> 
> scapy will ignore 00,but dpdk only two bytes can be recognized
> 
> Signed-off-by: Zou Ping <pingx.zou@intel.com>

Same changes should be made to test plan.

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2021-10-26  5:37 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-09-30 16:28 [dts] [PATCH V1] tests/cvl_switch_filter_pppoe: change ppp port to bytes type Zou Ping
2021-10-26  5:37 ` Tu, Lijuan

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).