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