.\" Automatically generated by Pandoc 2.9.2.1
.\"
.TH "IONIC_DV_PD_SET_UDMA_MASK" "3" "2025-06-23" "ionic" "Ionic Programmer\[cq]s Manual"
.hy
.SH NAME
.PP
ionic_dv_pd_set_udma_mask - Restrict UDMA pipeline IDs of a protection
domain
.SH SYNOPSIS
.IP
.nf
\f[C]
#include <infiniband/ionic_dv.h>

int ionic_dv_pd_set_udma_mask(struct ibv_pd *ibpd, uint8_t udma_mask);
\f[R]
.fi
.SH DESCRIPTION
.PP
\f[B]ionic_dv_pd_set_udma_mask()\f[R] restricts the UDMA pipelines
available for queues created under the protection domain or parent
domain \f[I]ibpd\f[R].
Queues created after this call will be assigned to one of the pipelines
enabled by \f[I]udma_mask\f[R].
.PP
The \f[I]udma_mask\f[R] must be a subset of the device\[cq]s available
UDMA pipelines, as returned by \f[B]ionic_dv_ctx_get_udma_mask\f[R](3).
.PP
Changing the UDMA mask of a protection domain has no effect on
previously created queues.
.PP
The recommended usage pattern is:
.IP "1." 3
Create a protection domain with \f[B]ibv_alloc_pd\f[R](3).
.IP "2." 3
Create parent domains of that PD for each desired UDMA mask using
\f[B]ibv_alloc_parent_domain\f[R](3).
.IP "3." 3
Set the desired UDMA mask on each parent domain with this function.
.IP "4." 3
Create queues associated with the parent domain that has the desired
UDMA mask.
.PP
An alternative usage is to create a single PD and change its UDMA mask
before creating each queue.
.SH ARGUMENTS
.TP
\f[I]ibpd\f[R]
The protection domain or parent domain to modify.
Must be an ionic protection domain.
.TP
\f[I]udma_mask\f[R]
A bitmask of UDMA pipeline IDs to enable.
Must be a subset of the mask returned by
\f[B]ionic_dv_ctx_get_udma_mask\f[R](3).
.SH RETURN VALUE
.PP
Returns 0 on success, or a positive errno value on failure:
.TP
\f[I]EPERM\f[R]
\f[I]ibpd\f[R] is not an ionic protection domain.
.TP
\f[I]EINVAL\f[R]
\f[I]udma_mask\f[R] contains bits not present in the device\[cq]s UDMA
mask.
.SH SEE ALSO
.PP
\f[B]ionicdv\f[R](7), \f[B]ionic_dv_pd_get_udma_mask\f[R](3),
\f[B]ionic_dv_ctx_get_udma_mask\f[R](3),
\f[B]ionic_dv_ctx_get_udma_count\f[R](3), \f[B]ibv_alloc_pd\f[R](3),
\f[B]ibv_alloc_parent_domain\f[R](3)
.SH AUTHORS
.PP
Advanced Micro Devices, Inc.
