summaryrefslogtreecommitdiffstats
path: root/scripts/stl/hlt/hlt_l3_length_vm.py
blob: 7b04fbeca50ad921c7f69a434dfcb1543e6b3345 (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
34
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 l3_length
    '''

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

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