summaryrefslogtreecommitdiffstats
path: root/scripts/stl/hlt/hlt_framesize_vm.py
blob: 5653e435b596a84a53a8f577f390889b5b5956cf (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
from trex_stl_lib.trex_stl_hltapi import STLHltStream


class STLS1(object):
    '''
    Two Eth/IP/UDP streams with VM to get different size of packet by frame_size
    '''

    def get_streams (self, direction = 0):
        return [STLHltStream(length_mode = 'increment',
                             frame_size_min = 100,
                             frame_size_max = 3000,
                             l3_protocol = 'ipv4',
                             l4_protocol = 'udp',
                             rate_bps = 1000000,
                             direction = direction,
                             ),
                STLHltStream(length_mode = 'decrement',
                             frame_size_min = 100,
                             frame_size_max = 3000,
                             l3_protocol = 'ipv4',
                             l4_protocol = 'udp',
                             rate_bps = 100000,
                             direction = direction,
                             )
               ]

# dynamic load - used for trex console or simulator
def register():
    return STLS1()