Home | History | Annotate | Download | only in pktgen
      1 NAME = "Pktgen test"
      2 AUTHOR = "Martin Bligh <mbligh (a] google.com>"
      3 TIME = "MEDIUM"
      4 TEST_CATEGORY = "FUNCTIONAL"
      5 TEST_CLASS = "HARDWARE"
      6 TEST_TYPE = "CLIENT"
      7 DOC = """
      8 pktgen is a high-performance testing tool included in the Linux kernel. Being
      9 part of the kernel is currently best way to test the TX process of device driver
     10 and NIC. pktgen can also be used to generate ordinary packets to test other
     11 network devices. Especially of interest is the use of pktgen to test routers or
     12 bridges which use the Linux network stack. Because pktgen is "in-kernel", it can
     13 generate very high packet rates and with few systems saturate network devices as
     14 routers or bridges.
     15 """
     16 
     17 interface='eth0'
     18 count=50000
     19 
     20 # Parse comma-separated args.
     21 for arg in args:
     22     for item in arg.split(','):
     23         key, val = item.split('=')
     24         if key == 'interface':
     25             interface = val
     26         if key == 'count':
     27             count = int(val)
     28         if key == 'num_iterations':
     29             num_iterations = int(val)
     30 
     31 job.run_test('pktgen', eth=interface, count=count, clone_skb=0,
     32              tag='clone_skb_off', num_iterations=num_iterations)
     33 job.run_test('pktgen', eth=interface, count=count, clone_skb=1,
     34              tag='clone_skb_on', num_iterations=num_iterations)
     35 
     36