.\" Automatically generated by Pandoc 1.16.0.2
.\"
.TH "mlx5dv_create_steering_anchor / mlx5dv_destroy_steering_anchor" "3" "" "" ""
.hy
.SH NAME
.PP
mlx5dv_create_steering_anchor \- Creates a steering anchor
.PP
mlx5dv_destroy_steering_anchor \- Destroys a steering anchor
.SH SYNOPSIS
.IP
.nf
\f[C]
#include\ <infiniband/mlx5dv.h>

struct\ mlx5dv_steering_anchor\ *
mlx5dv_create_steering_anchor(struct\ ibv_context\ *context,
\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ struct\ mlx5dv_steering_anchor_attr\ *attr);

int\ mlx5dv_destroy_steering_anchor(struct\ mlx5dv_steering_anchor\ *sa);
\f[]
.fi
.SH DESCRIPTION
.PP
A user can take packets into a user\-configured sandbox and do packet
processing at the end of which a steering pipeline decision is made on
what to do with the packet.
.PP
A steering anchor allows the user to reinject the packet back into the
kernel for additional processing.
.PP
\f[B]mlx5dv_create_steering_anchor()\f[] Creates an anchor which will
allow injecting the packet back into the kernel steering pipeline.
.PP
\f[B]mlx5dv_destroy_steering_anchor()\f[] Destroys a steering anchor.
.SH ARGUMENTS
.SS context
.PP
The device context to associate the steering anchor with.
.SS attr
.PP
Anchor attributes specify the priority and flow table type to which the
anchor will point.
.IP
.nf
\f[C]
struct\ mlx5dv_steering_anchor_attr\ {
\ \ \ \ \ \ \ \ enum\ mlx5dv_flow_table_type\ ft_type;
\ \ \ \ \ \ \ \ uint16_t\ priority;
\ \ \ \ \ \ \ \ uint64_t\ comp_mask;
};
\f[]
.fi
.TP
.B \f[I]ft_type\f[]
The flow table type to which the anchor will point.
.RS
.RE
.TP
.B \f[I]priority\f[]
The priority inside \f[I]ft_type\f[] to which the created anchor will
point.
.RS
.RE
.TP
.B \f[I]comp_mask\f[]
Reserved for future extension, must be 0 now.
.RS
.RE
.SS mlx5dv_steering_anchor
.IP
.nf
\f[C]
struct\ mlx5dv_steering_anchor\ {
\ \ \ \ uint32_t\ id;
};
\f[]
.fi
.TP
.B \f[I]id\f[]
The flow table ID to use as the destination when creating the flow table
entry.
.RS
.RE
.SH RETURN VALUE
.PP
\f[B]mlx5dv_create_steering_anchor()\f[] returns a pointer to a new
\f[I]mlx5dv_steering_anchor\f[] on success.
On error NULL is returned and errno is set.
.PP
\f[B]mlx5dv_destroy_steering_anchor()\f[] returns 0 on success and errno
value on error.
.SH AUTHORS
.PP
Mark Bloch <mbloch@nvidia.com>
