summaryrefslogtreecommitdiffstats
path: root/scripts/automation/trex_control_plane
diff options
context:
space:
mode:
authorHanoh Haim <hhaim@cisco.com>2016-09-29 17:39:03 +0300
committerHanoh Haim <hhaim@cisco.com>2016-09-29 17:39:03 +0300
commitecd18a7e43bf03f0984b033f73bc2a306910dcdc (patch)
tree3b2549f2c6f4ee56df811ea919275b7c9b96fef1 /scripts/automation/trex_control_plane
parentc4392ff93b7994f33979329a6c0e070856876abb (diff)
add hw_cs Python API doc
Diffstat (limited to 'scripts/automation/trex_control_plane')
-rwxr-xr-xscripts/automation/trex_control_plane/doc_stl/api/field_engine.rst9
-rwxr-xr-xscripts/automation/trex_control_plane/stl/trex_stl_lib/trex_stl_packet_builder_scapy.py9
2 files changed, 15 insertions, 3 deletions
diff --git a/scripts/automation/trex_control_plane/doc_stl/api/field_engine.rst b/scripts/automation/trex_control_plane/doc_stl/api/field_engine.rst
index a6e624c1..53514455 100755
--- a/scripts/automation/trex_control_plane/doc_stl/api/field_engine.rst
+++ b/scripts/automation/trex_control_plane/doc_stl/api/field_engine.rst
@@ -125,6 +125,14 @@ STLVmWrMaskFlowVar
:members:
:member-order: bysource
+STLVmFixChecksumHw
+--------------------
+
+.. autoclass:: trex_stl_lib.trex_stl_packet_builder_scapy.STLVmFixChecksumHw
+ :members:
+ :member-order: bysource
+
+
STLVmFixIpv4
------------------
@@ -154,6 +162,7 @@ STLVmFlowVarRepetableRandom
:members:
:member-order: bysource
+
Field Engine snippet
diff --git a/scripts/automation/trex_control_plane/stl/trex_stl_lib/trex_stl_packet_builder_scapy.py b/scripts/automation/trex_control_plane/stl/trex_stl_lib/trex_stl_packet_builder_scapy.py
index a868dbe8..aa002d59 100755
--- a/scripts/automation/trex_control_plane/stl/trex_stl_lib/trex_stl_packet_builder_scapy.py
+++ b/scripts/automation/trex_control_plane/stl/trex_stl_lib/trex_stl_packet_builder_scapy.py
@@ -782,10 +782,12 @@ class STLVmFixChecksumHw(CTRexVmDescBase):
def __init__(self, l3_offset,l4_offset,l4_type):
"""
Fix Ipv4 header checksum and TCP/UDP checksum using hardware assist.
- Use this if the packet header has changed or data payload has changed as it is necessary to change the checksum.
- This instruction won't work on virtual interfaces only on Physical ports
+ Use this if the packet header has changed or data payload has changed as it is necessary to fix the checksums.
+ This instruction works on NICS that support this hardware offload.
- Support the following packets
+ For fixing only IPv4 header checksum use STLVmFixIpv4. This instruction should be used if both L4 and L3 need to be fixed.
+
+ example for supported packets
Ether()/(IPv4|IPv6)/(UDP|TCP)
Ether()/(IPv4|IPv6)/(UDP|TCP)
@@ -802,6 +804,7 @@ class STLVmFixChecksumHw(CTRexVmDescBase):
l4_type : CTRexVmInsFixHwCs.L4_TYPE_UDP or CTRexVmInsFixHwCs.L4_TYPE_TCP
+ see full example stl/syn_attack_fix_cs_hw.py
.. code-block:: python