[Bug,670] Exception occurs when running nic_single_core_perf with latest DTS version

Message ID bug-670-433-FAJcF9ZN5H@http.bugs.dpdk.org/ (mailing list archive)
State Rejected
Headers
Series [Bug,670] Exception occurs when running nic_single_core_perf with latest DTS version |

Commit Message

bugzilla@dpdk.org April 12, 2021, 1:54 a.m. UTC
  https://bugs.dpdk.org/show_bug.cgi?id=670

Lijuan Tu (lijuan.tu@intel.com) changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |lijuan.tu@intel.com

--- Comment #5 from Lijuan Tu (lijuan.tu@intel.com) ---
(In reply to dliu from comment #4)
> (In reply to Ali Alnubani from comment #2)
> > The exceptions don't reproduce when updating TRex to v2.87 and running
> with:
> > """
> > export PYTHONPATH=/opt/trex-core-2.87/external_libs/scapy-2.4.3
> > ./dts
> > """
> > 
> > However, I can't update TRex to this version in production due to a
> > regression unrelated to DTS that I'm facing with it.
> 
> For I understand of DTS, it will use the scapy from the Trex rather than the
> system scapy. That's why you need to repoint the scapy folder.
> 
> Since trex-core-2.59 have scapy version of 2.3.1. DTS could be using
> something in scapy 2.4.3(Trex v2.88) that does not exist in scapy 2.3.1(Trex
> 2.59).

agree with David, scapy 2.3.1 doesn't have SCTP, but DTS take it as a basic
protocol. I have a workaround you may try:

1, download sctp from
https://github.com/secdev/scapy/blob/master/scapy/layers/sctp.py to
dts/dep/scapy_modules/
2, apply the following patch:
(m.endswith('.py') and not m.startswith('__'))]

Now DTS will import SCTP from local module: dts/dep/scapy_modules/sctp.py
  

Patch

diff --git a/framework/packet.py b/framework/packet.py
index 6d9bf24..92bbd2c 100644
--- a/framework/packet.py
+++ b/framework/packet.py
@@ -58,6 +58,7 @@  scapy_modules_required = {'gtp': ['GTP_U_Header',
'GTPPDUSessionContainer'],
                           'nsh': ['NSH'],
                           'igmp': ['IGMP'],
                           'mpls': ['MPLS'],
+                          'sctp': ['SCTP'],
                           }
 local_modules = [m[:-3] for m in os.listdir(DEP_FOLDER + '/scapy_modules') if