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