Porting multi-packet receive queue code to mlx5dv

I have some code that uses multi-packet receive queues via the old ibv_exp APIs. I’m trying to port it to work with mlx5dv in OFED 5.x but can’t figure out some of the equivalents. In the old code, I’m using poll_length_flags_mp_rq to obtain both the offset in the WR buffer where the packet was written, and the IBV_EXP_CQ_RX_MULTI_PACKET_LAST_V1 flag to determine when the WR can been used up. With the new API, how do I determine where packets are written?

Hi Bruce,

I see that you asked for this question for 3 weeks, is it still relevant ?

If yes please open a case at support@mellanox.com.

As a first try, I would say to look at the latest DPDK PMD driver for mlx5 that implements multiple queue on rx , so it can be a good start to see how it is impmented there using mlx5dv API.

Regards

Marc

I managed to implement something that appears to be working, by reverse-engineering the interface from the source of OFED 4.x.

For anyone else who comes across this and wants to know the answer: the basic answer is that mlx5dv only provides the interfaces to create a MPRQ (aka striding RQ), but the resulting queue can’t be used with the ibv commands (like ibv_post_wr_recv). You need to use mlx5dv_init_obj to extract pointers to raw hardware data structures and read and write them yourself. The advice I was given by contacts in Mellanox was to use DPDK rather than raw ethernet verbs.

Hi Bruce,

Thanks for your reply.

My suggrestion was to see how it is implemntated in DPDK using mlx5dv and striding RQ.

No matter, I am happy to see that you solved the issue.

Regards

Marc