[dts] [PATCH 1/2] vxlan: fix vlan load pcap error

Xu, HuilongX huilongx.xu at intel.com
Mon Sep 5 02:15:54 CEST 2016


Acked-by: huilong xu<huilongx.xu at intel.com>

> -----Original Message-----
> From: dts [mailto:dts-bounces at dpdk.org] On Behalf Of Lijuan Tu
> Sent: Friday, September 02, 2016 10:56 AM
> To: dts at dpdk.org
> Cc: Tu, LijuanX A
> Subject: [dts] [PATCH 1/2] vxlan: fix vlan load pcap error
> 
> vxlan is not supported by scapy,
> and thus the packets are interpreted as raw packets.
> 
> Signed-off-by: Lijuan Tu <lijuanx.a.tu at intel.com>
> ---
>  tests/TestSuite_vxlan.py | 7 ++++++-
>  1 file changed, 6 insertions(+), 1 deletion(-)
> 
> diff --git a/tests/TestSuite_vxlan.py b/tests/TestSuite_vxlan.py
> index c1d0200..d5274fc 100644
> --- a/tests/TestSuite_vxlan.py
> +++ b/tests/TestSuite_vxlan.py
> @@ -24,7 +24,7 @@ from scapy.config import conf
>  from scapy.route import *
> 
>  from test_case import TestCase
> -from settings import HEADER_SIZE
> +from settings import HEADER_SIZE, FOLDERS
>  from etgen import IxiaPacketGenerator
> 
>  #
> @@ -236,6 +236,11 @@ class VxlanTestConfig(object):
>          """
>          Send vxlan pcap file by iface
>          """
> +        # load vxlan module to scapy
> +        cwd = os.getcwd()
> +        dir_vxlan_module = cwd + r'/' + FOLDERS['Depends']
> +        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(
>              'pcap = rdpcap("%s")' % self.pcap_file)
>          self.test_case.tester.scapy_append(
> --
> 1.9.3



More information about the dts mailing list