X-Git-Url: http://git.droids-corp.org/?a=blobdiff_plain;f=doc%2Fguides%2Fnics%2Fmlx5.rst;h=5ab7c071653ece3ee62f62d15c57c5ba32fb5c9a;hb=6affeabaf3210f52a90dd1bb96741d23256a39c6;hp=fd5a3264be9cc4958d4edfcbd8ad3936956100d2;hpb=1c7e57f9bd3319f63a111b633ef12016fc732d2f;p=dpdk.git diff --git a/doc/guides/nics/mlx5.rst b/doc/guides/nics/mlx5.rst index fd5a3264be..5ab7c07165 100644 --- a/doc/guides/nics/mlx5.rst +++ b/doc/guides/nics/mlx5.rst @@ -64,6 +64,8 @@ Features - Multiple TX and RX queues. - Support for scattered TX and RX frames. - IPv4, IPv6, TCPv4, TCPv6, UDPv4 and UDPv6 RSS on any number of queues. +- RSS using different combinations of fields: L3 only, L4 only or both, + and source only, destination only or both. - Several RSS hash keys, one for each flow type. - Default RSS operation with no hash key specification. - Configurable RETA table. @@ -88,6 +90,7 @@ Features - Statistics query including Basic, Extended and per queue. - Rx HW timestamp. - Tunnel types: VXLAN, L3 VXLAN, VXLAN-GPE, GRE, MPLSoGRE, MPLSoUDP, IP-in-IP, Geneve. +- Tunnel types: VXLAN, L3 VXLAN, VXLAN-GPE, GRE, MPLSoGRE, MPLSoUDP, IP-in-IP, Geneve, GTP. - Tunnel HW offloads: packet type, inner/outer RSS, IP and UDP checksum verification. - NIC HW offloads: encapsulation (vxlan, gre, mplsoudp, mplsogre), NAT, routing, TTL increment/decrement, count, drop, mark. For details please see :ref:`mlx5_offloads_support`. @@ -107,21 +110,18 @@ Limitations process. If the external memory is registered by primary process but has different virtual address in secondary process, unexpected error may happen. -- Flow pattern without any specific vlan will match for vlan packets as well: +- When using Verbs flow engine (``dv_flow_en`` = 0), flow pattern without any + specific VLAN will match for VLAN packets as well: When VLAN spec is not specified in the pattern, the matching rule will be created with VLAN as a wild card. Meaning, the flow rule:: flow create 0 ingress pattern eth / vlan vid is 3 / ipv4 / end ... - Will only match vlan packets with vid=3. and the flow rules:: + Will only match vlan packets with vid=3. and the flow rule:: flow create 0 ingress pattern eth / ipv4 / end ... - Or:: - - flow create 0 ingress pattern eth / vlan / ipv4 / end ... - Will match any ipv4 packet (VLAN included). - VLAN pop offload command: @@ -157,6 +157,11 @@ Limitations - VF: flow rules created on VF devices can only match traffic targeted at the configured MAC addresses (see ``rte_eth_dev_mac_addr_add()``). +- Match on GTP tunnel header item supports the following fields only: + + - msg_type + - teid + .. note:: MAC addresses not already present in the bridge table of the associated @@ -270,6 +275,10 @@ These options can be modified in the ``.config`` file. 64. Default armv8a configuration of make build and meson build set it to 128 then brings performance degradation. +This option is available in meson: + +- ``ibverbs_link`` can be ``static``, ``shared``, or ``dlopen``. + Environment variables ~~~~~~~~~~~~~~~~~~~~~ @@ -565,17 +574,27 @@ Run-time configuration The type of mapping may slightly affect the Tx performance, the optimal choice is strongly relied on the host architecture and should be deduced practically. - If ``tx_db_nc`` is either omitted or set to zero, the doorbell is forced to be - mapped to regular memory, the PMD will perform the extra write memory barrier - after writing to doorbell, it might increase the needed CPU clocks per packet - to send, but latency might be improved. + If ``tx_db_nc`` is set to zero, the doorbell is forced to be mapped to regular + memory, the PMD will perform the extra write memory barrier after writing to + doorbell, it might increase the needed CPU clocks per packet to send, but + latency might be improved. - If ``tx_db_nc`` is set to not zero, the doorbell is forced to be mapped to - non cached memory, the PMD will not perform the extra write memory barrier + If ``tx_db_nc`` is set to one, the doorbell is forced to be mapped to non + cached memory, the PMD will not perform the extra write memory barrier after writing to doorbell, on some architectures it might improve the performance. - The default ``tx_db_nc`` value is zero ARM64 hosts and one for others. + If ``tx_db_nc`` is set to two, the doorbell is forced to be mapped to regular + memory, the PMD will use heuristics to decide whether write memory barrier + should be performed. For bursts with size multiple of recommended one (64 pkts) + it is supposed the next burst is coming and no need to issue the extra memory + barrier (it is supposed to be issued in the next coming burst, at least after + descriptor writing). It might increase latency (on some hosts till next + packets transmit) and should be used with care. + + If ``tx_db_nc`` is omitted or set to zero, the preset (if any) environment + variable "MLX5_SHUT_UP_BF" value is used. If there is no "MLX5_SHUT_UP_BF", + the default ``tx_db_nc`` value is zero for ARM64 hosts and one for others. - ``tx_vec_en`` parameter [int] @@ -656,12 +675,16 @@ Run-time configuration Disabled by default (set to 0). + The Direct Verbs/Rules (engaged with ``dv_flow_en`` = 1) supports all + of the extensive metadata features. The legacy Verbs supports FLAG and + MARK metadata actions over NIC Rx steering domain only. + - ``dv_flow_en`` parameter [int] A nonzero value enables the DV flow steering assuming it is supported - by the driver. + by the driver (RDMA Core library version is rdma-core-24.0 or higher). - Disabled by default. + Enabled by default if supported. - ``dv_esw_en`` parameter [int] @@ -772,6 +795,10 @@ Below are some firmware configurations listed. FLEX_PARSER_PROFILE_ENABLE=0 +- enable GTP flow matching:: + + FLEX_PARSER_PROFILE_ENABLE=3 + Prerequisites ------------- @@ -1101,26 +1128,36 @@ Supported hardware offloads .. table:: Minimal SW/HW versions for rte_flow offloads +-----------------------+-----------------+-----------------+ - | Offload | with E-Switch | with vNIC | + | Offload | with E-Switch | with NIC | +=======================+=================+=================+ | Count | | DPDK 19.05 | | DPDK 19.02 | | | | OFED 4.6 | | OFED 4.6 | | | | rdma-core 24 | | rdma-core 23 | | | | ConnectX-5 | | ConnectX-5 | +-----------------------+-----------------+-----------------+ - | Drop / Queue / RSS | | DPDK 19.05 | | DPDK 18.11 | + | Drop | | DPDK 19.05 | | DPDK 18.11 | | | | OFED 4.6 | | OFED 4.5 | | | | rdma-core 24 | | rdma-core 23 | | | | ConnectX-5 | | ConnectX-4 | +-----------------------+-----------------+-----------------+ + | Queue / RSS | | | | DPDK 18.11 | + | | | N/A | | OFED 4.5 | + | | | | | rdma-core 23 | + | | | | | ConnectX-4 | + +-----------------------+-----------------+-----------------+ | Encapsulation | | DPDK 19.05 | | DPDK 19.02 | - | (VXLAN / NVGRE / RAW) | | OFED 4.6-2 | | OFED 4.6 | + | (VXLAN / NVGRE / RAW) | | OFED 4.7-1 | | OFED 4.6 | | | | rdma-core 24 | | rdma-core 23 | | | | ConnectX-5 | | ConnectX-5 | +-----------------------+-----------------+-----------------+ + | Encapsulation | | DPDK 19.11 | | DPDK 19.11 | + | GENEVE | | OFED 4.7-3 | | OFED 4.7-3 | + | | | rdma-core 27 | | rdma-core 27 | + | | | ConnectX-5 | | ConnectX-5 | + +-----------------------+-----------------+-----------------+ | | Header rewrite | | DPDK 19.05 | | DPDK 19.02 | - | | (set_ipv4_src / | | OFED 4.6-2 | | OFED 4.6-2 | - | | set_ipv4_dst / | | rdma-core 24 | | rdma-core 23 | + | | (set_ipv4_src / | | OFED 4.7-1 | | OFED 4.7-1 | + | | set_ipv4_dst / | | rdma-core 24 | | rdma-core 24 | | | set_ipv6_src / | | ConnectX-5 | | ConnectX-5 | | | set_ipv6_dst / | | | | | | | set_tp_src / | | | | | @@ -1129,13 +1166,9 @@ Supported hardware offloads | | set_ttl / | | | | | | | set_mac_src / | | | | | | | set_mac_dst) | | | | | - | | | | | | | - | | (of_set_vlan_vid) | | DPDK 19.11 | | DPDK 19.11 | - | | | OFED 4.6-4 | | OFED 4.6-4 | - | | | ConnectX-5 | | ConnectX-5 | +-----------------------+-----------------+-----------------+ | Jump | | DPDK 19.05 | | DPDK 19.02 | - | | | OFED 4.6-4 | | OFED 4.6-4 | + | | | OFED 4.7-1 | | OFED 4.7-1 | | | | rdma-core 24 | | N/A | | | | ConnectX-5 | | ConnectX-5 | +-----------------------+-----------------+-----------------+ @@ -1145,15 +1178,30 @@ Supported hardware offloads | | | ConnectX-5 | | ConnectX-4 | +-----------------------+-----------------+-----------------+ | Port ID | | DPDK 19.05 | | N/A | - | | | OFED 4.6 | | N/A | + | | | OFED 4.7-1 | | N/A | | | | rdma-core 24 | | N/A | | | | ConnectX-5 | | N/A | +-----------------------+-----------------+-----------------+ | | VLAN | | DPDK 19.11 | | DPDK 19.11 | - | | (of_pop_vlan / | | OFED 4.6-4 | | OFED 4.6-4 | + | | (of_pop_vlan / | | OFED 4.7-1 | | OFED 4.7-1 | | | of_push_vlan / | | ConnectX-5 | | ConnectX-5 | - | | of_set_vlan_pcp / | | | - | | of_set_vlan_vid) | | | + | | of_set_vlan_pcp / | | | | | + | | of_set_vlan_vid) | | | | | + +-----------------------+-----------------+-----------------+ + | Hairpin | | | | DPDK 19.11 | + | | | N/A | | OFED 4.7-3 | + | | | | | rdma-core 26 | + | | | | | ConnectX-5 | + +-----------------------+-----------------+-----------------+ + | Meta data | | DPDK 19.11 | | DPDK 19.11 | + | | | OFED 4.7-3 | | OFED 4.7-3 | + | | | rdma-core 26 | | rdma-core 26 | + | | | ConnectX-5 | | ConnectX-5 | + +-----------------------+-----------------+-----------------+ + | Metering | | DPDK 19.11 | | DPDK 19.11 | + | | | OFED 4.7-3 | | OFED 4.7-3 | + | | | rdma-core 26 | | rdma-core 26 | + | | | ConnectX-5 | | ConnectX-5 | +-----------------------+-----------------+-----------------+ Notes for testpmd @@ -1275,3 +1323,31 @@ ConnectX-4/ConnectX-5/ConnectX-6/BlueField devices managed by librte_pmd_mlx5. Port 3 Link Up - speed 10000 Mbps - full-duplex Done testpmd> + +How to dump flows +----------------- + +This section demonstrates how to dump flows. Currently, it's possible to dump +all flows with assistance of external tools. + +#. 2 ways to get flow raw file: + + - Using testpmd CLI: + + .. code-block:: console + + testpmd> flow dump + + - call rte_flow_dev_dump api: + + .. code-block:: console + + rte_flow_dev_dump(port, file, NULL); + +#. Dump human-readable flows from raw file: + + Get flow parsing tool from: https://github.com/Mellanox/mlx_steering_dump + + .. code-block:: console + + mlx_steering_dump.py -f