2 flow domains and priorities – Dell Mellanox Family of Adapters User Manual
Page 39
User Manual for Mellanox ConnectX®-3 10/40 Gigabit Ethernet Adapters for Dell PowerEdge Servers
Rev 1.1
Mellanox Technologies
39
4.2.6.2 Flow Domains and Priorities
Flow steering defines the concept of domain and priority. Each domain represents a user agent
that can attach a flow. The domains are prioritized. A higher priority domain will always super-
sede a lower priority domain when their flow specifications overlap. Setting a lower priority
value will result in higher priority.
In addition to the domain, there is priority within each of the domains. Each domain can have at
most 2^12 priorities in accordance with its needs.
The following are the domains at a descending order of priority:
•
User Verbs allows a user application QP to be attached into a specified flow when
using
ibv_create_flow
and
ibv_destroy_flow
verbs
•
ibv_create_flow
Input parameters:
•
struct ibv_qp
- the attached QP.
•
struct ibv_flow_attr
- attaches the QP to the flow specified. The flow contains mandatory control
parameters and optional L2, L3 and L4 headers. The optional headers are detected by setting the size and
num_of_specs
fields:
struct ibv_flow_attr
can be followed by the optional flow headers structs:
For further information, please refer to the
ibv_create_flow
man page.
Each header struct holds the relevant network layer parameters for matching. To enforce the match, the
user sets a mask for each parameter. The supported masks are:
•
All one mask - include the parameter value in the attached rule
Note: Since the VLAN ID in the Ethernet header is 12bit long, the following parameter should be
used:
flow_spec_eth.mask.vlan_tag = htons(0x0fff)
.
•
All zero mask - ignore the parameter value in the attached rule
When setting the flow type to NORMAL, the incoming traffic will be steered according to the rule spec-
ifications. ALL_DEFAULT and MC_DEFAULT rules options are valid only for Ethernet link type since
InfiniBand link type packets always include QP number.
For further information, please refer to the relevant man pages.
•
ibv_destroy_flow
Input parameters:
ibv_destroy_flow
requires
struct ibv_flow
which is the return value of
ibv_create_flow
in
case of success.
struct ibv_flow *ibv_create_flow(struct ibv_qp *qp, struct ibv_flow_attr *flow)
struct ibv_flow_spec_ib
struct ibv_flow_spec_eth
struct ibv_flow_spec_ipv4
struct ibv_flow_spec_tcp_udp
Be advised that from MLNX_OFED v2.0-3.0.0 and higher, the parameters (both the
value and the mask) should be set in big-endian format.
int ibv_destroy_flow(struct ibv_flow *flow_id)