[PATCH 2/2] common/mlx5: support dmabuf

Stephen Hemminger stephen at networkplumber.org
Thu Jan 29 02:51:57 CET 2026


On Tue, 27 Jan 2026 17:44:09 +0000
Cliff Burdick <cburdick at nvidia.com> wrote:

> +static struct ibv_mr *
> +mlx5_glue_reg_dmabuf_mr(struct ibv_pd *pd, uint64_t offset, size_t length,
> +			uint64_t iova, int fd, int access)
> +{
> +#ifdef HAVE_IBV_REG_DMABUF_MR
> +	return ibv_reg_dmabuf_mr(pd, offset, length, iova, fd, access);
> +#else
> +	(void)pd;
> +	(void)offset;
> +	(void)length;
> +	(void)iova;
> +	(void)fd;
> +	(void)access;
> +	errno = ENOTSUP;
> +	return NULL;
> +#endif
> +}

I would prefer the callback hook did not exist (was NULL)
if you don't have your #ifdef.

The (void) change looks messy and better handled by caller.


More information about the dev mailing list