test suite reviews and discussions
 help / color / mirror / Atom feed
* [dts] [PATCH V1] framework/packet: remove sctp in required scapy module
@ 2021-01-13  5:33 Haiyang Zhao
  2021-01-13  5:42 ` Zhao, HaiyangX
  2021-01-13  8:49 ` Tu, Lijuan
  0 siblings, 2 replies; 3+ messages in thread
From: Haiyang Zhao @ 2021-01-13  5:33 UTC (permalink / raw)
  To: dts, Lijuan.Tu; +Cc: Haiyang Zhao

sctp is in scapy.layers and is been imported by default,
so remove the importing sctp code.

Signed-off-by: Haiyang Zhao <haiyangx.zhao@intel.com>
---
 framework/packet.py | 20 ++++++++++----------
 1 file changed, 10 insertions(+), 10 deletions(-)

diff --git a/framework/packet.py b/framework/packet.py
index 2cd64d02..6d9bf246 100644
--- a/framework/packet.py
+++ b/framework/packet.py
@@ -52,8 +52,13 @@ from utils import convert_ip2int
 from utils import convert_int2ip
 
 scapy_modules_required = {'gtp': ['GTP_U_Header', 'GTPPDUSessionContainer'],
-                          'lldp': ['LLDPDU', 'LLDPDUManagementAddress'], 'Dot1BR': ['Dot1BR'], 'pfcp': ['PFCP'],
-                          'nsh': ['NSH'], 'igmp': ['IGMP'], 'mpls': ['MPLS'], 'sctp': ['SCTP', 'SCTPChunkData']}
+                          'lldp': ['LLDPDU', 'LLDPDUManagementAddress'],
+                          'Dot1BR': ['Dot1BR'],
+                          'pfcp': ['PFCP'],
+                          'nsh': ['NSH'],
+                          'igmp': ['IGMP'],
+                          'mpls': ['MPLS'],
+                          }
 local_modules = [m[:-3] for m in os.listdir(DEP_FOLDER + '/scapy_modules') if (m.endswith('.py') and not m.startswith('__'))]
 
 for m in scapy_modules_required:
@@ -63,14 +68,9 @@ for m in scapy_modules_required:
             for clazz in scapy_modules_required[m]:
                 locals().update({clazz: getattr(module, clazz)})
         else:
-            if m == 'sctp':
-                module = import_module(f'scapy.layers.{m}')
-                for clazz in scapy_modules_required[m]:
-                    locals().update({clazz: getattr(module, clazz)})
-            else:
-                module = import_module(f'scapy.contrib.{m}')
-                for clazz in scapy_modules_required[m]:
-                    locals().update({clazz: getattr(module, clazz)})
+            module = import_module(f'scapy.contrib.{m}')
+            for clazz in scapy_modules_required[m]:
+                locals().update({clazz: getattr(module, clazz)})
     except Exception as e:
         print(e)
 
-- 
2.17.1


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

* Re: [dts] [PATCH V1] framework/packet: remove sctp in required scapy module
  2021-01-13  5:33 [dts] [PATCH V1] framework/packet: remove sctp in required scapy module Haiyang Zhao
@ 2021-01-13  5:42 ` Zhao, HaiyangX
  2021-01-13  8:49 ` Tu, Lijuan
  1 sibling, 0 replies; 3+ messages in thread
From: Zhao, HaiyangX @ 2021-01-13  5:42 UTC (permalink / raw)
  To: Zhao, HaiyangX, dts, Tu, Lijuan

[-- Attachment #1: Type: text/plain, Size: 394 bytes --]

Tested-by:  Haiyang Zhao <haiyangx.zhao@intel.com>

Best Regards,
Zhao Haiyang

> -----Original Message-----
> From: Haiyang Zhao <haiyangx.zhao@intel.com>
> Sent: Wednesday, January 13, 2021 13:33
> To: dts@dpdk.org; Tu, Lijuan <lijuan.tu@intel.com>
> Cc: Zhao, HaiyangX <haiyangx.zhao@intel.com>
> Subject: [dts][PATCH V1] framework/packet: remove sctp in required scapy
> module

[-- Attachment #2: AdvancedRSSTest.log --]
[-- Type: application/octet-stream, Size: 149674 bytes --]

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

* Re: [dts] [PATCH V1] framework/packet: remove sctp in required scapy module
  2021-01-13  5:33 [dts] [PATCH V1] framework/packet: remove sctp in required scapy module Haiyang Zhao
  2021-01-13  5:42 ` Zhao, HaiyangX
@ 2021-01-13  8:49 ` Tu, Lijuan
  1 sibling, 0 replies; 3+ messages in thread
From: Tu, Lijuan @ 2021-01-13  8:49 UTC (permalink / raw)
  To: Zhao, HaiyangX, dts; +Cc: Zhao, HaiyangX

> sctp is in scapy.layers and is been imported by default, so remove the
> importing sctp code.
> 
> Signed-off-by: Haiyang Zhao <haiyangx.zhao@intel.com>

Applied

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

end of thread, other threads:[~2021-01-13  8:50 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-01-13  5:33 [dts] [PATCH V1] framework/packet: remove sctp in required scapy module Haiyang Zhao
2021-01-13  5:42 ` Zhao, HaiyangX
2021-01-13  8:49 ` Tu, Lijuan

test suite reviews and discussions

This inbox may be cloned and mirrored by anyone:

	git clone --mirror https://inbox.dpdk.org/dts/0 dts/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 dts dts/ https://inbox.dpdk.org/dts \
		dts@dpdk.org
	public-inbox-index dts

Example config snippet for mirrors.
Newsgroup available over NNTP:
	nntp://inbox.dpdk.org/inbox.dpdk.dts


AGPL code for this site: git clone https://public-inbox.org/public-inbox.git