[V1] modify dts adapt for scapy update to 2.4.4
Commit Message
modify dts adapt for scapy update to 2.4.4
Signed-off-by: Zhou Jun <junx.w.zhou@intel.com>
---
tests/TestSuite_ddp_ppp_l2tp.py | 4 ++--
tests/TestSuite_vxlan_gpe_support_in_i40e.py | 4 ++--
2 files changed, 4 insertions(+), 4 deletions(-)
Comments
Tested-by: Zhou, Jun <junx.w.zhou@intel.com>
-----Original Message-----
From: Zhou Jun [mailto:junx.w.zhou@intel.com]
Sent: Thursday, November 12, 2020 11:04 AM
To: dts@dpdk.org
Cc: Zhou, JunX W <junx.w.zhou@intel.com>
Subject: [dts][PATCH V1] modify dts adapt for scapy update to 2.4.4
Acked-by: Haiyang Zhao <haiyangx.zhao@intel.com>
Best Regards,
Zhao Haiyang
> -----Original Message-----
> From: dts <dts-bounces@dpdk.org> On Behalf Of Zhou, JunX W
> Sent: Thursday, November 12, 2020 11:06
> To: Zhou, JunX W <junx.w.zhou@intel.com>; dts@dpdk.org
> Subject: Re: [dts] [PATCH V1] modify dts adapt for scapy update to 2.4.4
>
> Tested-by: Zhou, Jun <junx.w.zhou@intel.com>
>
> -----Original Message-----
> From: Zhou Jun [mailto:junx.w.zhou@intel.com]
> Sent: Thursday, November 12, 2020 11:04 AM
> To: dts@dpdk.org
> Cc: Zhou, JunX W <junx.w.zhou@intel.com>
> Subject: [dts][PATCH V1] modify dts adapt for scapy update to 2.4.4
> modify dts adapt for scapy update to 2.4.4
>
> Signed-off-by: Zhou Jun <junx.w.zhou@intel.com>
Applied
@@ -157,9 +157,9 @@ class TestDdpPppL2tp(TestCase):
if flowtype == 26:
a = Ether(dst="3C:FD:FE:A3:A0:01", src="4C:FD:FE:A3:A0:01")/IP()/UDP(dport=1701, sport=1701)/L2TP(session_id=0x7)/Raw("X"*20)
if flowtype == 28:
- a = Ether()/PPPoE(sessionid=0x7)/PPP(proto=0x21)/IP(dst="1.1.1.1", src="2.2.2.2")/UDP(dport=4000, sport=8000)/Raw("X"*20)
+ a = Ether()/PPPoE(sessionid=0x7)/PPP(b"\x00\x21")/IP(dst="1.1.1.1", src="2.2.2.2")/UDP(dport=4000, sport=8000)/Raw("X"*20)
if flowtype == 29:
- a = Ether()/PPPoE(sessionid=0x7)/PPP(proto=0x57)/IPv6(dst="1001:0db8:85a3:0000:0000:8a2e:0370:0001", src="2001:0db8:85a3:0000:0000:8a2e:0370:0001")/UDP(dport=4000, sport=8000)/Raw("X"*20)
+ a = Ether()/PPPoE(sessionid=0x7)/PPP(b"\x00\x57")/IPv6(dst="1001:0db8:85a3:0000:0000:8a2e:0370:0001", src="2001:0db8:85a3:0000:0000:8a2e:0370:0001")/UDP(dport=4000, sport=8000)/Raw("X"*20)
if flowtype == 30:
a = Ether(dst="3C:FD:FE:A3:A0:01", src="4C:FD:FE:A3:A0:01")/PPPoE(sessionid=0x7)
ba = bytearray(bytes(a))
@@ -43,7 +43,7 @@ from pmd_output import PmdOutput
from scapy.utils import wrpcap, rdpcap
from scapy.layers.inet import Ether, IP, UDP
from scapy.layers.l2 import Dot1Q
-from vxlan import VXLAN
+from scapy.layers.vxlan import VXLAN
from scapy.config import conf
from test_case import TestCase
from settings import FOLDERS
@@ -124,7 +124,7 @@ class VxlanGpeTestConfig(object):
cwd = os.getcwd()
dir_vxlan_module = cwd + r'/' + FOLDERS['Depends'] + r'/' + FOLDERS['scapy_modules']
self.test_case.tester.scapy_append("sys.path.append('%s')" % dir_vxlan_module)
- self.test_case.tester.scapy_append("from vxlan import VXLAN")
+ self.test_case.tester.scapy_append("from scapy.layers.vxlan import VXLAN")
self.test_case.tester.scapy_append(
'pcap = rdpcap("%s")' % self.pcap_file)
self.test_case.tester.scapy_append(