[dpdk-dev] [PATCH v3 6/9] gpudev: add memory barrier
Thomas Monjalon
thomas at monjalon.net
Fri Oct 8 22:16:41 CEST 2021
09/10/2021 03:53, eagostini at nvidia.com:
> From: Elena Agostini <eagostini at nvidia.com>
>
> Add a function for the application to ensure the coherency
> of the writes executed by another device into the GPU memory.
>
> Signed-off-by: Elena Agostini <eagostini at nvidia.com>
> ---
> +/**
> + * @warning
> + * @b EXPERIMENTAL: this API may change without prior notice.
> + *
> + * Enforce a GPU memory write barrier.
> + *
> + * @param dev_id
> + * Reference device ID.
> + *
> + * @return
> + * 0 on success, -rte_errno otherwise:
> + * - ENODEV if invalid dev_id
> + * - ENOTSUP if operation not supported by the driver
> + * - EPERM if driver error
> + */
> +__rte_experimental
> +int rte_gpu_mbw(int16_t dev_id);
I would replace mbw with wmb.
Also it may be worth adding few more words about the goal:
ensure that previous writes in GPU memory are complete?
Does it work for writes done from CPU? from GPU?
More information about the dev
mailing list