[PATCH net-next v23 13/13] netdev: add dmabuf introspection

Jakub Kicinski kuba at kernel.org
Thu Aug 29 21:26:43 UTC 2024


On Thu, 29 Aug 2024 06:01:26 +0000 Mina Almasry wrote:
> +		binding = (struct net_devmem_dmabuf_binding *)
> +				  rxq->mp_params.mp_priv;
> +		if (binding) {
> +			if (nla_put_u32(rsp, NETDEV_A_QUEUE_DMABUF,
> +					binding->id))
> +				goto nla_put_failure;
> +		}


> +	struct net_devmem_dmabuf_binding *binding = pool->mp_priv;

> +	if (binding && nla_put_u32(rsp, NETDEV_A_PAGE_POOL_DMABUF, binding->id))
> +		goto err_cancel;

nit: this is better than the put in queue_fill_one()
no need to cast void pointer there, and you can use a single 

		if (binding &&
		    nla_put_u32(rsp, NETDEV_A_QUEUE_DMABUF, binding->id)))
			goto nla_put_failure;


More information about the dri-devel mailing list