User Manual
Rev 2.0-3.0.0
Mellanox Technologies
79
4.12 Flow Steering
Flow steering is a new model which steers network flows based on flow specifications to specific
QPs. Those flows can be either unicast or multicast network flows. In order to maintain flexibil-
ity, domains and priorities are used. Flow steering uses a methodology of flow attribute, which is
a combination of L2-L4 flow specifications, a destination QP and a priority. Flow steering rules
could be inserted either by using ethtool or by using InfiniBand verbs. The verbs abstraction uses
an opposed terminology of a flow attribute (ibv_flow_attr), defined by a combination of specifi-
cations (struct ibv_flow_spec_*).
4.12.1 Enable/Disable Flow Steering
Flow Steering is disabled by default and regular L2 steering is performed instead (B0 Steering).
When using SR-IOV, flow steering is enabled if there is adequate amount of space to store the
flow steering table for the guest/master.
To enable Flow Steering:
Step 1. Open the /etc/modprobe.d/mlnx.conf file.
Step 2. Set the parameter log_num_mgm_entry_size to -1 by writing the option mlx4_core
log_num_mgm_entry_size=-1.
Step 3. Restart the driver
To disable Flow Steering:
Step 1. Open the /etc/modprobe.d/mlnx.conf file.
Step 2. Remove the options mlx4_core log_num_mgm_entry_size= -1.
Step 3. Restart the driver
4.12.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 to 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.
Flow Steering is applicable to the mlx4 driver only.
struct ibv_flow *ibv_create_flow(struct ibv_qp *qp, struct ibv_flow_attr *flow)