Running simple udp packet transfer test in stl mode

638 views
Skip to first unread message

anu...@gmail.com

unread,
Oct 3, 2019, 11:06:14 AM10/3/19
to TRex Traffic Generator
Hi,

I'm able to transfer UDP packets from client to server using 

<trex> start-f stl/udp_1pkt_simple.py -m 100mbps

This is what the tui output looks like

Global Statistitcs

connection   : localhost, Port 4501                  total_tx_L2  : 99.43 Mb/sec                   
version      : STL @ v2.61                           total_tx_L1  : 101.33 Mb/sec                  
cpu_util.    : 63.69% @ 1 cores (1 per dual port)    total_rx     : 4.72 Kb/sec                    
rx_cpu_util. : 0.0% / 0.99 pkt/sec                   total_pps    : 11.88 Kpkt/sec                 
async_util.  : 0.18% / 1.22 KB/sec                   drop_rate    : 99.43 Mb/sec                   
total_cps.   : 0 cps/sec                             queue_full   : 0 pkts                         

Port Statistics

   port    |         0         
-----------+------------------
owner      |              root 
link       |                UP 
state      |      TRANSMITTING 
speed      |           10 Gb/s 
CPU util.  |            63.69% 
--         |                   
Tx bps L2  |        99.43 Mbps 
Tx bps L1  |       101.33 Mbps 
Tx pps     |        11.88 Kpps 
Line Util. |            1.01 % 
---        |                   
Rx bps     |         4.72 Kbps 
Rx pps     |          0.99 pps 
----       |                   
opackets   |           9811778 
ipackets   |              1103 
obytes     |       10263089788 
ibytes     |            523721 
tx-pkts    |        9.81 Mpkts 
rx-pkts    |         1.1 Kpkts 
tx-bytes   |          10.26 GB 
rx-bytes   |         523.72 KB 
-----      |                   
oerrors    |                 0 
ierrors    |                 0 

Even  though  I am able to see the udp packets on the server side why do I see such a high drop rate?


hanoh haim

unread,
Oct 3, 2019, 11:36:35 AM10/3/19
to anu...@gmail.com, TRex Traffic Generator
Drop rate counter  is not valid in case of one port configuration 

--
You received this message because you are subscribed to the Google Groups "TRex Traffic Generator" group.
To unsubscribe from this group and stop receiving emails from it, send an email to trex-tgn+u...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/trex-tgn/972300c0-1372-4b1e-8b02-2a17618d3715%40googlegroups.com.
--
Hanoh
Sent from my iPhone
Message has been deleted

anu...@gmail.com

unread,
Oct 3, 2019, 1:31:40 PM10/3/19
to TRex Traffic Generator
Running this example on docker 


I don't see any information regarding jitter and latency in the <tui> l - latency .

 Is there any additional configuration needed to enable it?

This is what the latency stats look like

Global Statistics

connection   : localhost, Port 4501                  total_tx_L2  : 57.84 Mb/sec                   
version      : v2.41                                 total_tx_L1  : 61.03 Mb/sec                   
cpu_util.    : 6.61% @ 1 cores (1 per port)          total_rx     : 57.86 Mb/sec                   
rx_cpu_util. : 0.0% / 19.99 Kpkt/sec                 total_pps    : 19.98 Kpkt/sec                 
async_util.  : 0.18% / 1.37 KB/sec                   drop_rate    : 0.00 b/sec                     
                                                     queue_full   : 0 pkts                         

Latency Statistics (usec)

   PG ID     
------------
TX pkts      
RX pkts      
Max latency  
Avg latency  
-- Window -- 
Last max     
Last-1       
Last-2       
Last-3       
Last-4       
Last-5       
Last-6       
Last-7       
Last-8       
Last-9       
Last-10      
Last-11      
Last-12      
Last-13      
---          
Jitter       
----         
Errors   


To unsubscribe from this group and stop receiving emails from it, send an email to trex...@googlegroups.com.

hanoh haim

unread,
Oct 3, 2019, 1:35:07 PM10/3/19
to anu...@gmail.com, TRex Traffic Generator
Read the stateless manual.

To unsubscribe from this group and stop receiving emails from it, send an email to trex-tgn+u...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/trex-tgn/99f48568-4340-42a1-b653-14bc8ff8527b%40googlegroups.com.

anu...@gmail.com

unread,
Oct 3, 2019, 3:01:01 PM10/3/19
to TRex Traffic Generator
Adding in the flow_stats resulted in all latency and jitter to be 0.

flow_stats = STLFlowLatencyStats(pg_id = 7)

Global Statistitcs

connection   : localhost, Port 4501                  total_tx_L2  : 8.09 Kb/sec                    
version      : STL @ v2.61                           total_tx_L1  : 8.24 Kb/sec                    
cpu_util.    : 0.0% @ 1 cores (1 per dual port)      total_rx     : 2.7 b/sec                      
rx_cpu_util. : 0.0% / 0.01 pkt/sec                   total_pps    : 0.96 pkt/sec                   
async_util.  : 0.09% / 1.24 KB/sec                   drop_rate    : 8.08 Kb/sec                    
total_cps.   : 0 cps/sec                             queue_full   : 0 pkts                         

Latency Statistics

   PG ID     |       7        
-------------+---------------
TX pkts      |             13 
RX pkts      |              0 
Max latency  |              0 
Avg latency  |              0 
-- Window -- |                
Last max     |              0 
Last-1       |              0 
Last-2       |              0 
Last-3       |              0 
Last-4       |              0 
Last-5       |              0 
Last-6       |              0 
Last-7       |              0 
Last-8       |              0 
Last-9       |              0 
Last-10      |              0 
Last-11      |              0 
Last-12      |              0 
Last-13      |              0 
---          |                
Jitter       |              0 
----         |                
Errors       |              0 


from trex_stl_lib.api import *

class STLS1(object):

    def create_stream (self):
        return STLStream(
            packet =
                    STLPktBuilder(
                        pkt = Ether()/IP(src="10.0.2.2",dst="10.0.0.4")/
                                TCP(dport=12,sport=1025)/(1000*'x')
                    ),
             mode = STLTXCont(),flow_stats = STLFlowLatencyStats(pg_id = 7))

    def get_streams (self, direction = 0, **kwargs):
        # create 1 stream 
        return [ self.create_stream() ]


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

Read the stateless manual.

hanoh haim

unread,
Oct 3, 2019, 3:04:11 PM10/3/19
to anu...@gmail.com, TRex Traffic Generator
Hi, You are using it right. Latency works when Tx and Rx on the same TRex ..
In your case you don't get the latency traffic back so there is no way to calculate the latency 

th
anks
Hanoh

To unsubscribe from this group and stop receiving emails from it, send an email to trex-tgn+u...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/trex-tgn/49c69724-e1fa-458d-8f90-a8801dde0193%40googlegroups.com.

a

unread,
Oct 3, 2019, 3:25:27 PM10/3/19
to TRex Traffic Generator
Hi Hanoh,

Would you suggest using STF/ASTF mode since Tx and Rx are not on the same TRex ?

hanoh haim

unread,
Oct 3, 2019, 3:28:14 PM10/3/19
to a, TRex Traffic Generator
Hi, 
It is not supported in any mode

thanks
Hanoh

To unsubscribe from this group and stop receiving emails from it, send an email to trex-tgn+u...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/trex-tgn/6cf8b871-9046-4519-a843-8d0dee6c5e8c%40googlegroups.com.
Reply all
Reply to author
Forward
0 new messages