From: Xiao Wang Date: Wed, 13 Jun 2018 11:32:45 +0000 (+0800) Subject: net/ifc: make driver name consistent X-Git-Url: http://git.droids-corp.org/?a=commitdiff_plain;h=4b614e9504a1;p=dpdk.git net/ifc: make driver name consistent Make the compiler switch name and document name consistent as ``ifc`` to avoid confusion. Also rename the map file to standard name for meson build in the process. Signed-off-by: Xiao Wang Signed-off-by: Bruce Richardson --- diff --git a/MAINTAINERS b/MAINTAINERS index 14939f10a8..301daa8d3f 100644 --- a/MAINTAINERS +++ b/MAINTAINERS @@ -564,8 +564,8 @@ Intel ifc M: Xiao Wang T: git://dpdk.org/next/dpdk-next-net-intel F: drivers/net/ifc/ -F: doc/guides/nics/ifcvf.rst -F: doc/guides/nics/features/ifcvf.ini +F: doc/guides/nics/ifc.rst +F: doc/guides/nics/features/ifc*.ini Marvell mvpp2 M: Tomasz Duszynski diff --git a/config/common_base b/config/common_base index 6b0d1cbbb7..fcf3a1f6fa 100644 --- a/config/common_base +++ b/config/common_base @@ -861,11 +861,11 @@ CONFIG_RTE_LIBRTE_VHOST_DEBUG=n CONFIG_RTE_LIBRTE_PMD_VHOST=n # -# Compile IFCVF driver +# Compile IFC driver # To compile, CONFIG_RTE_LIBRTE_VHOST and CONFIG_RTE_EAL_VFIO # should be enabled. # -CONFIG_RTE_LIBRTE_IFCVF_VDPA_PMD=n +CONFIG_RTE_LIBRTE_IFC_PMD=n # # Compile librte_bpf diff --git a/config/common_linuxapp b/config/common_linuxapp index 5c68cc0ff4..daa49d4efb 100644 --- a/config/common_linuxapp +++ b/config/common_linuxapp @@ -15,7 +15,7 @@ CONFIG_RTE_LIBRTE_PMD_KNI=y CONFIG_RTE_LIBRTE_VHOST=y CONFIG_RTE_LIBRTE_VHOST_NUMA=y CONFIG_RTE_LIBRTE_PMD_VHOST=y -CONFIG_RTE_LIBRTE_IFCVF_VDPA_PMD=y +CONFIG_RTE_LIBRTE_IFC_PMD=y CONFIG_RTE_LIBRTE_PMD_AF_PACKET=y CONFIG_RTE_LIBRTE_PMD_TAP=y CONFIG_RTE_LIBRTE_AVP_PMD=y diff --git a/doc/guides/nics/ifc.rst b/doc/guides/nics/ifc.rst new file mode 100644 index 0000000000..48f9adf1d2 --- /dev/null +++ b/doc/guides/nics/ifc.rst @@ -0,0 +1,96 @@ +.. SPDX-License-Identifier: BSD-3-Clause + Copyright(c) 2018 Intel Corporation. + +IFCVF vDPA driver +================= + +The IFCVF vDPA (vhost data path acceleration) driver provides support for the +Intel FPGA 100G VF (IFCVF). IFCVF's datapath is virtio ring compatible, it +works as a HW vhost backend which can send/receive packets to/from virtio +directly by DMA. Besides, it supports dirty page logging and device state +report/restore, this driver enables its vDPA functionality. + + +Pre-Installation Configuration +------------------------------ + +Config File Options +~~~~~~~~~~~~~~~~~~~ + +The following option can be modified in the ``config`` file. + +- ``CONFIG_RTE_LIBRTE_IFCVF_VDPA_PMD`` (default ``y`` for linux) + + Toggle compilation of the ``librte_ifcvf_vdpa`` driver. + + +IFCVF vDPA Implementation +------------------------- + +IFCVF's vendor ID and device ID are same as that of virtio net pci device, +with its specific subsystem vendor ID and device ID. To let the device be +probed by IFCVF driver, adding "vdpa=1" parameter helps to specify that this +device is to be used in vDPA mode, rather than polling mode, virtio pmd will +skip when it detects this message. + +Different VF devices serve different virtio frontends which are in different +VMs, so each VF needs to have its own DMA address translation service. During +the driver probe a new container is created for this device, with this +container vDPA driver can program DMA remapping table with the VM's memory +region information. + +Key IFCVF vDPA driver ops +~~~~~~~~~~~~~~~~~~~~~~~~~ + +- ifcvf_dev_config: + Enable VF data path with virtio information provided by vhost lib, including + IOMMU programming to enable VF DMA to VM's memory, VFIO interrupt setup to + route HW interrupt to virtio driver, create notify relay thread to translate + virtio driver's kick to a MMIO write onto HW, HW queues configuration. + + This function gets called to set up HW data path backend when virtio driver + in VM gets ready. + +- ifcvf_dev_close: + Revoke all the setup in ifcvf_dev_config. + + This function gets called when virtio driver stops device in VM. + +To create a vhost port with IFC VF +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +- Create a vhost socket and assign a VF's device ID to this socket via + vhost API. When QEMU vhost connection gets ready, the assigned VF will + get configured automatically. + + +Features +-------- + +Features of the IFCVF driver are: + +- Compatibility with virtio 0.95 and 1.0. + + +Prerequisites +------------- + +- Platform with IOMMU feature. IFC VF needs address translation service to + Rx/Tx directly with virtio driver in VM. + + +Limitations +----------- + +Dependency on vfio-pci +~~~~~~~~~~~~~~~~~~~~~~ + +vDPA driver needs to setup VF MSIX interrupts, each queue's interrupt vector +is mapped to a callfd associated with a virtio ring. Currently only vfio-pci +allows multiple interrupts, so the IFCVF driver is dependent on vfio-pci. + +Live Migration with VIRTIO_NET_F_GUEST_ANNOUNCE +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +IFC VF doesn't support RARP packet generation, virtio frontend supporting +VIRTIO_NET_F_GUEST_ANNOUNCE feature can help to do that. diff --git a/doc/guides/nics/ifcvf.rst b/doc/guides/nics/ifcvf.rst deleted file mode 100644 index 48f9adf1d2..0000000000 --- a/doc/guides/nics/ifcvf.rst +++ /dev/null @@ -1,96 +0,0 @@ -.. SPDX-License-Identifier: BSD-3-Clause - Copyright(c) 2018 Intel Corporation. - -IFCVF vDPA driver -================= - -The IFCVF vDPA (vhost data path acceleration) driver provides support for the -Intel FPGA 100G VF (IFCVF). IFCVF's datapath is virtio ring compatible, it -works as a HW vhost backend which can send/receive packets to/from virtio -directly by DMA. Besides, it supports dirty page logging and device state -report/restore, this driver enables its vDPA functionality. - - -Pre-Installation Configuration ------------------------------- - -Config File Options -~~~~~~~~~~~~~~~~~~~ - -The following option can be modified in the ``config`` file. - -- ``CONFIG_RTE_LIBRTE_IFCVF_VDPA_PMD`` (default ``y`` for linux) - - Toggle compilation of the ``librte_ifcvf_vdpa`` driver. - - -IFCVF vDPA Implementation -------------------------- - -IFCVF's vendor ID and device ID are same as that of virtio net pci device, -with its specific subsystem vendor ID and device ID. To let the device be -probed by IFCVF driver, adding "vdpa=1" parameter helps to specify that this -device is to be used in vDPA mode, rather than polling mode, virtio pmd will -skip when it detects this message. - -Different VF devices serve different virtio frontends which are in different -VMs, so each VF needs to have its own DMA address translation service. During -the driver probe a new container is created for this device, with this -container vDPA driver can program DMA remapping table with the VM's memory -region information. - -Key IFCVF vDPA driver ops -~~~~~~~~~~~~~~~~~~~~~~~~~ - -- ifcvf_dev_config: - Enable VF data path with virtio information provided by vhost lib, including - IOMMU programming to enable VF DMA to VM's memory, VFIO interrupt setup to - route HW interrupt to virtio driver, create notify relay thread to translate - virtio driver's kick to a MMIO write onto HW, HW queues configuration. - - This function gets called to set up HW data path backend when virtio driver - in VM gets ready. - -- ifcvf_dev_close: - Revoke all the setup in ifcvf_dev_config. - - This function gets called when virtio driver stops device in VM. - -To create a vhost port with IFC VF -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - -- Create a vhost socket and assign a VF's device ID to this socket via - vhost API. When QEMU vhost connection gets ready, the assigned VF will - get configured automatically. - - -Features --------- - -Features of the IFCVF driver are: - -- Compatibility with virtio 0.95 and 1.0. - - -Prerequisites -------------- - -- Platform with IOMMU feature. IFC VF needs address translation service to - Rx/Tx directly with virtio driver in VM. - - -Limitations ------------ - -Dependency on vfio-pci -~~~~~~~~~~~~~~~~~~~~~~ - -vDPA driver needs to setup VF MSIX interrupts, each queue's interrupt vector -is mapped to a callfd associated with a virtio ring. Currently only vfio-pci -allows multiple interrupts, so the IFCVF driver is dependent on vfio-pci. - -Live Migration with VIRTIO_NET_F_GUEST_ANNOUNCE -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - -IFC VF doesn't support RARP packet generation, virtio frontend supporting -VIRTIO_NET_F_GUEST_ANNOUNCE feature can help to do that. diff --git a/doc/guides/nics/index.rst b/doc/guides/nics/index.rst index ddb9eb7a92..d68c5ed5ea 100644 --- a/doc/guides/nics/index.rst +++ b/doc/guides/nics/index.rst @@ -24,7 +24,7 @@ Network Interface Controller Drivers enic fm10k i40e - ifcvf + ifc igb ixgbe intel_vf diff --git a/drivers/net/Makefile b/drivers/net/Makefile index 9f9da66517..1ae0eaffbd 100644 --- a/drivers/net/Makefile +++ b/drivers/net/Makefile @@ -59,7 +59,7 @@ endif # $(CONFIG_RTE_LIBRTE_SCHED) ifeq ($(CONFIG_RTE_LIBRTE_VHOST),y) DIRS-$(CONFIG_RTE_LIBRTE_PMD_VHOST) += vhost ifeq ($(CONFIG_RTE_EAL_VFIO),y) -DIRS-$(CONFIG_RTE_LIBRTE_IFCVF_VDPA_PMD) += ifc +DIRS-$(CONFIG_RTE_LIBRTE_IFC_PMD) += ifc endif endif # $(CONFIG_RTE_LIBRTE_VHOST) diff --git a/drivers/net/ifc/Makefile b/drivers/net/ifc/Makefile index 1011995bc9..39b36ae5d5 100644 --- a/drivers/net/ifc/Makefile +++ b/drivers/net/ifc/Makefile @@ -6,7 +6,7 @@ include $(RTE_SDK)/mk/rte.vars.mk # # library name # -LIB = librte_ifcvf_vdpa.a +LIB = librte_pmd_ifc.a LDLIBS += -lpthread LDLIBS += -lrte_eal -lrte_pci -lrte_vhost -lrte_bus_pci @@ -22,14 +22,14 @@ BASE_DRIVER_OBJS=$(sort $(patsubst %.c,%.o,$(notdir $(wildcard $(SRCDIR)/base/*. VPATH += $(SRCDIR)/base -EXPORT_MAP := rte_ifcvf_version.map +EXPORT_MAP := rte_pmd_ifc_version.map LIBABIVER := 1 # # all source are stored in SRCS-y # -SRCS-$(CONFIG_RTE_LIBRTE_IFCVF_VDPA_PMD) += ifcvf_vdpa.c -SRCS-$(CONFIG_RTE_LIBRTE_IFCVF_VDPA_PMD) += ifcvf.c +SRCS-$(CONFIG_RTE_LIBRTE_IFC_PMD) += ifcvf_vdpa.c +SRCS-$(CONFIG_RTE_LIBRTE_IFC_PMD) += ifcvf.c include $(RTE_SDK)/mk/rte.lib.mk diff --git a/drivers/net/ifc/rte_ifcvf_version.map b/drivers/net/ifc/rte_ifcvf_version.map deleted file mode 100644 index 9b9ab1a4cf..0000000000 --- a/drivers/net/ifc/rte_ifcvf_version.map +++ /dev/null @@ -1,4 +0,0 @@ -DPDK_18.05 { - - local: *; -}; diff --git a/drivers/net/ifc/rte_pmd_ifc_version.map b/drivers/net/ifc/rte_pmd_ifc_version.map new file mode 100644 index 0000000000..9b9ab1a4cf --- /dev/null +++ b/drivers/net/ifc/rte_pmd_ifc_version.map @@ -0,0 +1,4 @@ +DPDK_18.05 { + + local: *; +}; diff --git a/mk/rte.app.mk b/mk/rte.app.mk index 1e32c83e75..87a0c80ff2 100644 --- a/mk/rte.app.mk +++ b/mk/rte.app.mk @@ -165,7 +165,7 @@ _LDLIBS-$(CONFIG_RTE_LIBRTE_VIRTIO_PMD) += -lrte_pmd_virtio ifeq ($(CONFIG_RTE_LIBRTE_VHOST),y) _LDLIBS-$(CONFIG_RTE_LIBRTE_PMD_VHOST) += -lrte_pmd_vhost ifeq ($(CONFIG_RTE_EAL_VFIO),y) -_LDLIBS-$(CONFIG_RTE_LIBRTE_IFCVF_VDPA_PMD) += -lrte_ifcvf_vdpa +_LDLIBS-$(CONFIG_RTE_LIBRTE_IFC_PMD) += -lrte_pmd_ifc endif # $(CONFIG_RTE_EAL_VFIO) endif # $(CONFIG_RTE_LIBRTE_VHOST) _LDLIBS-$(CONFIG_RTE_LIBRTE_VMXNET3_PMD) += -lrte_pmd_vmxnet3_uio