cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
Highlighted
Visitor
Visitor
541 Views
Registered: ‎01-08-2020

How to use metadata field of QDMA

We plan to use metadata field of H2C stream descriptor, to send data packet with an extra message.
We are using linux-kernel driver for software api. the driver is get from github.

But,In QDMA linux driver and dmautils, I cann't find any API that can pass metadata.

1. Does Xilinx has any explanatory documents or examples of this application about software api?
2. If DPDK is used in the future, can DPDK support metadata?

Tags (2)
0 Kudos
5 Replies
Highlighted
459 Views
Registered: ‎06-16-2018

Hi,

As far as I know, DPDK supports metadata.

We designed our own QDMA and It worked well with DPDK( include H2C and C2H metadata).

Never try Xilinx QDMA, not sure if metadata is supported.

0 Kudos
Highlighted
Visitor
Visitor
429 Views
Registered: ‎01-08-2020

Thanks a lot for replay. We are a small company that Xilinx QDMA is what we can get and easy to use. Is your QDMA design an opensource project ?
0 Kudos
Highlighted
Xilinx Employee
Xilinx Employee
361 Views
Registered: ‎08-06-2008

Metadata is intended to be used by the user logic; the drivers that we currently provide is for reference only. It doesn't provide an API to set the metadata. If any users in the community here has done this and would be ok to share their experience with the users here, we would really appreciate. 

Thanks.

0 Kudos
Highlighted
Adventurer
Adventurer
304 Views
Registered: ‎05-04-2017

Hi:
Did you fixed this issue now, we planed to use the metadata too, faced the same question.
Thanks.
0 Kudos
Highlighted
Contributor
Contributor
162 Views
Registered: ‎01-13-2020

Remark about inside look FPGA.

"Speed AXIS project" www.xilinx.com/Attachment/Xilinx_Answer_71453_QDMA_Performance_v6.pdf
For Linux kernel driver 8Bytes of c2h metadata are stored in the debugfs /sys/kernel/debug/qdma_pf/BB:DD.FF/queues/QID#/cmpt/desc.

Here full 8Bytes of completer that comes from the user logic s_axis_c2h_cmpt_tdata[64:0], exclude 3 LSB bits s_axis_c2h_cmpt_tdata[2:0].

Try to use Linux kernel driver fist, it's compilation is quite simple.

For a "speed project" user logic sets:

s_axis_c2h_cmpt_tdata[19:4] = packet length, 16 bits
s_axis_c2h_cmpt_tdata[3] = 1'b1, descriptor used
s_axis_c2h_cmpt_tdata[2:0] = '0 special purposes, but In CMPT desc ring = 010

Try to send/receive a one packet len=128 through dma_to_device/dem_from_device.

Then set regs BAR2 0x30 = deadbeef, 0x34 = cafebabe,  through dmactl. Send/receive one packet. 

Then look at CMPT desc ring /sys/kernel/debug/qdma_pf/BB:DD.F/queues/QID#/cmpt/desc.

qdmaBBDDF ST-0 C2H online
0: 0x0000000011223344 0000080a 00000000 - fist packet. Default completion
2: 0x0000000033445566 dea0080a cafebabe - second packet. Modified completion metadata

Desc fields description for DPDK and some additional info you can find in the qdma_user.h. Search by words "C2H Completion entry structure".

0 Kudos