summaryrefslogtreecommitdiff
path: root/lib/librte_eal
diff options
context:
space:
mode:
authorIntel <intel.com>2013-09-18 12:00:00 +0200
committerThomas Monjalon <thomas.monjalon@6wind.com>2013-10-09 16:16:14 +0200
commite1e4017751f1a7ed4807269559b8a9bedb9cd73a (patch)
treed00ff205ba130fe8f48b790018b49c6e0a7dad05 /lib/librte_eal
parentdc5026b485b0f13d4d3c1406368719e3478f36b6 (diff)
downloaddpdk-e1e4017751f1a7ed4807269559b8a9bedb9cd73a.zip
dpdk-e1e4017751f1a7ed4807269559b8a9bedb9cd73a.tar.gz
dpdk-e1e4017751f1a7ed4807269559b8a9bedb9cd73a.tar.xz
ring: add new driver
This PMD is a set of FIFOs using rte_ring without any NIC. It can be used as a loopback. Signed-off-by: Intel
Diffstat (limited to 'lib/librte_eal')
-rw-r--r--lib/librte_eal/common/eal_common_nonpci_devs.c9
-rw-r--r--lib/librte_eal/common/eal_common_whitelist.c6
-rw-r--r--lib/librte_eal/linuxapp/eal/Makefile1
-rw-r--r--lib/librte_eal/linuxapp/eal/eal.c1
4 files changed, 17 insertions, 0 deletions
diff --git a/lib/librte_eal/common/eal_common_nonpci_devs.c b/lib/librte_eal/common/eal_common_nonpci_devs.c
index ecce5b9..e4ef25b 100644
--- a/lib/librte_eal/common/eal_common_nonpci_devs.c
+++ b/lib/librte_eal/common/eal_common_nonpci_devs.c
@@ -33,6 +33,9 @@
#include <inttypes.h>
#include <rte_string_fns.h>
+#ifdef RTE_LIBRTE_PMD_RING
+#include <rte_eth_ring.h>
+#endif
#include "eal_private.h"
struct device_init {
@@ -42,6 +45,12 @@ struct device_init {
#define NUM_DEV_TYPES (sizeof(dev_types)/sizeof(dev_types[0]))
struct device_init dev_types[] = {
+#ifdef RTE_LIBRTE_PMD_RING
+ {
+ .dev_prefix = RTE_ETH_RING_PARAM_NAME,
+ .init_fn = rte_pmd_ring_init
+ },
+#endif
{
.dev_prefix = "-nodev-",
.init_fn = NULL
diff --git a/lib/librte_eal/common/eal_common_whitelist.c b/lib/librte_eal/common/eal_common_whitelist.c
index ddd4a6f..d5fdd3e 100644
--- a/lib/librte_eal/common/eal_common_whitelist.c
+++ b/lib/librte_eal/common/eal_common_whitelist.c
@@ -45,6 +45,9 @@
#include <rte_debug.h>
#include <rte_pci.h>
#include <ctype.h>
+#ifdef RTE_LIBRTE_PMD_RING
+#include <rte_eth_ring.h>
+#endif
#include "eal_private.h"
static char dev_list_str[4096];
@@ -91,6 +94,9 @@ is_valid_wl_entry(const char *device_str, size_t dev_buf_len)
{
#define NUM_PREFIXES (sizeof(non_pci_prefixes)/sizeof(non_pci_prefixes[0]))
static const char *non_pci_prefixes[] = {
+#ifdef RTE_LIBRTE_PMD_RING
+ RTE_ETH_RING_PARAM_NAME,
+#endif
"-nodev-" /* dummy value to prevent compiler warnings */
};
static uint8_t prefix_counts[NUM_PREFIXES] = {0};
diff --git a/lib/librte_eal/linuxapp/eal/Makefile b/lib/librte_eal/linuxapp/eal/Makefile
index 306b6ad..b1f6e03 100644
--- a/lib/librte_eal/linuxapp/eal/Makefile
+++ b/lib/librte_eal/linuxapp/eal/Makefile
@@ -41,6 +41,7 @@ CFLAGS += -I$(RTE_SDK)/lib/librte_ring
CFLAGS += -I$(RTE_SDK)/lib/librte_mempool
CFLAGS += -I$(RTE_SDK)/lib/librte_malloc
CFLAGS += -I$(RTE_SDK)/lib/librte_ether
+CFLAGS += -I$(RTE_SDK)/lib/librte_pmd_ring
CFLAGS += $(WERROR_FLAGS) -O3
# specific to linuxapp exec-env
diff --git a/lib/librte_eal/linuxapp/eal/eal.c b/lib/librte_eal/linuxapp/eal/eal.c
index 46a0139..f1d3a55 100644
--- a/lib/librte_eal/linuxapp/eal/eal.c
+++ b/lib/librte_eal/linuxapp/eal/eal.c
@@ -71,6 +71,7 @@
#include <rte_version.h>
#include <rte_atomic.h>
#include <malloc_heap.h>
+#include <rte_eth_ring.h>
#include "eal_private.h"
#include "eal_thread.h"