.\" Automatically generated by Pandoc 3.1.11.1
.\"
.TH "mlx5dv_pp_alloc / mlx5dv_pp_free" "3" "" "" ""
.SH NAME
mlx5dv_pp_alloc \- Allocates a packet pacing entry
.PP
mlx5dv_pp_free \- Frees a packet pacing entry
.SH SYNOPSIS
.IP
.EX
#include <infiniband/mlx5dv.h>

struct mlx5dv_pp *
mlx5dv_pp_alloc(struct ibv_context *context,
        size_t pp_context_sz,
        const void *pp_context,
        uint32_t flags);

void mlx5dv_pp_free(struct mlx5dv_pp *dv_pp);
.EE
.SH DESCRIPTION
Create / free a packet pacing entry which can be used for some device
commands over the DEVX interface.
.PP
The DEVX API enables direct access from the user space area to the mlx5
device driver, the packet pacing information is needed for few commands
where a packet pacing index is needed.
.SH ARGUMENTS
.TP
\f[I]context\f[R]
RDMA device context to work on, need to be opened with DEVX support by
using mlx5dv_open_device().
.TP
\f[I]pp_context_sz\f[R]
Length of \f[I]pp_context\f[R] input buffer.
.TP
\f[I]pp_context\f[R]
Packet pacing context according to the device specification.
.TP
\f[I]flags\f[R]
MLX5DV_PP_ALLOC_FLAGS_DEDICATED_INDEX: allocate a dedicated index.
.SS dv_pp
.IP
.EX
struct mlx5dv_pp {
    uint16_t index;
};
.EE
.TP
\f[I]index\f[R]
The device index to be used.
.SH RETURN VALUE
Upon success \f[I]mlx5dv_pp_alloc\f[R] returns a pointer to the created
packet pacing object, on error NULL will be returned and errno will be
set.
.SH SEE ALSO
\f[B]mlx5dv_open_device\f[R], \f[B]mlx5dv_devx_obj_create\f[R]
.SH AUTHOR
Yishai Hadas \c
.MT yishaih@mellanox.com
.ME \c
