DMA Latency Application (dma-latency)ΒΆ

Xilinx-developed custom tool dma-latency is used to collect the latency metrics for unidirectional and bidirectional traffic.

usage: dma-latency [OPTIONS

  -c (--config) config file that has configuration for IO

Example

[xilinx@]# dma-latency -c dmalat.conf
dma-ctl qdma06000 global_csr | grep Global| cut -d : -f 2 > glbl_rng_sz
qdma06000-ST-0 H2C added.
Added 1 Queues.
1 Queues started, idx 0 ~ 0.
qdma06000-ST-0 C2H added.
Added 1 Queues.
1 Queues started, idx 0 ~ 0.
dmautils(1) threads
Stopped Queues 0 -> 0.
Deleted Queues 0 -> 0.
Stopped Queues 0 -> 0.
Deleted Queues 0 -> 0.
qdma06000:statistics
Total MM H2C packets processed = 0
Total MM C2H packets processed = 0
Total ST H2C packets processed = 2288284
Total ST C2H packets processed = 2288284
Min Ping Pong Latency = 0
Max Ping Pong Latency = 0
Avg Ping Pong Latency = 0
[xilinx@]#

dma-latency tool takes a configuration file as input. The configuration file format is as below.

name=mm_1_1
mode=mm #mode
dir=bi #dir
pf_range=0:0 #no spaces
q_range=0:0 #no spaces
wb_acc=5
tmr_idx=9
cntr_idx=0
trig_mode=usr_cnt
rngidx=9
ram_width=15 #31 bits - 2^31 = 2GB
runtime=30 #secs
num_threads=8
bidir_en=1
num_pkt=64
pkt_sz=64
pci_bus=06
pci_device=00

Parameters

  • name : name of the configuration
  • mode : mode of the queue, streaming(st) or memory mapped(mm). Mode defaults to mm.
  • dir : Direction of the queue, host-to-card(h2c), card-to-host (c2h) or both (bi).
  • pf_range : Range of the PFs from 0-3 on which the performance metrics are to be collected.
  • q_range : Range of the Queues from 0-2047 on which the performance metrics are to be collected.
  • flags : queue flags
  • wb_acc : write back accumulation index from CSR register ( 0 - 15 )
  • tmr_idx : timer index from CSR register ( 0 - 15 )
  • cntr_idx : Counter index from CSR register ( 0 - 15 )
  • trig_mode : trigger mode (every, usr_cnt, usr, usr_tmr, dis)
  • rngidx : Ring index from CSR register ( 0 - 15 )
  • runtime : Duration of the performance runs, time in seconds.
  • num_threads : number of threads to be used in dma-perf application to pump the traffic to queues
  • bidir_en : Enable or Disable the bi-direction mode ( 0: Disable, 1: Enable )
  • num_pkt : number of packets
  • pkt_sz : Packet size