]>
Commit | Line | Data |
---|---|---|
11fdf7f2 TL |
1 | .. SPDX-License-Identifier: BSD-3-Clause |
2 | Copyright(c) 2016 Intel Corporation. | |
7c673cae FG |
3 | |
4 | Flow Bifurcation How-to Guide | |
5 | ============================= | |
6 | ||
7 | Flow Bifurcation is a mechanism which uses hardware capable Ethernet devices | |
8 | to split traffic between Linux user space and kernel space. Since it is a | |
9 | hardware assisted feature this approach can provide line rate processing | |
10 | capability. Other than :ref:`KNI <kni>`, the software is just required to | |
11 | enable device configuration, there is no need to take care of the packet | |
12 | movement during the traffic split. This can yield better performance with | |
13 | less CPU overhead. | |
14 | ||
15 | The Flow Bifurcation splits the incoming data traffic to user space | |
16 | applications (such as DPDK applications) and/or kernel space programs (such as | |
17 | the Linux kernel stack). It can direct some traffic, for example data plane | |
18 | traffic, to DPDK, while directing some other traffic, for example control | |
19 | plane traffic, to the traditional Linux networking stack. | |
20 | ||
21 | There are a number of technical options to achieve this. A typical example is | |
22 | to combine the technology of SR-IOV and packet classification filtering. | |
23 | ||
24 | SR-IOV is a PCI standard that allows the same physical adapter to be split as | |
25 | multiple virtual functions. Each virtual function (VF) has separated queues | |
26 | with physical functions (PF). The network adapter will direct traffic to a | |
27 | virtual function with a matching destination MAC address. In a sense, SR-IOV | |
28 | has the capability for queue division. | |
29 | ||
30 | Packet classification filtering is a hardware capability available on most | |
31 | network adapters. Filters can be configured to direct specific flows to a | |
32 | given receive queue by hardware. Different NICs may have different filter | |
33 | types to direct flows to a Virtual Function or a queue that belong to it. | |
34 | ||
35 | In this way the Linux networking stack can receive specific traffic through | |
36 | the kernel driver while a DPDK application can receive specific traffic | |
37 | bypassing the Linux kernel by using drivers like VFIO or the DPDK ``igb_uio`` | |
38 | module. | |
39 | ||
40 | .. _figure_flow_bifurcation_overview: | |
41 | ||
42 | .. figure:: img/flow_bifurcation_overview.* | |
43 | ||
44 | Flow Bifurcation Overview | |
45 | ||
46 | ||
9f95a23c TL |
47 | Using Flow Bifurcation on Mellanox ConnectX |
48 | ------------------------------------------- | |
49 | ||
50 | The Mellanox devices are :ref:`natively bifurcated <bifurcated_driver>`, | |
51 | so there is no need to split into SR-IOV PF/VF | |
52 | in order to get the flow bifurcation mechanism. | |
53 | The full device is already shared with the kernel driver. | |
54 | ||
55 | The DPDK application can setup some flow steering rules, | |
56 | and let the rest go to the kernel stack. | |
57 | In order to define the filters strictly with flow rules, | |
58 | the :ref:`flow_isolated_mode` can be configured. | |
59 | ||
60 | There is no specific instructions to follow. | |
61 | The recommended reading is the :doc:`../prog_guide/rte_flow` guide. | |
62 | Below is an example of testpmd commands | |
63 | for receiving VXLAN 42 in 4 queues of the DPDK port 0, | |
64 | while all other packets go to the kernel: | |
65 | ||
66 | .. code-block:: console | |
67 | ||
68 | testpmd> flow isolate 0 true | |
69 | testpmd> flow create 0 ingress pattern eth / ipv4 / udp / vxlan vni is 42 / end \ | |
70 | actions rss queues 0 1 2 3 end / end |