---
name: "ibv_unimport_pd"
section: "3"
platform: "linux"
package: "rdma-core"
version: "65.0-1"
release: "Arch Linux 2026-11-01"
platforms: ["linux"]
url: "https://new.carta.tech/ibv_import_pd"
---

# ibv\_unimport\_pd(3)

import a PD from a given ibv\_context ibv\_unimport\_pd - unimport a PD

Part of [ibv\_import\_pd(3)](/ibv_import_pd/3.md).

## NAME

ibv\_import\_pd - import a PD from a given ibv\_context

ibv\_unimport\_pd - unimport a PD

## SYNOPSIS

-

  ```
  #include <infiniband/verbs.h>
  struct ibv_pd *ibv_import_pd(struct ibv_context *context, uint32_t pd_handle);
  void ibv_unimport_pd(struct ibv_pd *pd)
  ```

## DESCRIPTION

**ibv\_import\_pd()** returns a protection domain (PD) that is associated with the given *pd\_handle* in the given *context*.

The input *pd\_handle* value must be a valid kernel handle for a PD object in the given *context*. It can be achieved from the original PD by getting its ibv\_pd-\>handle member value.

The returned *ibv\_pd* can be used in all verbs that get a protection domain.

**ibv\_unimport\_pd()** unimport the PD. Once the PD usage has been ended ibv\_dealloc\_pd() or ibv\_unimport\_pd() should be called. The first one will go to the kernel to destroy the object once the second one way cleanup what ever is needed/opposite of the import without calling the kernel.

This is the responsibility of the application to coordinate between all ibv\_context(s) that use this PD. Once destroy is done no other process can touch the object except for unimport. All users of the context must collaborate to ensure this.

## RETURN VALUE

**ibv\_import\_pd()** returns a pointer to the allocated PD, or NULL if the request fails, and errno is set to indicate the reason.

## SEE ALSO

[**ibv\_alloc\_pd**(3)](/ibv_alloc_pd/3.md), [**ibv\_dealloc\_pd**(3)](/ibv_dealloc_pd/3.md),

## AUTHOR

Yishai Hadas ⟨yishaih@mellanox.com⟩\\c
