X-Git-Url: http://git.droids-corp.org/?a=blobdiff_plain;f=lib%2Fgpudev%2Frte_gpudev.h;h=ff3ca78c895e6afa1f6b95ef3feaffc0ee648373;hb=09b0a36cc7aef21deec6a73d3930a5fd43dfaed9;hp=fa3f3aad4f944b47ada2317ab79e38aa1072d769;hpb=c7ebd65c137215d714b445b7b4c584007cc89ffb;p=dpdk.git diff --git a/lib/gpudev/rte_gpudev.h b/lib/gpudev/rte_gpudev.h index fa3f3aad4f..ff3ca78c89 100644 --- a/lib/gpudev/rte_gpudev.h +++ b/lib/gpudev/rte_gpudev.h @@ -364,18 +364,23 @@ int rte_gpu_info_get(int16_t dev_id, struct rte_gpu_info *info); * @param size * Number of bytes to allocate. * Requesting 0 will do nothing. + * @param align + * If 0, the return is a pointer that is suitably aligned + * for any kind of variable (in the same manner as malloc()). + * Otherwise, the return is a pointer that is a multiple of *align*. + * In this case, it must obviously be a power of two. * * @return * A pointer to the allocated memory, otherwise NULL and rte_errno is set: * - ENODEV if invalid dev_id - * - EINVAL if reserved flags + * - EINVAL if align is not a power of two * - ENOTSUP if operation not supported by the driver * - E2BIG if size is higher than limit * - ENOMEM if out of space * - EPERM if driver error */ __rte_experimental -void *rte_gpu_mem_alloc(int16_t dev_id, size_t size) +void *rte_gpu_mem_alloc(int16_t dev_id, size_t size, unsigned int align) __rte_alloc_size(2); /**