MCPcopy Create free account
hub / github.com/F-Stack/f-stack / mlx5_os_pd_create

Function mlx5_os_pd_create

dpdk/drivers/common/mlx5/linux/mlx5_common_os.c:478–487  ·  view source on GitHub ↗

* Allocate Protection Domain object. * * @param[out] cdev * Pointer to the mlx5 device. * * @return * 0 on success, a negative errno value otherwise. */

Source from the content-addressed store, hash-verified

476 * 0 on success, a negative errno value otherwise.
477 */
478static int
479mlx5_os_pd_create(struct mlx5_common_device *cdev)
480{
481 cdev->pd = mlx5_glue->alloc_pd(cdev->ctx);
482 if (cdev->pd == NULL) {
483 DRV_LOG(ERR, "Failed to allocate PD: %s", rte_strerror(errno));
484 return errno ? -errno : -ENOMEM;
485 }
486 return 0;
487}
488
489/**
490 * Import Protection Domain object according to given PD handle.

Callers 1

mlx5_os_pd_prepareFunction · 0.85

Calls 1

rte_strerrorFunction · 0.85

Tested by

no test coverage detected