net/ice: support ACL filter in DCF
[dpdk.git] / doc / guides / vdpadevs / ifc.rst
1 ..  SPDX-License-Identifier: BSD-3-Clause
2     Copyright(c) 2018 Intel Corporation.
3
4 IFCVF vDPA driver
5 =================
6
7 The IFCVF vDPA (vhost data path acceleration) driver provides support for the
8 Intel FPGA 100G VF (IFCVF). IFCVF's datapath is virtio ring compatible, it
9 works as a HW vhost backend which can send/receive packets to/from virtio
10 directly by DMA. Besides, it supports dirty page logging and device state
11 report/restore, this driver enables its vDPA functionality.
12
13
14 IFCVF vDPA Implementation
15 -------------------------
16
17 IFCVF's vendor ID and device ID are same as that of virtio net pci device,
18 with its specific subsystem vendor ID and device ID. To let the device be
19 probed by IFCVF driver, adding "vdpa=1" parameter helps to specify that this
20 device is to be used in vDPA mode, rather than polling mode, virtio pmd will
21 skip when it detects this message. If no this parameter specified, device
22 will not be used as a vDPA device, and it will be driven by virtio pmd.
23
24 Different VF devices serve different virtio frontends which are in different
25 VMs, so each VF needs to have its own DMA address translation service. During
26 the driver probe a new container is created for this device, with this
27 container vDPA driver can program DMA remapping table with the VM's memory
28 region information.
29
30 The device argument "sw-live-migration=1" will configure the driver into SW
31 assisted live migration mode. In this mode, the driver will set up a SW relay
32 thread when LM happens, this thread will help device to log dirty pages. Thus
33 this mode does not require HW to implement a dirty page logging function block,
34 but will consume some percentage of CPU resource depending on the network
35 throughput. If no this parameter specified, driver will rely on device's logging
36 capability.
37
38 Key IFCVF vDPA driver ops
39 ~~~~~~~~~~~~~~~~~~~~~~~~~
40
41 - ifcvf_dev_config:
42   Enable VF data path with virtio information provided by vhost lib, including
43   IOMMU programming to enable VF DMA to VM's memory, VFIO interrupt setup to
44   route HW interrupt to virtio driver, create notify relay thread to translate
45   virtio driver's kick to a MMIO write onto HW, HW queues configuration.
46
47   This function gets called to set up HW data path backend when virtio driver
48   in VM gets ready.
49
50 - ifcvf_dev_close:
51   Revoke all the setup in ifcvf_dev_config.
52
53   This function gets called when virtio driver stops device in VM.
54
55 To create a vhost port with IFC VF
56 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
57
58 - Create a vhost socket and assign a VF's device ID to this socket via
59   vhost API. When QEMU vhost connection gets ready, the assigned VF will
60   get configured automatically.
61
62
63 Features
64 --------
65
66 Features of the IFCVF driver are:
67
68 - Compatibility with virtio 0.95 and 1.0.
69 - SW assisted vDPA live migration.
70
71
72 Prerequisites
73 -------------
74
75 - Platform with IOMMU feature. IFC VF needs address translation service to
76   Rx/Tx directly with virtio driver in VM.
77
78
79 Limitations
80 -----------
81
82 Dependency on vfio-pci
83 ~~~~~~~~~~~~~~~~~~~~~~
84
85 vDPA driver needs to setup VF MSIX interrupts, each queue's interrupt vector
86 is mapped to a callfd associated with a virtio ring. Currently only vfio-pci
87 allows multiple interrupts, so the IFCVF driver is dependent on vfio-pci.
88
89 Live Migration with VIRTIO_NET_F_GUEST_ANNOUNCE
90 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
91
92 IFC VF doesn't support RARP packet generation, virtio frontend supporting
93 VIRTIO_NET_F_GUEST_ANNOUNCE feature can help to do that.