zoukankan      html  css  js  c++  java
  • MLNX_OFED Features Verbs and Capabilities Flow Steering

    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 supersede a lower priority domain when their flow specifications overlap. Setting a lower priority value will result in a higher priority.
    In addition to the domain, there is a 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 to a specified flow when using ibv_exp_create_flow and ibv_exp_destroy_flow verbs
      • ibv_exp_create_flow
        struct ibv_exp_flow *ibv_exp_create_flow(struct ibv_qp *qp, struct ibv_exp_flow_attr
        *flow)

        Input parameters:

        • struct ibv_qp - the attached QP.
        • struct ibv_exp_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_exp_flow_attr can be followed by the optional flow headers structs: 

          struct ibv_exp_flow_spec_ib
          struct ibv_exp_flow_spec_eth
          struct ibv_exp_flow_spec_ipv4
          struct ibv_exp_flow_spec_tcp_udp
          struct ibv_exp_flow_spec_ipv6

          Note: ipv6 is applicable for ConnectX®-4 and ConnectX®-4 Lx only.

          For further information, please refer to the ibv_exp_create_flow man page. 

          Be advised that as of MLNX_OFED v2.0-3.0.0, the parameters (both the value and the mask) should be set in big-endian format.

          Each header struct holds the relevant network layer parameters for matching. To enforce the match, the user sets a mask for each parameter. 
          The mlx5 driver supports partial masks. The mlx4 driver supports the following masks:

          • 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 specifications. 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.

    Flow steering is a 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 flexibility, domains and priorities are used. Flow steering uses a methodology of flow attribute, which is a combination of L@-L4 flow specifications, a destination QP and a priority. Flow steering rules may be inserted either by using ethtool or by using InfiniBand verbs. The verbs abstraction uses a different terminology from the flow attribute (ibv_flow_attr), defined by a combination of specifications (struct ibv_flow_spec_*).

    Flow Steering Experimental vs. RDMA-Core Verbs and Capabilities

    Experimental VerbsRDMA-Core
    Verbs
    ibv_exp_create_flow ibv_create_flow

    IBV_EXP_FLOW_ATTR_*

    IBV_FLOW_ATTR

    IBV_EXP_FLOW_ATTR_FLAGS_ALLOW_LOOP_BACK

    IBV_FLOW_ATTR_FLAGS_ALLOW_LOOP_BACK

    IBV_EXP_FLOW_SPEC_ETH

    IBV_FLOW_SPEC_ETH

    IBV_EXP_FLOW_SPEC_IB

    Not supported by RDMA-CORE

    IBV_EXP_FLOW_SPEC_IPV4

    IBV_FLOW_SPEC_IPV4

    IBV_EXP_FLOW_SPEC_IPV6

    IBV_FLOW_SPEC_IPV6

    IBV_EXP_FLOW_SPEC_IPV4_EXT

    IBV_FLOW_SPEC_IPV4_EXT

    IBV_EXP_FLOW_SPEC_IPV6_EXT

    IBV_FLOW_SPEC_IPV6

    IBV_EXP_FLOW_SPEC_TCP

    IBV_EXP_FLOW_SPEC_TCP

    IBV_EXP_FLOW_SPEC_UDP

    IBV_FLOW_SPEC_UDP

    IBV_EXP_FLOW_SPEC_VXLAN_TUNNEL

    IBV_FLOW_SPEC_VXLAN_TUNNEL

    IBV_EXP_FLOW_SPEC_INNER

    IBV_FLOW_SPEC_INNER

    IBV_EXP_FLOW_SPEC_ACTION_TAG

    IBV_FLOW_SPEC_ACTION_TAG

    IBV_EXP_FLOW_SPEC_ACTION_DROP

    IBV_FLOW_SPEC_ACTION_DROP

    Ibv_exp_flow_spec_*

    Ibv_flow_spec_*

    Ibv_exp_destroy_flow

    Ibv_destroy_flow

    Capabilities 

    IBV_EXP_DEVICE_MANAGED_FLOW_STEERING

    IBV_DEVICE_MANAGED_FLOW_STEERING

     ibv_create_flow    mlx5dv_create_flow

    参考

    https://docs.mellanox.com/display/rdmacore50/Flow+Steering

    https://docs.mellanox.com/display/MLNXOFEDv461000/Flow+Steering

  • 相关阅读:
    springMVC 是单例还是的多例的?
    js如何获取数字占的位数~
    java 为什么wait(),notify(),notifyAll()必须在同步方法/代码块中调用?
    数据挖掘基本概念讲解
    js如何判断小数点后有几位
    volotile关键字的内存可见性及重排序
    上传文件multipart form-data boundary 说明
    vi 调到第一行和最后一行
    linux监控平台搭建-磁盘
    Guava Cache 参数配置说明
  • 原文地址:https://www.cnblogs.com/dream397/p/14742098.html
Copyright © 2011-2022 走看看