bus/vdev: move code from EAL into a new driver

Move the vdev bus from lib/librte_eal to drivers/bus.

As the crypto vdev helper function refers to data structure
in rte_vdev.h, so we move those helper function into drivers/bus
too.

Signed-off-by: Jianfeng Tan <jianfeng.tan@intel.com>
This commit is contained in:
Jianfeng Tan 2017-11-07 06:54:21 +00:00 committed by Thomas Monjalon
parent 394d5b4c0a
commit d4a586d29e
77 changed files with 178 additions and 61 deletions

View File

@ -293,6 +293,9 @@ Bus Drivers
PCI bus driver
F: drivers/bus/pci/
VDEV bus driver
F: drivers/bus/vdev/
Networking Drivers
------------------

View File

@ -157,6 +157,11 @@ CONFIG_RTE_ETHDEV_TX_PREPARE_NOOP=n
#
CONFIG_RTE_LIBRTE_PCI_BUS=y
#
# Compile the vdev bus
#
CONFIG_RTE_LIBRTE_VDEV_BUS=y
#
# Compile burst-oriented Amazon ENA PMD driver
#

View File

@ -379,6 +379,14 @@ API Changes
These functions are made available either as part of ``librte_pci`` or
``librte_bus_pci``.
* **Moved vdev bus APIs outside of the EAL**
Moved the following APIs from ``librte_eal`` to ``librte_bus_vdev``:
* ``rte_vdev_init``
* ``rte_vdev_register``
* ``rte_vdev_uninit``
* ``rte_vdev_unregister``
* **Add return value to stats_get dev op API**
The ``stats_get`` dev op API return value has been changed to be int.
@ -491,6 +499,7 @@ The libraries prepended with a plus sign were incremented in this version.
librte_acl.so.2
+ librte_bitratestats.so.2
+ librte_bus_vdev.so.1
librte_cfgfile.so.2
librte_cmdline.so.2
+ librte_cryptodev.so.4

View File

@ -33,5 +33,6 @@ include $(RTE_SDK)/mk/rte.vars.mk
DIRS-$(CONFIG_RTE_LIBRTE_DPAA_BUS) += dpaa
DIRS-$(CONFIG_RTE_LIBRTE_FSLMC_BUS) += fslmc
DIRS-$(CONFIG_RTE_LIBRTE_PCI_BUS) += pci
DIRS-$(CONFIG_RTE_LIBRTE_VDEV_BUS) += vdev
include $(RTE_SDK)/mk/rte.subdir.mk

57
drivers/bus/vdev/Makefile Normal file
View File

@ -0,0 +1,57 @@
# BSD LICENSE
#
# Copyright(c) 2017 Intel Corporation. All rights reserved.
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions
# are met:
#
# * Redistributions of source code must retain the above copyright
# notice, this list of conditions and the following disclaimer.
# * Redistributions in binary form must reproduce the above copyright
# notice, this list of conditions and the following disclaimer in
# the documentation and/or other materials provided with the
# distribution.
# * Neither the name of Intel Corporation nor the names of its
# contributors may be used to endorse or promote products derived
# from this software without specific prior written permission.
#
# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
include $(RTE_SDK)/mk/rte.vars.mk
#
# library name
#
LIB = librte_bus_vdev.a
CFLAGS += -O3
CFLAGS += $(WERROR_FLAGS)
# versioning export map
EXPORT_MAP := rte_bus_vdev_version.map
# library version
LIBABIVER := 1
SRCS-y += vdev.c
LDLIBS += -lrte_eal
#
# Export include files
#
SYMLINK-y-include += rte_bus_vdev.h
include $(RTE_SDK)/mk/rte.lib.mk

View File

@ -124,6 +124,28 @@ RTE_PMD_EXPORT_NAME(nm, __COUNTER__)
#define RTE_PMD_REGISTER_ALIAS(nm, alias)\
static const char *vdrvinit_ ## nm ## _alias = RTE_STR(alias)
/**
* Initialize a driver specified by name.
*
* @param name
* The pointer to a driver name to be initialized.
* @param args
* The pointer to arguments used by driver initialization.
* @return
* 0 on success, negative on error
*/
int rte_vdev_init(const char *name, const char *args);
/**
* Uninitalize a driver specified by name.
*
* @param name
* The pointer to a driver name to be initialized.
* @return
* 0 on success, negative on error
*/
int rte_vdev_uninit(const char *name);
#ifdef __cplusplus
}
#endif

View File

@ -0,0 +1,10 @@
DPDK_17.11 {
global:
rte_vdev_init;
rte_vdev_register;
rte_vdev_uninit;
rte_vdev_unregister;
local: *;
};

View File

@ -41,12 +41,13 @@
#include <rte_eal.h>
#include <rte_dev.h>
#include <rte_bus.h>
#include <rte_vdev.h>
#include <rte_common.h>
#include <rte_devargs.h>
#include <rte_memory.h>
#include <rte_errno.h>
#include "rte_bus_vdev.h"
/* Forward declare to access virtual bus name */
static struct rte_bus rte_vdev_bus;
@ -124,6 +125,7 @@ find_vdev(const char *name)
TAILQ_FOREACH(dev, &vdev_device_list, next) {
const char *devname = rte_vdev_device_name(dev);
if (!strncmp(devname, name, strlen(name)))
return dev;
}

View File

@ -55,6 +55,7 @@ CFLAGS += -I$(AESNI_MULTI_BUFFER_LIB_PATH)/include
LDLIBS += -L$(AESNI_MULTI_BUFFER_LIB_PATH) -lIPSec_MB
LDLIBS += -lrte_eal -lrte_mbuf -lrte_mempool -lrte_ring
LDLIBS += -lrte_cryptodev
LDLIBS += -lrte_bus_vdev
# library source files
SRCS-$(CONFIG_RTE_LIBRTE_PMD_AESNI_GCM) += aesni_gcm_pmd.c

View File

@ -34,7 +34,7 @@
#include <rte_hexdump.h>
#include <rte_cryptodev.h>
#include <rte_cryptodev_pmd.h>
#include <rte_vdev.h>
#include <rte_bus_vdev.h>
#include <rte_malloc.h>
#include <rte_cpuflags.h>
#include <rte_byteorder.h>

View File

@ -55,6 +55,7 @@ CFLAGS += -I$(AESNI_MULTI_BUFFER_LIB_PATH)/include
LDLIBS += -L$(AESNI_MULTI_BUFFER_LIB_PATH) -lIPSec_MB
LDLIBS += -lrte_eal -lrte_mbuf -lrte_mempool -lrte_ring
LDLIBS += -lrte_cryptodev
LDLIBS += -lrte_bus_vdev
# library source files
SRCS-$(CONFIG_RTE_LIBRTE_PMD_AESNI_MB) += rte_aesni_mb_pmd.c

View File

@ -36,7 +36,7 @@
#include <rte_hexdump.h>
#include <rte_cryptodev.h>
#include <rte_cryptodev_pmd.h>
#include <rte_vdev.h>
#include <rte_bus_vdev.h>
#include <rte_malloc.h>
#include <rte_cpuflags.h>

View File

@ -59,6 +59,7 @@ CFLAGS += -I$(ARMV8_CRYPTO_LIB_PATH)/asm/include
LDLIBS += -L$(ARMV8_CRYPTO_LIB_PATH) -larmv8_crypto
LDLIBS += -lrte_eal -lrte_mbuf -lrte_mempool -lrte_ring
LDLIBS += -lrte_cryptodev
LDLIBS += -lrte_bus_vdev
# library source files
SRCS-$(CONFIG_RTE_LIBRTE_PMD_ARMV8_CRYPTO) += rte_armv8_pmd.c

View File

@ -36,7 +36,7 @@
#include <rte_hexdump.h>
#include <rte_cryptodev.h>
#include <rte_cryptodev_pmd.h>
#include <rte_vdev.h>
#include <rte_bus_vdev.h>
#include <rte_malloc.h>
#include <rte_cpuflags.h>

View File

@ -56,6 +56,7 @@ CFLAGS += -I$(LIBSSO_KASUMI_PATH)/build
LDLIBS += -L$(LIBSSO_KASUMI_PATH)/build -lsso_kasumi
LDLIBS += -lrte_eal -lrte_mbuf -lrte_mempool -lrte_ring
LDLIBS += -lrte_cryptodev
LDLIBS += -lrte_bus_vdev
# library source files
SRCS-$(CONFIG_RTE_LIBRTE_PMD_KASUMI) += rte_kasumi_pmd.c

View File

@ -34,7 +34,7 @@
#include <rte_hexdump.h>
#include <rte_cryptodev.h>
#include <rte_cryptodev_pmd.h>
#include <rte_vdev.h>
#include <rte_bus_vdev.h>
#include <rte_malloc.h>
#include <rte_cpuflags.h>

View File

@ -57,6 +57,7 @@ EXPORT_MAP := rte_mrvl_pmd_version.map
# external library dependencies
LDLIBS += -L$(LIBMUSDK_PATH)/lib -lmusdk
LDLIBS += -lrte_bus_vdev
# library source files
SRCS-$(CONFIG_RTE_LIBRTE_PMD_MRVL_CRYPTO) += rte_mrvl_pmd.c

View File

@ -36,7 +36,7 @@
#include <rte_hexdump.h>
#include <rte_cryptodev.h>
#include <rte_cryptodev_pmd.h>
#include <rte_vdev.h>
#include <rte_bus_vdev.h>
#include <rte_malloc.h>
#include <rte_cpuflags.h>

View File

@ -39,6 +39,7 @@ CFLAGS += -O3
CFLAGS += $(WERROR_FLAGS)
LDLIBS += -lrte_eal -lrte_mbuf -lrte_mempool -lrte_ring
LDLIBS += -lrte_cryptodev
LDLIBS += -lrte_bus_vdev
# library version
LIBABIVER := 1

View File

@ -32,7 +32,7 @@
#include <rte_common.h>
#include <rte_cryptodev_pmd.h>
#include <rte_vdev.h>
#include <rte_bus_vdev.h>
#include <rte_malloc.h>
#include "null_crypto_pmd_private.h"

View File

@ -47,6 +47,7 @@ EXPORT_MAP := rte_pmd_openssl_version.map
LDLIBS += -lcrypto
LDLIBS += -lrte_eal -lrte_mbuf -lrte_mempool -lrte_ring
LDLIBS += -lrte_cryptodev
LDLIBS += -lrte_bus_vdev
# library source files
SRCS-$(CONFIG_RTE_LIBRTE_PMD_OPENSSL) += rte_openssl_pmd.c

View File

@ -34,7 +34,7 @@
#include <rte_hexdump.h>
#include <rte_cryptodev.h>
#include <rte_cryptodev_pmd.h>
#include <rte_vdev.h>
#include <rte_bus_vdev.h>
#include <rte_malloc.h>
#include <rte_cpuflags.h>

View File

@ -38,6 +38,7 @@ CFLAGS += -O3
CFLAGS += $(WERROR_FLAGS)
LDLIBS += -lrte_eal -lrte_mbuf -lrte_mempool -lrte_ring
LDLIBS += -lrte_cryptodev -lrte_kvargs -lrte_reorder
LDLIBS += -lrte_bus_vdev
# library version
LIBABIVER := 1

View File

@ -33,7 +33,7 @@
#include <rte_hexdump.h>
#include <rte_cryptodev.h>
#include <rte_cryptodev_pmd.h>
#include <rte_vdev.h>
#include <rte_bus_vdev.h>
#include <rte_malloc.h>
#include <rte_cpuflags.h>
#include <rte_reorder.h>

View File

@ -56,6 +56,7 @@ CFLAGS += -I$(LIBSSO_SNOW3G_PATH)/build
LDLIBS += -L$(LIBSSO_SNOW3G_PATH)/build -lsso_snow3g
LDLIBS += -lrte_eal -lrte_mbuf -lrte_mempool -lrte_ring
LDLIBS += -lrte_cryptodev
LDLIBS += -lrte_bus_vdev
# library source files
SRCS-$(CONFIG_RTE_LIBRTE_PMD_SNOW3G) += rte_snow3g_pmd.c

View File

@ -34,7 +34,7 @@
#include <rte_hexdump.h>
#include <rte_cryptodev.h>
#include <rte_cryptodev_pmd.h>
#include <rte_vdev.h>
#include <rte_bus_vdev.h>
#include <rte_malloc.h>
#include <rte_cpuflags.h>

View File

@ -56,6 +56,7 @@ CFLAGS += -I$(LIBSSO_ZUC_PATH)/build
LDLIBS += -L$(LIBSSO_ZUC_PATH)/build -lsso_zuc
LDLIBS += -lrte_eal -lrte_mbuf -lrte_mempool -lrte_ring
LDLIBS += -lrte_cryptodev
LDLIBS += -lrte_bus_vdev
# library source files
SRCS-$(CONFIG_RTE_LIBRTE_PMD_ZUC) += rte_zuc_pmd.c

View File

@ -34,7 +34,7 @@
#include <rte_hexdump.h>
#include <rte_cryptodev.h>
#include <rte_cryptodev_pmd.h>
#include <rte_vdev.h>
#include <rte_bus_vdev.h>
#include <rte_malloc.h>
#include <rte_cpuflags.h>

View File

@ -46,6 +46,7 @@ CFLAGS += -I$(RTE_SDK)/drivers/mempool/dpaa2
CFLAGS += -I$(RTE_SDK)/drivers/event/dpaa2
CFLAGS += -I$(RTE_SDK)/lib/librte_eal/linuxapp/eal
LDLIBS += -lrte_eal -lrte_eventdev -lrte_bus_fslmc -lrte_pmd_dpaa2
LDLIBS += -lrte_bus_vdev
CFLAGS += -I$(RTE_SDK)/drivers/net/dpaa2
CFLAGS += -I$(RTE_SDK)/drivers/net/dpaa2/mc

View File

@ -51,7 +51,7 @@
#include <rte_memcpy.h>
#include <rte_memory.h>
#include <rte_pci.h>
#include <rte_vdev.h>
#include <rte_bus_vdev.h>
#include <rte_ethdev.h>
#include <rte_event_eth_rx_adapter.h>

View File

@ -43,6 +43,7 @@ CFLAGS += -I$(RTE_SDK)/drivers/net/octeontx/
LDLIBS += -lrte_eal -lrte_eventdev -lrte_mempool_octeontx
LDLIBS += -lrte_bus_pci
LDLIBS += -lrte_bus_vdev
EXPORT_MAP := rte_pmd_octeontx_ssovf_version.map

View File

@ -42,7 +42,7 @@
#include <rte_log.h>
#include <rte_malloc.h>
#include <rte_memory.h>
#include <rte_vdev.h>
#include <rte_bus_vdev.h>
#include "ssovf_evdev.h"

View File

@ -40,6 +40,7 @@ LIB = librte_pmd_skeleton_event.a
CFLAGS += $(WERROR_FLAGS)
LDLIBS += -lrte_eal -lrte_eventdev
LDLIBS += -lrte_pci -lrte_bus_pci
LDLIBS += -lrte_bus_vdev
EXPORT_MAP := rte_pmd_skeleton_event_version.map

View File

@ -46,7 +46,7 @@
#include <rte_malloc.h>
#include <rte_memory.h>
#include <rte_lcore.h>
#include <rte_vdev.h>
#include <rte_bus_vdev.h>
#include "skeleton_eventdev.h"

View File

@ -44,6 +44,7 @@ CFLAGS += -Wno-missing-field-initializers
endif
endif
LDLIBS += -lrte_eal -lrte_eventdev -lrte_kvargs -lrte_ring
LDLIBS += -lrte_bus_vdev
# library version
LIBABIVER := 1

View File

@ -33,7 +33,7 @@
#include <inttypes.h>
#include <string.h>
#include <rte_vdev.h>
#include <rte_bus_vdev.h>
#include <rte_kvargs.h>
#include <rte_ring.h>
#include <rte_errno.h>

View File

@ -46,6 +46,7 @@ CFLAGS += -O3
CFLAGS += $(WERROR_FLAGS)
LDLIBS += -lrte_eal -lrte_mbuf -lrte_mempool -lrte_ring
LDLIBS += -lrte_ethdev -lrte_net -lrte_kvargs
LDLIBS += -lrte_bus_vdev
#
# all source are stored in SRCS-y

View File

@ -41,7 +41,7 @@
#include <rte_ethdev_vdev.h>
#include <rte_malloc.h>
#include <rte_kvargs.h>
#include <rte_vdev.h>
#include <rte_bus_vdev.h>
#include <linux/if_ether.h>
#include <linux/if_packet.h>

View File

@ -41,6 +41,7 @@ CFLAGS += $(WERROR_FLAGS)
LDLIBS += -lrte_eal -lrte_mbuf -lrte_mempool -lrte_ring
LDLIBS += -lrte_ethdev -lrte_net -lrte_kvargs -lrte_cmdline
LDLIBS += -lrte_pci -lrte_bus_pci
LDLIBS += -lrte_bus_vdev
EXPORT_MAP := rte_pmd_bond_version.map

View File

@ -37,7 +37,7 @@
#include <rte_malloc.h>
#include <rte_ethdev.h>
#include <rte_tcp.h>
#include <rte_vdev.h>
#include <rte_bus_vdev.h>
#include <rte_kvargs.h>
#include "rte_eth_bond.h"

View File

@ -43,7 +43,7 @@
#include <rte_ip_frag.h>
#include <rte_devargs.h>
#include <rte_kvargs.h>
#include <rte_vdev.h>
#include <rte_bus_vdev.h>
#include <rte_alarm.h>
#include <rte_cycles.h>

View File

@ -60,5 +60,6 @@ CFLAGS += -Wno-strict-prototypes
CFLAGS += -pedantic
LDLIBS += -lrte_eal -lrte_mbuf -lrte_mempool -lrte_ring
LDLIBS += -lrte_ethdev -lrte_net -lrte_kvargs
LDLIBS += -lrte_bus_vdev
include $(RTE_SDK)/mk/rte.lib.mk

View File

@ -37,7 +37,7 @@
#include <rte_ethdev_vdev.h>
#include <rte_devargs.h>
#include <rte_kvargs.h>
#include <rte_vdev.h>
#include <rte_bus_vdev.h>
#include "failsafe_private.h"

View File

@ -40,6 +40,7 @@ CFLAGS += $(WERROR_FLAGS)
LDLIBS += -lpthread
LDLIBS += -lrte_eal -lrte_mbuf -lrte_mempool -lrte_ring
LDLIBS += -lrte_ethdev -lrte_net -lrte_kvargs -lrte_kni
LDLIBS += -lrte_bus_vdev
EXPORT_MAP := rte_pmd_kni_version.map

View File

@ -40,7 +40,7 @@
#include <rte_kni.h>
#include <rte_kvargs.h>
#include <rte_malloc.h>
#include <rte_vdev.h>
#include <rte_bus_vdev.h>
/* Only single queue supported */
#define KNI_MAX_QUEUE_PER_PORT 1

View File

@ -59,6 +59,7 @@ LDLIBS += -L$(LIBMUSDK_PATH)/lib
LDLIBS += -lmusdk
LDLIBS += -lrte_eal -lrte_mbuf -lrte_mempool -lrte_ring
LDLIBS += -lrte_ethdev -lrte_net -lrte_kvargs -lrte_cfgfile
LDLIBS += -lrte_bus_vdev
# library source files
SRCS-$(CONFIG_RTE_LIBRTE_MRVL_PMD) += mrvl_ethdev.c

View File

@ -36,7 +36,7 @@
#include <rte_kvargs.h>
#include <rte_log.h>
#include <rte_malloc.h>
#include <rte_vdev.h>
#include <rte_bus_vdev.h>
/* Unluckily, container_of is defined by both DPDK and MUSDK,
* we'll declare only one version.

View File

@ -40,6 +40,7 @@ CFLAGS += -O3
CFLAGS += $(WERROR_FLAGS)
LDLIBS += -lrte_eal -lrte_mbuf -lrte_mempool -lrte_ring
LDLIBS += -lrte_ethdev -lrte_net -lrte_kvargs
LDLIBS += -lrte_bus_vdev
EXPORT_MAP := rte_pmd_null_version.map

View File

@ -36,7 +36,7 @@
#include <rte_ethdev_vdev.h>
#include <rte_malloc.h>
#include <rte_memcpy.h>
#include <rte_vdev.h>
#include <rte_bus_vdev.h>
#include <rte_kvargs.h>
#include <rte_spinlock.h>

View File

@ -74,5 +74,6 @@ LDLIBS += -lrte_ethdev -lrte_net -lrte_kvargs
LDLIBS += -lrte_mempool_octeontx
LDLIBS += -lrte_eventdev
LDLIBS += -lrte_bus_pci
LDLIBS += -lrte_bus_vdev
include $(RTE_SDK)/mk/rte.lib.mk

View File

@ -44,7 +44,7 @@
#include <rte_kvargs.h>
#include <rte_malloc.h>
#include <rte_prefetch.h>
#include <rte_vdev.h>
#include <rte_bus_vdev.h>
#include "octeontx_ethdev.h"
#include "octeontx_rxtx.h"

View File

@ -42,6 +42,7 @@ CFLAGS += $(WERROR_FLAGS)
LDLIBS += -lpcap
LDLIBS += -lrte_eal -lrte_mbuf -lrte_mempool -lrte_ring
LDLIBS += -lrte_ethdev -lrte_net -lrte_kvargs
LDLIBS += -lrte_bus_vdev
EXPORT_MAP := rte_pmd_pcap_version.map

View File

@ -44,7 +44,7 @@
#include <rte_kvargs.h>
#include <rte_malloc.h>
#include <rte_mbuf.h>
#include <rte_vdev.h>
#include <rte_bus_vdev.h>
#define RTE_ETH_PCAP_SNAPSHOT_LEN 65535
#define RTE_ETH_PCAP_SNAPLEN ETHER_MAX_JUMBO_FRAME_LEN

View File

@ -40,6 +40,7 @@ CFLAGS += -O3
CFLAGS += $(WERROR_FLAGS)
LDLIBS += -lrte_eal -lrte_mbuf -lrte_mempool -lrte_ring
LDLIBS += -lrte_ethdev -lrte_net -lrte_kvargs
LDLIBS += -lrte_bus_vdev
EXPORT_MAP := rte_pmd_ring_version.map

View File

@ -37,7 +37,7 @@
#include <rte_malloc.h>
#include <rte_memcpy.h>
#include <rte_string_fns.h>
#include <rte_vdev.h>
#include <rte_bus_vdev.h>
#include <rte_kvargs.h>
#include <rte_errno.h>

View File

@ -40,6 +40,7 @@ CFLAGS += -O3
CFLAGS += $(WERROR_FLAGS)
LDLIBS += -lrte_eal -lrte_mbuf -lrte_mempool -lrte_ring
LDLIBS += -lrte_ethdev -lrte_net -lrte_kvargs -lrte_sched
LDLIBS += -lrte_bus_vdev
EXPORT_MAP := rte_pmd_eth_softnic_version.map

View File

@ -38,7 +38,7 @@
#include <rte_ethdev.h>
#include <rte_ethdev_vdev.h>
#include <rte_malloc.h>
#include <rte_vdev.h>
#include <rte_bus_vdev.h>
#include <rte_kvargs.h>
#include <rte_errno.h>
#include <rte_ring.h>

View File

@ -45,6 +45,7 @@ CFLAGS += -I.
CFLAGS += $(WERROR_FLAGS)
LDLIBS += -lrte_eal -lrte_mbuf -lrte_mempool -lrte_ring
LDLIBS += -lrte_ethdev -lrte_net -lrte_kvargs -lrte_hash
LDLIBS += -lrte_bus_vdev
#
# all source are stored in SRCS-y

View File

@ -39,7 +39,7 @@
#include <rte_ethdev.h>
#include <rte_ethdev_vdev.h>
#include <rte_malloc.h>
#include <rte_vdev.h>
#include <rte_bus_vdev.h>
#include <rte_kvargs.h>
#include <rte_net.h>
#include <rte_debug.h>

View File

@ -39,6 +39,7 @@ LIB = librte_pmd_vhost.a
LDLIBS += -lpthread
LDLIBS += -lrte_eal -lrte_mbuf -lrte_mempool -lrte_ring
LDLIBS += -lrte_ethdev -lrte_net -lrte_kvargs -lrte_vhost
LDLIBS += -lrte_bus_vdev
CFLAGS += -O3
CFLAGS += $(WERROR_FLAGS)

View File

@ -39,7 +39,7 @@
#include <rte_ethdev_vdev.h>
#include <rte_malloc.h>
#include <rte_memcpy.h>
#include <rte_vdev.h>
#include <rte_bus_vdev.h>
#include <rte_kvargs.h>
#include <rte_vhost.h>
#include <rte_spinlock.h>

View File

@ -41,6 +41,9 @@ CFLAGS += $(WERROR_FLAGS)
LDLIBS += -lrte_eal -lrte_mbuf -lrte_mempool -lrte_ring
LDLIBS += -lrte_ethdev -lrte_net -lrte_kvargs
LDLIBS += -lrte_bus_pci
ifeq ($(CONFIG_RTE_VIRTIO_USER),y)
LDLIBS += -lrte_bus_vdev
endif
EXPORT_MAP := rte_pmd_virtio_version.map

View File

@ -40,7 +40,7 @@
#include <rte_malloc.h>
#include <rte_kvargs.h>
#include <rte_ethdev_vdev.h>
#include <rte_vdev.h>
#include <rte_bus_vdev.h>
#include <rte_alarm.h>
#include "virtio_ethdev.h"

View File

@ -67,7 +67,6 @@ SRCS-$(CONFIG_RTE_EXEC_ENV_BSDAPP) += eal_common_timer.c
SRCS-$(CONFIG_RTE_EXEC_ENV_BSDAPP) += eal_common_memzone.c
SRCS-$(CONFIG_RTE_EXEC_ENV_BSDAPP) += eal_common_log.c
SRCS-$(CONFIG_RTE_EXEC_ENV_BSDAPP) += eal_common_launch.c
SRCS-$(CONFIG_RTE_EXEC_ENV_BSDAPP) += eal_common_vdev.c
SRCS-$(CONFIG_RTE_EXEC_ENV_BSDAPP) += eal_common_memory.c
SRCS-$(CONFIG_RTE_EXEC_ENV_BSDAPP) += eal_common_tailqs.c
SRCS-$(CONFIG_RTE_EXEC_ENV_BSDAPP) += eal_common_errno.c

View File

@ -39,7 +39,7 @@ INC += rte_per_lcore.h rte_random.h
INC += rte_tailq.h rte_interrupts.h rte_alarm.h
INC += rte_string_fns.h rte_version.h
INC += rte_eal_memconfig.h rte_malloc_heap.h
INC += rte_hexdump.h rte_devargs.h rte_bus.h rte_dev.h rte_vdev.h
INC += rte_hexdump.h rte_devargs.h rte_bus.h rte_dev.h
INC += rte_pci_dev_feature_defs.h rte_pci_dev_features.h
INC += rte_malloc.h rte_keepalive.h rte_time.h
INC += rte_service.h rte_service_component.h

View File

@ -168,28 +168,6 @@ struct rte_device {
struct rte_devargs *devargs; /**< Device user arguments */
};
/**
* Initialize a driver specified by name.
*
* @param name
* The pointer to a driver name to be initialized.
* @param args
* The pointer to arguments used by driver initialization.
* @return
* 0 on success, negative on error
*/
int rte_vdev_init(const char *name, const char *args);
/**
* Uninitalize a driver specified by name.
*
* @param name
* The pointer to a driver name to be initialized.
* @return
* 0 on success, negative on error
*/
int rte_vdev_uninit(const char *name);
/**
* Attach a device to a registered driver.
*
@ -315,4 +293,4 @@ __attribute__((used)) = str
}
#endif
#endif /* _RTE_VDEV_H_ */
#endif /* _RTE_DEV_H_ */

View File

@ -74,7 +74,6 @@ SRCS-$(CONFIG_RTE_EXEC_ENV_LINUXAPP) += eal_common_timer.c
SRCS-$(CONFIG_RTE_EXEC_ENV_LINUXAPP) += eal_common_memzone.c
SRCS-$(CONFIG_RTE_EXEC_ENV_LINUXAPP) += eal_common_log.c
SRCS-$(CONFIG_RTE_EXEC_ENV_LINUXAPP) += eal_common_launch.c
SRCS-$(CONFIG_RTE_EXEC_ENV_LINUXAPP) += eal_common_vdev.c
SRCS-$(CONFIG_RTE_EXEC_ENV_LINUXAPP) += eal_common_memory.c
SRCS-$(CONFIG_RTE_EXEC_ENV_LINUXAPP) += eal_common_tailqs.c
SRCS-$(CONFIG_RTE_EXEC_ENV_LINUXAPP) += eal_common_errno.c

View File

@ -163,10 +163,6 @@ DPDK_17.05 {
rte_log_set_global_level;
rte_log_set_level;
rte_log_set_level_regexp;
rte_vdev_init;
rte_vdev_register;
rte_vdev_uninit;
rte_vdev_unregister;
vfio_get_container_fd;
vfio_get_group_fd;
vfio_get_group_no;

View File

@ -35,7 +35,7 @@
#define _RTE_ETHDEV_VDEV_H_
#include <rte_malloc.h>
#include <rte_vdev.h>
#include <rte_bus_vdev.h>
#include <rte_ethdev.h>
/**

View File

@ -48,7 +48,7 @@ extern "C" {
#include <rte_debug.h>
#include <rte_eal.h>
#include <rte_vdev.h>
#include <rte_bus_vdev.h>
#include "rte_eventdev_pmd.h"

View File

@ -110,6 +110,7 @@ _LDLIBS-$(CONFIG_RTE_LIBRTE_KNI) += -lrte_kni
endif
_LDLIBS-$(CONFIG_RTE_LIBRTE_PCI_BUS) += -lrte_bus_pci
_LDLIBS-$(CONFIG_RTE_LIBRTE_VDEV_BUS) += -lrte_bus_vdev
ifeq ($(CONFIG_RTE_BUILD_SHARED_LIB),n)
# plugins (link only if static libraries)

View File

@ -36,6 +36,7 @@
#include <rte_malloc.h>
#include <rte_memcpy.h>
#include <rte_pause.h>
#include <rte_bus_vdev.h>
#include <rte_crypto.h>
#include <rte_cryptodev.h>

View File

@ -35,6 +35,7 @@
#include <rte_mbuf.h>
#include <rte_ethdev.h>
#include <rte_eventdev.h>
#include <rte_bus_vdev.h>
#include <rte_event_eth_rx_adapter.h>

View File

@ -37,6 +37,7 @@
#include <rte_memcpy.h>
#include <rte_eventdev.h>
#include <rte_dev.h>
#include <rte_bus_vdev.h>
#include "test.h"

View File

@ -45,6 +45,7 @@
#include <rte_lcore.h>
#include <rte_per_lcore.h>
#include <rte_random.h>
#include <rte_bus_vdev.h>
#include "test.h"

View File

@ -50,6 +50,7 @@
#include <rte_pause.h>
#include <rte_service.h>
#include <rte_service_component.h>
#include <rte_bus_vdev.h>
#include "test.h"

View File

@ -48,6 +48,7 @@
#include <rte_log.h>
#include <rte_lcore.h>
#include <rte_memory.h>
#include <rte_bus_vdev.h>
#include <rte_string_fns.h>
#include <rte_errno.h>