From: Lijuan Tu <lijuan.tu@intel.com>
To: junx.dong@intel.com
Cc: dts@dpdk.org, Lijuan Tu <lijuan.tu@intel.com>
Subject: [PATCH] remove dep/scapy_modules
Date: Fri, 11 Mar 2022 21:29:18 +0800 [thread overview]
Message-ID: <20220311132918.1272571-1-lijuan.tu@intel.com> (raw)
As dot1br removed, the scapy_modules is retired.
Fixes: 5bdc6eee4cc7 ("framework/*: Remove Dot1BR related code")
Signed-off-by: Lijuan Tu <lijuan.tu@intel.com>
---
dep/scapy_modules/Dot1BR.py | 34 --------------------
dep/scapy_modules/__init__.py | 30 -----------------
framework/settings.py | 1 -
framework/tester.py | 12 -------
tests/TestSuite_vxlan_gpe_support_in_i40e.py | 5 ---
5 files changed, 82 deletions(-)
delete mode 100644 dep/scapy_modules/Dot1BR.py
delete mode 100644 dep/scapy_modules/__init__.py
diff --git a/dep/scapy_modules/Dot1BR.py b/dep/scapy_modules/Dot1BR.py
deleted file mode 100644
index 162ac7dc..00000000
--- a/dep/scapy_modules/Dot1BR.py
+++ /dev/null
@@ -1,34 +0,0 @@
-## This file is part of Scapy
-## See http://www.secdev.org/projects/scapy for more informations
-## Copyright (C) Philippe Biondi <phil@secdev.org>
-## This program is published under a GPLv2 license
-
-## Copyright (c) 2016 Marvin liu <yong.liu@intel.com>
-
-"""
-VBPE (virtual brige port extenstion)
-"""
-
-from scapy.data import ETHER_TYPES
-from scapy.fields import *
-from scapy.layers.l2 import Ether
-from scapy.packet import *
-
-
-class Dot1BR(Packet):
- name = "802.1BR"
- aliastypes = [ Ether ]
- fields_desc = [
- BitField("EPCP", 0, 3),
- BitField("EEDI", 0, 1),
- BitField("IngressECIDbase", 0, 12),
- BitField("Reserverd", 0, 2),
- BitField("GRP", 0, 2),
- BitField("ECIDbase", 0, 12),
- BitField("IngressECIDext", 0, 8),
- BitField("ECIDext", 0, 8),
- XShortEnumField("type", 0x0000, ETHER_TYPES) ]
- def mysummary(self):
- return self.sprintf("802.1BR E-CID %Ingress_E-CID_base%")
-
-bind_layers(Ether, Dot1BR, type=0x893F)
diff --git a/dep/scapy_modules/__init__.py b/dep/scapy_modules/__init__.py
deleted file mode 100644
index ae0043b7..00000000
--- a/dep/scapy_modules/__init__.py
+++ /dev/null
@@ -1,30 +0,0 @@
-#!/usr/bin/python3
-# BSD LICENSE
-#
-# Copyright (c) 2021 PANTHEON.tech s.r.o.
-#
-# Redistribution and use in source and binary forms, with or without
-# modification, are permitted provided that the following conditions
-# are met:
-#
-# * Redistributions of source code must retain the above copyright
-# notice, this list of conditions and the following disclaimer.
-# * Redistributions in binary form must reproduce the above copyright
-# notice, this list of conditions and the following disclaimer in
-# the documentation and/or other materials provided with the
-# distribution.
-# * Neither the name of PANTHEON.tech s.r.o. nor the names of its
-# contributors may be used to endorse or promote products derived
-# from this software without specific prior written permission.
-#
-# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
-# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
-# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
-# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
-# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
-# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
diff --git a/framework/settings.py b/framework/settings.py
index 8b06ffac..7399a774 100644
--- a/framework/settings.py
+++ b/framework/settings.py
@@ -43,7 +43,6 @@ FOLDERS = {
'Depends': 'dep',
'Output': 'output',
'NicDriver': 'nics',
- 'scapy_modules': 'scapy_modules'
}
"""
diff --git a/framework/tester.py b/framework/tester.py
index 636129cf..bd903ce6 100644
--- a/framework/tester.py
+++ b/framework/tester.py
@@ -106,18 +106,6 @@ class Tester(Crb):
session = self.create_session(session_name)
self.scapy_sessions_li.append(session)
session.send_expect('scapy', '>>> ')
- file_dir = os.path.dirname(__file__).split(os.path.sep)
- lib_path = os.path.sep.join(file_dir[:-1]) + '/dep/scapy_modules/'
-
- # get contrib module path on tester
- scapy_module_path = session.session.send_expect("os.path.dirname(sys.modules['scapy'].__file__)", '>>>')
- contrib_module_path = scapy_module_path.replace("'", "") + '/contrib'
-
- # import scapy moudle to scapy APP
- out = session.session.send_expect(get_scapy_module_impcmd(), '>>> ')
- if 'ImportError' in out:
- session.logger.warning(f'entering import error: {out}')
-
return session
def check_scapy_version(self):
diff --git a/tests/TestSuite_vxlan_gpe_support_in_i40e.py b/tests/TestSuite_vxlan_gpe_support_in_i40e.py
index a2002247..fe0a809c 100644
--- a/tests/TestSuite_vxlan_gpe_support_in_i40e.py
+++ b/tests/TestSuite_vxlan_gpe_support_in_i40e.py
@@ -122,11 +122,6 @@ class VxlanGpeTestConfig(object):
"""
Send vxlan pcap file by iface
"""
- # load vxlan module to scapy
- 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 scapy.layers.vxlan import VXLAN")
self.test_case.tester.scapy_append(
'pcap = rdpcap("%s")' % self.pcap_file)
self.test_case.tester.scapy_append(
--
2.25.1
next reply other threads:[~2022-03-11 13:29 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-03-11 13:29 Lijuan Tu [this message]
2022-03-15 10:54 ` lijuan.tu
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=20220311132918.1272571-1-lijuan.tu@intel.com \
--to=lijuan.tu@intel.com \
--cc=dts@dpdk.org \
--cc=junx.dong@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).