[dpdk-dev] [PATCH v2] common/mlx5: fix external memory pool registration

Raslan Darawsheh rasland at nvidia.com
Tue Nov 9 14:40:11 CET 2021


Hi,

> -----Original Message-----
> From: Dmitry Kozlyuk <dkozlyuk at nvidia.com>
> Sent: Tuesday, November 9, 2021 12:33 PM
> To: dev at dpdk.org
> Cc: Raslan Darawsheh <rasland at nvidia.com>; Matan Azrad
> <matan at nvidia.com>; Slava Ovsiienko <viacheslavo at nvidia.com>
> Subject: [PATCH v2] common/mlx5: fix external memory pool registration
> 
> Registration of packet mempools with
> RTE_PKTMBUF_POOL_PINNED_EXT_MEM
> was performed incorrectly: after population of such mempool chunks
> only contain memory for rte_mbuf structures, while pointers to actual
> external memory are not yet filled. MR LKeys could not be obtained
> for external memory addresses of such mempools. Rx datapath assumes
> all used mempools are registered and does not fallback to dynamic
> MR creation in such case, so no packets could be received.
> 
> Skip registration of extmem pools on population because it is useless.
> If used for Rx, they are registered at port start.
> During registration, recognize such pools, inspect their mbufs
> and recover the pages they reside in.
> 
> While MRs for these pages may already be created by rte_dev_dma_map(),
> they are not reused to avoid synchronization on Rx datapath
> in case these MRs are changed in the database.
> 
> Fixes: 690b2a88c2f7 ("common/mlx5: add mempool registration facilities")
> 
> Signed-off-by: Dmitry Kozlyuk <dkozlyuk at nvidia.com>
> Reviewed-by: Matan Azrad <matan at nvidia.com>
> Reviewed-by: Viacheslav Ovsiienko <viacheslavo at nvidia.com>
> ---
> v2: rebase on next-net-mlx

Patch applied to next-net-mlx,

Kindest regards,
Raslan Darawsheh


More information about the dev mailing list