test suite reviews and discussions
 help / color / mirror / Atom feed
From: "Dong, JunX" <junx.dong@intel.com>
To: dts@dpdk.org
Cc: PingX.Yu@intel.com, weix.ling@intel.com, junx.dong@intel.com
Subject: [dts] [PATCH V1] framework/packet: add Dot1BR module to sys search path
Date: Wed, 27 Oct 2021 18:19:53 +0800	[thread overview]
Message-ID: <1635329993-169002-1-git-send-email-junx.dong@intel.com> (raw)

From: "Dong, JunX" <junx.dong@intel.com>

Signed-off-by: Dong, JunX <junx.dong@intel.com>
---
 framework/packet.py | 8 +++++---
 1 file changed, 5 insertions(+), 3 deletions(-)

diff --git a/framework/packet.py b/framework/packet.py
index e6fd74a0..633dd36f 100644
--- a/framework/packet.py
+++ b/framework/packet.py
@@ -35,22 +35,24 @@ Base on scapy(python program for packet manipulation)
 
 from importlib import import_module
 from socket import AF_INET6
-
 from scapy.all import *
-
 from .utils import convert_int2ip, convert_ip2int
 
 # load extension layers
 exec_file = os.path.realpath(__file__)
 DTS_PATH = exec_file.replace('/framework/packet.py', '')
+
 # exec_file might be .pyc file, if so, remove 'c'.
 TMP_PATH = DTS_PATH[:-1] + '/output/tmp/pcap/' if exec_file.endswith('.pyc') else DTS_PATH + '/output/tmp/pcap/'
 if not os.path.exists(TMP_PATH):
     os.system('mkdir -p %s' % TMP_PATH)
 
+# add /tmp/dep to sys.path
+sys.path.append('/tmp/dep')
+
 scapy_modules_required = {'scapy.contrib.gtp': ['GTP_U_Header', 'GTPPDUSessionContainer'],
                           'scapy.contrib.lldp': ['LLDPDU', 'LLDPDUManagementAddress'],
-                          'dep.scapy_modules.Dot1BR': ['Dot1BR'],
+                          'Dot1BR': ['Dot1BR'],
                           'scapy.contrib.pfcp': ['PFCP'],
                           'scapy.contrib.nsh': ['NSH'],
                           'scapy.contrib.igmp': ['IGMP'],
-- 
2.24.1.windows.2


                 reply	other threads:[~2021-10-27 10:20 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

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=1635329993-169002-1-git-send-email-junx.dong@intel.com \
    --to=junx.dong@intel.com \
    --cc=PingX.Yu@intel.com \
    --cc=dts@dpdk.org \
    --cc=weix.ling@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).