Uploaded image for project: 'VinePerf'
  1. VinePerf
  2. VINEPERF-532

T-Rex multistream support

XMLWordPrintable

    • Icon: Improvement Improvement
    • Resolution: Fixed
    • Icon: Major Major
    • Future Release
    • None
    • None
    • Any using T-Rex traffic generator

      Need to add multi-stream support to T-Rex.

       

      Here is some data I've already come up with to support this.
      For layer 2
       
      Use  the code below to calculate the end range such as if we are doing 1024 L2 Multistream
       
      {{def change_mac(mac, offset):
          
          return "{:012X}".format(int(mac, 16) + offset)

      >>> change_mac('abcdef01aabb', 1024)
      'ABCDEF01AEBB'
      >>>

      Then we can plug that into the pkt builder class with the vm param

      }}

      if self._params['traffic']['multistream'] and self._params['traffic']['stream_type'] == 'L2':
          vm = vm + [
          STLVmFlowVar(name="mac_src",min_value=0,max_value=num_flows,size=4,op="inc"),
          STLVmWrFlowVar(fv_name="mac_src",pkt_offset=7)

      {{]

      For L3 use the ipaddress module in python
      >>> ipaddress.ip_address('192.168.0.1') + 1024
      IPv4Address('192.168.4.1')

      }}

      if self._params['traffic']['multistream'] and self._params['traffic']['stream_type'] == 'L3':
          vm = vm + [
          STLVmFlowVar(name="ip_src",min_value=ip_src['start'],max_value=ip_src['end'],size=4,op="inc"),
          STLVmWrFlowVar(fv_name="ip_src",pkt_offset= "IP.src")

      ]

            ctrautma Christian Trautman
            ctrautma Christian Trautman
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved:

                Estimated:
                Original Estimate - 2 days
                2d
                Remaining:
                Remaining Estimate - 2 days
                2d
                Logged:
                Time Spent - Not Specified
                Not Specified