[dpdk-dev] [PATCH 4/4] virtio/vdev: add a new vdev named eth_cvio

2016-01-10 Thread Jianfeng Tan
Add a new virtual device named eth_cvio, it can be used just like
eth_ring, eth_null, etc.

Configured parameters include:
- rx (optional, 1 by default): number of rx, only allowed to be
   1 for now.
- tx (optional, 1 by default): number of tx, only allowed to be
   1 for now.
- cq (optional, 0 by default): if ctrl queue is enabled, not
   supported for now.
- mac (optional): mac address, random value will be given if not
  specified.
- queue_num (optional, 256 by default): size of virtqueue.
- path (madatory): path of vhost, depends on the file type:
   vhost-user is used if the given path points to
   a unix socket; vhost-net is used if the given
   path points to a char device.

The major difference with original virtio for vm is that, here we
use virtual address instead of physical address for vhost to
calculate relative address.

When enable CONFIG_RTE_VIRTIO_VDEV (enabled by default), the compiled
library can be used in both VM and container environment.

Examples:
a. Use vhost-net as a backend
sudo numactl -N 1 -m 1 ./examples/l2fwd/build/l2fwd -c 0x10 -n 4 \
-m 1024 --no-pci --single-file --file-prefix=l2fwd \
--vdev=eth_cvio0,mac=00:01:02:03:04:05,path=/dev/vhost-net \
-- -p 0x1

b. Use vhost-user as a backend
numactl -N 1 -m 1 ./examples/l2fwd/build/l2fwd -c 0x10 -n 4 -m 1024 \
--no-pci --single-file --file-prefix=l2fwd \
--vdev=eth_cvio0,mac=00:01:02:03:04:05,path= \
-- -p 0x1

Signed-off-by: Huawei Xie 
Signed-off-by: Jianfeng Tan 
---
 drivers/net/virtio/virtio_ethdev.c  | 338 +---
 drivers/net/virtio/virtio_ethdev.h  |   1 +
 drivers/net/virtio/virtio_pci.h |  24 +--
 drivers/net/virtio/virtio_rxtx.c|  11 +-
 drivers/net/virtio/virtio_rxtx_simple.c |  14 +-
 drivers/net/virtio/virtqueue.h  |  13 +-
 6 files changed, 302 insertions(+), 99 deletions(-)

diff --git a/drivers/net/virtio/virtio_ethdev.c 
b/drivers/net/virtio/virtio_ethdev.c
index d928339..6e46060 100644
--- a/drivers/net/virtio/virtio_ethdev.c
+++ b/drivers/net/virtio/virtio_ethdev.c
@@ -56,6 +56,7 @@
 #include 
 #include 
 #include 
+#include 

 #include "virtio_ethdev.h"
 #include "virtio_pci.h"
@@ -174,14 +175,14 @@ virtio_send_command(struct virtqueue *vq, struct 
virtio_pmd_ctrl *ctrl,
 * One RX packet for ACK.
 */
vq->vq_ring.desc[head].flags = VRING_DESC_F_NEXT;
-   vq->vq_ring.desc[head].addr = vq->virtio_net_hdr_mz->phys_addr;
+   vq->vq_ring.desc[head].addr = vq->virtio_net_hdr_mem;
vq->vq_ring.desc[head].len = sizeof(struct virtio_net_ctrl_hdr);
vq->vq_free_cnt--;
i = vq->vq_ring.desc[head].next;

for (k = 0; k < pkt_num; k++) {
vq->vq_ring.desc[i].flags = VRING_DESC_F_NEXT;
-   vq->vq_ring.desc[i].addr = vq->virtio_net_hdr_mz->phys_addr
+   vq->vq_ring.desc[i].addr = vq->virtio_net_hdr_mem
+ sizeof(struct virtio_net_ctrl_hdr)
+ sizeof(ctrl->status) + sizeof(uint8_t)*sum;
vq->vq_ring.desc[i].len = dlen[k];
@@ -191,7 +192,7 @@ virtio_send_command(struct virtqueue *vq, struct 
virtio_pmd_ctrl *ctrl,
}

vq->vq_ring.desc[i].flags = VRING_DESC_F_WRITE;
-   vq->vq_ring.desc[i].addr = vq->virtio_net_hdr_mz->phys_addr
+   vq->vq_ring.desc[i].addr = vq->virtio_net_hdr_mem
+ sizeof(struct virtio_net_ctrl_hdr);
vq->vq_ring.desc[i].len = sizeof(ctrl->status);
vq->vq_free_cnt--;
@@ -374,68 +375,85 @@ int virtio_dev_queue_setup(struct rte_eth_dev *dev,
}
}

-   /*
-* Virtio PCI device VIRTIO_PCI_QUEUE_PF register is 32bit,
-* and only accepts 32 bit page frame number.
-* Check if the allocated physical memory exceeds 16TB.
-*/
-   if ((mz->phys_addr + vq->vq_ring_size - 1) >> 
(VIRTIO_PCI_QUEUE_ADDR_SHIFT + 32)) {
-   PMD_INIT_LOG(ERR, "vring address shouldn't be above 16TB!");
-   rte_free(vq);
-   return -ENOMEM;
-   }
-
memset(mz->addr, 0, sizeof(mz->len));
vq->mz = mz;
-   vq->vq_ring_mem = mz->phys_addr;
vq->vq_ring_virt_mem = mz->addr;
-   PMD_INIT_LOG(DEBUG, "vq->vq_ring_mem:  0x%"PRIx64, 
(uint64_t)mz->phys_addr);
-   PMD_INIT_LOG(DEBUG, "vq->vq_ring_virt_mem: 0x%"PRIx64, 
(uint64_t)(uintptr_t)mz->addr);
+
+   if (dev->dev_type == RTE_ETH_DEV_PCI) {
+   vq->vq_ring_mem = mz->phys_addr;
+
+   /* Virtio PCI device VIRTIO_PCI_QUEUE_PF register is 32bit,
+* and only accepts 32 bit page frame number.
+* Check if the allocated physical memory exceeds 16TB.
+*/
+   uint64_t last_physaddr = 

[dpdk-dev] [PATCH 3/4] virtio/vdev: add ways to interact with vhost

2016-01-10 Thread Jianfeng Tan
Depends on the type of vhost file: vhost-user is used if the given
path points to a unix socket; vhost-net is used if the given path
points to a char device.

NOTE: we now keep CONFIG_RTE_VIRTIO_VDEV undefined by default, need
to be uncommented when in use.

Signed-off-by: Huawei Xie 
Signed-off-by: Jianfeng Tan 
---
 config/common_linuxapp |   5 +
 drivers/net/virtio/Makefile|   4 +
 drivers/net/virtio/vhost.c | 734 +
 drivers/net/virtio/vhost.h | 192 ++
 drivers/net/virtio/virtio_ethdev.h |   5 +-
 drivers/net/virtio/virtio_pci.h|  52 ++-
 6 files changed, 990 insertions(+), 2 deletions(-)
 create mode 100644 drivers/net/virtio/vhost.c
 create mode 100644 drivers/net/virtio/vhost.h

diff --git a/config/common_linuxapp b/config/common_linuxapp
index 74bc515..f76e162 100644
--- a/config/common_linuxapp
+++ b/config/common_linuxapp
@@ -534,3 +534,8 @@ CONFIG_RTE_APP_TEST=y
 CONFIG_RTE_TEST_PMD=y
 CONFIG_RTE_TEST_PMD_RECORD_CORE_CYCLES=n
 CONFIG_RTE_TEST_PMD_RECORD_BURST_STATS=n
+
+#
+# Enable virtio support for container
+#
+CONFIG_RTE_VIRTIO_VDEV=y
diff --git a/drivers/net/virtio/Makefile b/drivers/net/virtio/Makefile
index 43835ba..0877023 100644
--- a/drivers/net/virtio/Makefile
+++ b/drivers/net/virtio/Makefile
@@ -52,6 +52,10 @@ SRCS-$(CONFIG_RTE_LIBRTE_VIRTIO_PMD) += virtio_rxtx.c
 SRCS-$(CONFIG_RTE_LIBRTE_VIRTIO_PMD) += virtio_ethdev.c
 SRCS-$(CONFIG_RTE_LIBRTE_VIRTIO_PMD) += virtio_rxtx_simple.c

+ifeq ($(CONFIG_RTE_VIRTIO_VDEV),y)
+   SRCS-$(CONFIG_RTE_LIBRTE_VIRTIO_PMD) += vhost.c
+endif
+
 # this lib depends upon:
 DEPDIRS-$(CONFIG_RTE_LIBRTE_VIRTIO_PMD) += lib/librte_eal lib/librte_ether
 DEPDIRS-$(CONFIG_RTE_LIBRTE_VIRTIO_PMD) += lib/librte_mempool lib/librte_mbuf
diff --git a/drivers/net/virtio/vhost.c b/drivers/net/virtio/vhost.c
new file mode 100644
index 000..e423e02
--- /dev/null
+++ b/drivers/net/virtio/vhost.c
@@ -0,0 +1,734 @@
+/*-
+ *   BSD LICENSE
+ *
+ *   Copyright(c) 2010-2015 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 
+#include 
+#include 
+#include 
+#include 
+#include 
+#include 
+#include 
+#include 
+#include 
+#include 
+#include 
+#include 
+#include 
+#include 
+
+#include 
+#include 
+#include 
+
+#include "virtio_pci.h"
+#include "virtio_logs.h"
+#include "virtio_ethdev.h"
+#include "virtqueue.h"
+#include "vhost.h"
+
+static int
+vhost_user_write(int fd, void *buf, int len, int *fds, int fd_num)
+{
+   struct msghdr msgh;
+   struct iovec iov;
+   int r;
+
+   size_t fd_size = fd_num * sizeof(int);
+   char control[CMSG_SPACE(fd_size)];
+   struct cmsghdr *cmsg;
+
+   memset(, 0, sizeof(msgh));
+   memset(control, 0, sizeof(control));
+
+   iov.iov_base = (uint8_t *)buf;
+   iov.iov_len = len;
+
+   msgh.msg_iov = 
+   msgh.msg_iovlen = 1;
+
+   msgh.msg_control = control;
+   msgh.msg_controllen = sizeof(control);
+
+   cmsg = CMSG_FIRSTHDR();
+
+   cmsg->cmsg_len = CMSG_LEN(fd_size);
+   cmsg->cmsg_level = SOL_SOCKET;
+   cmsg->cmsg_type = SCM_RIGHTS;
+   memcpy(CMSG_DATA(cmsg), fds, fd_size);
+
+   do {
+   r = sendmsg(fd, , 0);
+   } while (r < 0 && errno == EINTR);
+
+   return r;
+}
+
+static int
+vhost_user_read(int fd, VhostUserMsg *msg)
+{
+   uint32_t 

[dpdk-dev] [PATCH 2/4] mem: add API to obstain memory-backed file info

2016-01-10 Thread Jianfeng Tan
A new API named rte_eal_get_backfile_info() and a new data
struct back_file is added to obstain information of memory-
backed file info.

Signed-off-by: Huawei Xie 
Signed-off-by: Jianfeng Tan 
---
 lib/librte_eal/common/include/rte_memory.h | 16 +
 lib/librte_eal/linuxapp/eal/eal_memory.c   | 37 ++
 2 files changed, 53 insertions(+)

diff --git a/lib/librte_eal/common/include/rte_memory.h 
b/lib/librte_eal/common/include/rte_memory.h
index 9c9e40f..75ef8db 100644
--- a/lib/librte_eal/common/include/rte_memory.h
+++ b/lib/librte_eal/common/include/rte_memory.h
@@ -109,6 +109,22 @@ struct rte_memseg {
 } __rte_packed;

 /**
+ * This struct is used to store information about memory-backed file that
+ * we mapped in memory initialization.
+ */
+struct back_file {
+   void *addr; /**< virtual addr */
+   size_t size;/**< the page size */
+   char filepath[PATH_MAX]; /**< path to backing file on filesystem */
+};
+
+/**
+  * Get the hugepage file information. Caller to free.
+  * Return number of hugepage files used.
+  */
+int rte_eal_get_backfile_info(struct back_file **);
+
+/**
  * Lock page in physical memory and prevent from swapping.
  *
  * @param virt
diff --git a/lib/librte_eal/linuxapp/eal/eal_memory.c 
b/lib/librte_eal/linuxapp/eal/eal_memory.c
index 2bb1163..6ca1404 100644
--- a/lib/librte_eal/linuxapp/eal/eal_memory.c
+++ b/lib/librte_eal/linuxapp/eal/eal_memory.c
@@ -758,6 +758,9 @@ sort_by_physaddr(struct hugepage_file *hugepg_tbl, struct 
hugepage_info *hpi)
return 0;
 }

+static struct hugepage_file *hugepage_files;
+static int num_hugepage_files;
+
 /*
  * Uses mmap to create a shared memory area for storage of data
  * Used in this file to store the hugepage file map on disk
@@ -776,9 +779,29 @@ create_shared_memory(const char *filename, const size_t 
mem_size)
retval = mmap(NULL, mem_size, PROT_READ | PROT_WRITE, MAP_SHARED, fd, 
0);
close(fd);

+   hugepage_files = retval;
+   num_hugepage_files = mem_size / (sizeof(struct hugepage_file));
+
return retval;
 }

+int
+rte_eal_get_backfile_info(struct back_file **p)
+{
+   struct back_file *backfiles;
+   int i, num_backfiles = num_hugepage_files;
+
+   backfiles = malloc(sizeof(struct back_file) * num_backfiles);
+   for (i = 0; i < num_backfiles; ++i) {
+   backfiles[i].addr = hugepage_files[i].final_va;
+   backfiles[i].size = hugepage_files[i].size;
+   strcpy(backfiles[i].filepath, hugepage_files[i].filepath);
+   }
+
+   *p = backfiles;
+   return num_backfiles;
+}
+
 /*
  * this copies *active* hugepages from one hugepage table to another.
  * destination is typically the shared memory.
@@ -1157,6 +1180,20 @@ rte_eal_hugepage_init(void)
mcfg->memseg[0].len = internal_config.memory;
mcfg->memseg[0].socket_id = socket_id;

+   hugepage = create_shared_memory(eal_hugepage_info_path(),
+   sizeof(struct hugepage_file));
+   hugepage->orig_va = addr;
+   hugepage->final_va = addr;
+   hugepage->physaddr = rte_mem_virt2phy(addr);
+   hugepage->size = pagesize;
+   hugepage->socket_id = socket_id;
+   hugepage->file_id = 0;
+   hugepage->memseg_id = 0;
+#ifdef RTE_EAL_SINGLE_FILE_SEGMENTS
+   hugepage->repeated = internal_config.memory / pagesize;
+#endif
+   strncpy(hugepage->filepath, filepath, MAX_HUGEPAGE_PATH);
+
close(fd);

return 0;
-- 
2.1.4



[dpdk-dev] [PATCH 1/4] mem: add --single-file to create single mem-backed file

2016-01-10 Thread Jianfeng Tan
Originally, there're two cons in using hugepage: a. needs root
privilege to touch /proc/self/pagemap, which is a premise to
alllocate physically contiguous memseg; b. possibly too many
hugepage file are created, especially used with 2M hugepage.

For virtual devices, they don't care about physical-contiguity
of allocated hugepages at all. Option --single-file is to
provide a way to allocate all hugepages into single mem-backed
file.

Known issue:
a. single-file option relys on kernel to allocate numa-affinitive
memory.
b. possible ABI break, originally, --no-huge uses anonymous memory
instead of file-backed way to create memory.

Signed-off-by: Huawei Xie 
Signed-off-by: Jianfeng Tan 
---
 lib/librte_eal/common/eal_common_options.c | 17 +++
 lib/librte_eal/common/eal_internal_cfg.h   |  1 +
 lib/librte_eal/common/eal_options.h|  2 ++
 lib/librte_eal/linuxapp/eal/eal_memory.c   | 45 ++
 4 files changed, 60 insertions(+), 5 deletions(-)

diff --git a/lib/librte_eal/common/eal_common_options.c 
b/lib/librte_eal/common/eal_common_options.c
index 29942ea..65bccbd 100644
--- a/lib/librte_eal/common/eal_common_options.c
+++ b/lib/librte_eal/common/eal_common_options.c
@@ -95,6 +95,7 @@ eal_long_options[] = {
{OPT_VFIO_INTR, 1, NULL, OPT_VFIO_INTR_NUM},
{OPT_VMWARE_TSC_MAP,0, NULL, OPT_VMWARE_TSC_MAP_NUM   },
{OPT_XEN_DOM0,  0, NULL, OPT_XEN_DOM0_NUM },
+   {OPT_SINGLE_FILE,   0, NULL, OPT_SINGLE_FILE_NUM  },
{0, 0, NULL, 0}
 };

@@ -897,6 +898,10 @@ eal_parse_common_option(int opt, const char *optarg,
}
break;

+   case OPT_SINGLE_FILE_NUM:
+   conf->single_file = 1;
+   break;
+
/* don't know what to do, leave this to caller */
default:
return 1;
@@ -956,6 +961,16 @@ eal_check_common_options(struct internal_config 
*internal_cfg)
"be specified together with --"OPT_NO_HUGE"\n");
return -1;
}
+   if (internal_cfg->single_file && internal_cfg->force_sockets == 1) {
+   RTE_LOG(ERR, EAL, "Option --"OPT_SINGLE_FILE" cannot "
+   "be specified together with --"OPT_SOCKET_MEM"\n");
+   return -1;
+   }
+   if (internal_cfg->single_file && internal_cfg->hugepage_unlink) {
+   RTE_LOG(ERR, EAL, "Option --"OPT_HUGE_UNLINK" cannot "
+   "be specified together with --"OPT_SINGLE_FILE"\n");
+   return -1;
+   }

if (internal_cfg->no_hugetlbfs && internal_cfg->hugepage_unlink) {
RTE_LOG(ERR, EAL, "Option --"OPT_HUGE_UNLINK" cannot "
@@ -994,6 +1009,8 @@ eal_common_usage(void)
   "  -n CHANNELS Number of memory channels\n"
   "  -m MB   Memory to allocate (see also 
--"OPT_SOCKET_MEM")\n"
   "  -r RANKSForce number of memory ranks (don't 
detect)\n"
+  "  --"OPT_SINGLE_FILE" Create just single file for shared 
memory, and \n"
+  "  do not promise physical contiguity of 
memseg\n"
   "  -b, --"OPT_PCI_BLACKLIST" Add a PCI device in black list.\n"
   "  Prevent EAL from using this PCI device. 
The argument\n"
   "  format is .\n"
diff --git a/lib/librte_eal/common/eal_internal_cfg.h 
b/lib/librte_eal/common/eal_internal_cfg.h
index 5f1367e..9117ed9 100644
--- a/lib/librte_eal/common/eal_internal_cfg.h
+++ b/lib/librte_eal/common/eal_internal_cfg.h
@@ -61,6 +61,7 @@ struct hugepage_info {
  */
 struct internal_config {
volatile size_t memory;   /**< amount of asked memory */
+   volatile unsigned single_file;/**< mmap all hugepages in single 
file */
volatile unsigned force_nchannel; /**< force number of channels */
volatile unsigned force_nrank;/**< force number of ranks */
volatile unsigned no_hugetlbfs;   /**< true to disable hugetlbfs */
diff --git a/lib/librte_eal/common/eal_options.h 
b/lib/librte_eal/common/eal_options.h
index a881c62..e5da14a 100644
--- a/lib/librte_eal/common/eal_options.h
+++ b/lib/librte_eal/common/eal_options.h
@@ -83,6 +83,8 @@ enum {
OPT_VMWARE_TSC_MAP_NUM,
 #define OPT_XEN_DOM0  "xen-dom0"
OPT_XEN_DOM0_NUM,
+#define OPT_SINGLE_FILE   "single-file"
+   OPT_SINGLE_FILE_NUM,
OPT_LONG_MAX_NUM
 };

diff --git a/lib/librte_eal/linuxapp/eal/eal_memory.c 
b/lib/librte_eal/linuxapp/eal/eal_memory.c
index 846fd31..2bb1163 100644
--- a/lib/librte_eal/linuxapp/eal/eal_memory.c
+++ b/lib/librte_eal/linuxapp/eal/eal_memory.c
@@ -80,6 +80,10 @@
 #include 
 #include 
 #include 
+#include 
+#include 
+#include 
+#include 

 #include 
 #include 
@@ -92,6 +96,9 @@
 #include 
 #include 

+#define _GNU_SOURCE

[dpdk-dev] [PATCH 0/4] virtio support for container

2016-01-10 Thread Jianfeng Tan
This patchset is to provide high performance networking interface (virtio)
for container-based DPDK applications. The way of starting DPDK apps in
containers with ownership of NIC devices exclusively is beyond the scope.
The basic idea here is to present a new virtual device (named eth_cvio),
which can be discovered and initialized in container-based DPDK apps using
rte_eal_init(). To minimize the change, we reuse already-existing virtio
frontend driver code (driver/net/virtio/).

Compared to QEMU/VM case, virtio device framework (translates I/O port r/w
operations into unix socket/cuse protocol, which is originally provided in
QEMU), is integrated in virtio frontend driver. So this converged driver
actually plays the role of original frontend driver and the role of QEMU
device framework.

The major difference lies in how to calculate relative address for vhost.
The principle of virtio is that: based on one or multiple shared memory
segments, vhost maintains a reference system with the base addresses and
length for each segment so that an address from VM comes (usually GPA,
Guest Physical Address) can be translated into vhost-recognizable address
(named VVA, Vhost Virtual Address). To decrease the overhead of address
translation, we should maintain as few segments as possible. In VM's case,
GPA is always locally continuous. In container's case, CVA (Container
Virtual Address) can be used. Specifically:
a. when set_base_addr, CVA address is used;
b. when preparing RX's descriptors, CVA address is used;
c. when transmitting packets, CVA is filled in TX's descriptors;
d. in TX and CQ's header, CVA is used.

How to share memory? In VM's case, qemu always shares all physical layout
to backend. But it's not feasible for a container, as a process, to share
all virtual memory regions to backend. So only specified virtual memory
regions (with type of shared) are sent to backend. It's a limitation that
only addresses in these areas can be used to transmit or receive packets.

Known issues

a. When used with vhost-net, root privilege is required to create tap
device inside.
b. Control queue and multi-queue are not supported yet.
c. When --single-file option is used, socket_id of the memory may be
wrong. (Use "numactl -N x -m x" to work around this for now)

How to use?

a. Apply this patchset.

b. To compile container apps:
$: make config RTE_SDK=`pwd` T=x86_64-native-linuxapp-gcc
$: make install RTE_SDK=`pwd` T=x86_64-native-linuxapp-gcc
$: make -C examples/l2fwd RTE_SDK=`pwd` T=x86_64-native-linuxapp-gcc
$: make -C examples/vhost RTE_SDK=`pwd` T=x86_64-native-linuxapp-gcc

c. To build a docker image using Dockerfile below.
$: cat ./Dockerfile
FROM ubuntu:latest
WORKDIR /usr/src/dpdk
COPY . /usr/src/dpdk
ENV PATH "$PATH:/usr/src/dpdk/examples/l2fwd/build/"
$: docker build -t dpdk-app-l2fwd .

d. Used with vhost-user
$: ./examples/vhost/build/vhost-switch -c 3 -n 4 \
--socket-mem 1024,1024 -- -p 0x1 --stats 1
$: docker run -i -t -v :/var/run/usvhost \
-v /dev/hugepages:/dev/hugepages \
dpdk-app-l2fwd l2fwd -c 0x4 -n 4 -m 1024 --no-pci \
--vdev=eth_cvio0,path=/var/run/usvhost -- -p 0x1

f. Used with vhost-net
$: modprobe vhost
$: modprobe vhost-net
$: docker run -i -t --privileged \
-v /dev/vhost-net:/dev/vhost-net \
-v /dev/net/tun:/dev/net/tun \
-v /dev/hugepages:/dev/hugepages \
dpdk-app-l2fwd l2fwd -c 0x4 -n 4 -m 1024 --no-pci \
--vdev=eth_cvio0,path=/dev/vhost-net -- -p 0x1

By the way, it's not necessary to run in a container.

Signed-off-by: Huawei Xie 
Signed-off-by: Jianfeng Tan 

Jianfeng Tan (4):
  mem: add --single-file to create single mem-backed file
  mem: add API to obstain memory-backed file info
  virtio/vdev: add ways to interact with vhost
  virtio/vdev: add a new vdev named eth_cvio

 config/common_linuxapp |   5 +
 drivers/net/virtio/Makefile|   4 +
 drivers/net/virtio/vhost.c | 734 +
 drivers/net/virtio/vhost.h | 192 
 drivers/net/virtio/virtio_ethdev.c | 338 ++---
 drivers/net/virtio/virtio_ethdev.h |   4 +
 drivers/net/virtio/virtio_pci.h|  52 +-
 drivers/net/virtio/virtio_rxtx.c   |  11 +-
 drivers/net/virtio/virtio_rxtx_simple.c|  14 +-
 drivers/net/virtio/virtqueue.h |  13 +-
 lib/librte_eal/common/eal_common_options.c |  17 +
 lib/librte_eal/common/eal_internal_cfg.h   |   1 +
 lib/librte_eal/common/eal_options.h|   2 +
 lib/librte_eal/common/include/rte_memory.h |  16 +
 lib/librte_eal/linuxapp/eal/eal_memory.c   |  82 +++-
 15 files changed, 1392 insertions(+), 93 deletions(-)
 create mode 100644 drivers/net/virtio/vhost.c
 create mode 100644 drivers/net/virtio/vhost.h

-- 
2.1.4



[dpdk-dev] [PATCH 00/11] kill global pci device id list

2016-01-10 Thread Zhang, Helin
Hello David

Thanks for your huge contribution!
May you help to describe more details of why you made these huge changes?
What benefit we can have with your changes. I guess there must have, while you 
did not tell that here.

Regards,
Helin

> -Original Message-
> From: dev [mailto:dev-bounces at dpdk.org] On Behalf Of David Marchand
> Sent: Sunday, January 10, 2016 8:51 PM
> To: dev at dpdk.org
> Cc: thomas.monjalon at dpdk.org
> Subject: [dpdk-dev] [PATCH 00/11] kill global pci device id list
> 
> This patchset moves all pci device ids from eal to the pmds that need them
> (patches 1 to 8).
> Global pci device id list is then removed (patches 9, 10).
> 
> In last patch, all those device ids are put in a dedicated section for 
> retrieval by
> external tools.
> 
> --
> David Marchand
> 
> David Marchand (11):
>   e1000: move pci device ids to driver
>   ixgbe: move pci device ids to driver
>   i40e: move pci device ids to driver
>   fm10k: move pci device ids to driver
>   virtio: move pci device ids to driver
>   vmxnet3: move pci device ids to driver
>   enic: move pci device ids to driver
>   bnx2x: move pci device ids to driver
>   doc: refresh headers list
>   pci: no need for global device ids list
>   pci: place all uio pci device ids in a dedicated section
> 
>  app/test-pmd/Makefile   |   2 +
>  app/test-pmd/cmdline.c  |   2 +-
>  app/test/Makefile   |   4 +
>  app/test/test_pci.c |   5 +-
>  doc/api/doxy-api-index.md   |   1 -
>  doc/guides/prog_guide/dev_kit_build_system.rst  |  56 +-
>  drivers/crypto/qat/rte_qat_cryptodev.c  |   2 +-
>  drivers/net/bnx2x/bnx2x.c   |   3 +-
>  drivers/net/bnx2x/bnx2x_ethdev.c|  29 +-
>  drivers/net/cxgbe/cxgbe_ethdev.c|   2 +-
>  drivers/net/e1000/em_ethdev.c   |   4 +-
>  drivers/net/e1000/em_pci_dev_ids.h  | 200 +++
>  drivers/net/e1000/igb_ethdev.c  |   8 +-
>  drivers/net/e1000/igb_pci_dev_ids.h | 164 ++
>  drivers/net/enic/enic_ethdev.c  |  14 +-
>  drivers/net/fm10k/fm10k_ethdev.c|  10 +-
>  drivers/net/i40e/i40e_ethdev.c  |  20 +-
>  drivers/net/i40e/i40e_ethdev_vf.c   |   8 +-
>  drivers/net/ixgbe/ixgbe_ethdev.c|   8 +-
>  drivers/net/ixgbe/ixgbe_pci_dev_ids.h   | 185 +++
>  drivers/net/nfp/nfp_net.c   |   2 +-
>  drivers/net/virtio/virtio_ethdev.c  |   7 +-
>  drivers/net/vmxnet3/vmxnet3_ethdev.c|   9 +-
>  lib/librte_eal/common/Makefile  |   2 +-
>  lib/librte_eal/common/include/rte_pci.h |   2 +
>  lib/librte_eal/common/include/rte_pci_dev_ids.h | 667 
> 
>  lib/librte_eal/linuxapp/kni/Makefile|   2 +
>  lib/librte_eal/linuxapp/kni/kni_misc.c  |   8 +-
>  28 files changed, 678 insertions(+), 748 deletions(-)  create mode 100644
> drivers/net/e1000/em_pci_dev_ids.h
>  create mode 100644 drivers/net/e1000/igb_pci_dev_ids.h
>  create mode 100644 drivers/net/ixgbe/ixgbe_pci_dev_ids.h
>  delete mode 100644 lib/librte_eal/common/include/rte_pci_dev_ids.h
> 
> --
> 1.9.1



[dpdk-dev] [PATCH 00/11] kill global pci device id list

2016-01-10 Thread David Marchand
Really ...
Last mail for today ...

On Sun, Jan 10, 2016 at 2:26 PM, David Marchand 
wrote:

>
>
> On Sun, Jan 10, 2016 at 2:24 PM, Thomas Monjalon <
> thomas.monjalon at 6wind.com> wrote:
>
>> 2016-01-10 13:58, David Marchand:
>> > Hello Thomas,
>> >
>> > Sorry, don't know how I ended up with this, I wrote an incorrect mail
>> > address for you (I should not send patches after sunday meal ;-)).
>>
>> No worries :)
>> I was not expecting a patch so quickly after introducing you in this
>> thread.
>> Glad to see that you take time for - at least - your sunday meal :)
>>
>
>
The patches were ready for a long time, just sent them today as it is rainy
outside.


-- 
David Marchand


[dpdk-dev] [PATCH 00/11] kill global pci device id list

2016-01-10 Thread David Marchand
On Sun, Jan 10, 2016 at 2:24 PM, Thomas Monjalon 
wrote:

> 2016-01-10 13:58, David Marchand:
> > Hello Thomas,
> >
> > Sorry, don't know how I ended up with this, I wrote an incorrect mail
> > address for you (I should not send patches after sunday meal ;-)).
>
> No worries :)
> I was not expecting a patch so quickly after introducing you in this
> thread.
> Glad to see that you take time for - at least - your sunday meal :)
>


[dpdk-dev] [PATCH 00/11] kill global pci device id list

2016-01-10 Thread Thomas Monjalon
2016-01-10 13:58, David Marchand:
> Hello Thomas,
> 
> Sorry, don't know how I ended up with this, I wrote an incorrect mail
> address for you (I should not send patches after sunday meal ;-)).

No worries :)
I was not expecting a patch so quickly after introducing you in this thread.
Glad to see that you take time for - at least - your sunday meal :)


[dpdk-dev] [PATCH 00/11] kill global pci device id list

2016-01-10 Thread David Marchand
Hello Thomas,

Sorry, don't know how I ended up with this, I wrote an incorrect mail
address for you (I should not send patches after sunday meal ;-)).


-- 
David Marchand


[dpdk-dev] [PATCH 11/11] pci: place all uio pci device ids in a dedicated section

2016-01-10 Thread David Marchand
We could do something ? la modinfo, but let's keep it simple for now.

With this, you can extract the devices that need to be bound to uio / vfio
with tools like objdump :

$ objdump -j rte_pci_id_uio -s build/lib/librte_pmd_fm10k.so

Contents of section rte_pci_id_uio:
 15760 8680a415  8680d015   
 15770 8680a515     

Signed-off-by: David Marchand 
---
 drivers/crypto/qat/rte_qat_cryptodev.c  | 2 +-
 drivers/net/bnx2x/bnx2x_ethdev.c| 4 ++--
 drivers/net/cxgbe/cxgbe_ethdev.c| 2 +-
 drivers/net/e1000/em_ethdev.c   | 2 +-
 drivers/net/e1000/igb_ethdev.c  | 4 ++--
 drivers/net/enic/enic_ethdev.c  | 2 +-
 drivers/net/fm10k/fm10k_ethdev.c| 2 +-
 drivers/net/i40e/i40e_ethdev.c  | 2 +-
 drivers/net/i40e/i40e_ethdev_vf.c   | 2 +-
 drivers/net/ixgbe/ixgbe_ethdev.c| 4 ++--
 drivers/net/nfp/nfp_net.c   | 2 +-
 drivers/net/virtio/virtio_ethdev.c  | 2 +-
 drivers/net/vmxnet3/vmxnet3_ethdev.c| 2 +-
 lib/librte_eal/common/include/rte_pci.h | 2 ++
 14 files changed, 18 insertions(+), 16 deletions(-)

diff --git a/drivers/crypto/qat/rte_qat_cryptodev.c 
b/drivers/crypto/qat/rte_qat_cryptodev.c
index e500c1e..c9f5790 100644
--- a/drivers/crypto/qat/rte_qat_cryptodev.c
+++ b/drivers/crypto/qat/rte_qat_cryptodev.c
@@ -67,7 +67,7 @@ static struct rte_cryptodev_ops crypto_qat_ops = {
  * The set of PCI devices this driver supports
  */

-static struct rte_pci_id pci_id_qat_map[] = {
+static struct rte_pci_id RTE_PCI_ID_UIO_SECTION pci_id_qat_map[] = {
{
.vendor_id = 0x8086,
.device_id = 0x0443,
diff --git a/drivers/net/bnx2x/bnx2x_ethdev.c b/drivers/net/bnx2x/bnx2x_ethdev.c
index f822cfd..7599ec6 100644
--- a/drivers/net/bnx2x/bnx2x_ethdev.c
+++ b/drivers/net/bnx2x/bnx2x_ethdev.c
@@ -17,7 +17,7 @@
  * The set of PCI devices this driver supports
  */
 #define PCI_VENDOR_ID_BROADCOM 0x14E4
-static struct rte_pci_id pci_id_bnx2x_map[] = {
+static struct rte_pci_id RTE_PCI_ID_UIO_SECTION pci_id_bnx2x_map[] = {
 { RTE_PCI_DEVICE(PCI_VENDOR_ID_BROADCOM, CHIP_NUM_57800) },
 { RTE_PCI_DEVICE(PCI_VENDOR_ID_BROADCOM, CHIP_NUM_57711) },
 { RTE_PCI_DEVICE(PCI_VENDOR_ID_BROADCOM, CHIP_NUM_57810) },
@@ -33,7 +33,7 @@ static struct rte_pci_id pci_id_bnx2x_map[] = {
 { .vendor_id = 0, }
 };

-static struct rte_pci_id pci_id_bnx2xvf_map[] = {
+static struct rte_pci_id RTE_PCI_ID_UIO_SECTION pci_id_bnx2xvf_map[] = {
 { RTE_PCI_DEVICE(PCI_VENDOR_ID_BROADCOM, CHIP_NUM_57800_VF) },
 { RTE_PCI_DEVICE(PCI_VENDOR_ID_BROADCOM, CHIP_NUM_57810_VF) },
 { RTE_PCI_DEVICE(PCI_VENDOR_ID_BROADCOM, CHIP_NUM_57811_VF) },
diff --git a/drivers/net/cxgbe/cxgbe_ethdev.c b/drivers/net/cxgbe/cxgbe_ethdev.c
index 97ef152..2620130 100644
--- a/drivers/net/cxgbe/cxgbe_ethdev.c
+++ b/drivers/net/cxgbe/cxgbe_ethdev.c
@@ -68,7 +68,7 @@
  * Macros needed to support the PCI Device ID Table ...
  */
 #define CH_PCI_DEVICE_ID_TABLE_DEFINE_BEGIN \
-   static struct rte_pci_id cxgb4_pci_tbl[] = {
+   static struct rte_pci_id RTE_PCI_ID_UIO_SECTION cxgb4_pci_tbl[] = {
 #define CH_PCI_DEVICE_ID_FUNCTION 0x4

 #define PCI_VENDOR_ID_CHELSIO 0x1425
diff --git a/drivers/net/e1000/em_ethdev.c b/drivers/net/e1000/em_ethdev.c
index 4cf9217..fb71686 100644
--- a/drivers/net/e1000/em_ethdev.c
+++ b/drivers/net/e1000/em_ethdev.c
@@ -136,7 +136,7 @@ static enum e1000_fc_mode em_fc_setting = e1000_fc_full;
 /*
  * The set of PCI devices this driver supports
  */
-static const struct rte_pci_id pci_id_em_map[] = {
+static const struct rte_pci_id RTE_PCI_ID_UIO_SECTION pci_id_em_map[] = {

 #define RTE_PCI_DEV_ID_DECL_EM(vend, dev) {RTE_PCI_DEVICE(vend, dev)},
 #include "em_pci_dev_ids.h"
diff --git a/drivers/net/e1000/igb_ethdev.c b/drivers/net/e1000/igb_ethdev.c
index 3f85a2c..f71bcd1 100644
--- a/drivers/net/e1000/igb_ethdev.c
+++ b/drivers/net/e1000/igb_ethdev.c
@@ -273,7 +273,7 @@ static enum e1000_fc_mode igb_fc_setting = e1000_fc_full;
 /*
  * The set of PCI devices this driver supports
  */
-static const struct rte_pci_id pci_id_igb_map[] = {
+static const struct rte_pci_id RTE_PCI_ID_UIO_SECTION pci_id_igb_map[] = {

 #define RTE_PCI_DEV_ID_DECL_IGB(vend, dev) {RTE_PCI_DEVICE(vend, dev)},
 #include "igb_pci_dev_ids.h"
@@ -284,7 +284,7 @@ static const struct rte_pci_id pci_id_igb_map[] = {
 /*
  * The set of PCI devices this driver supports (for 82576 VF)
  */
-static const struct rte_pci_id pci_id_igbvf_map[] = {
+static const struct rte_pci_id RTE_PCI_ID_UIO_SECTION pci_id_igbvf_map[] = {

 #define RTE_PCI_DEV_ID_DECL_IGBVF(vend, dev) {RTE_PCI_DEVICE(vend, dev)},
 #include "igb_pci_dev_ids.h"
diff --git a/drivers/net/enic/enic_ethdev.c b/drivers/net/enic/enic_ethdev.c
index e3bd8ec..d67f643 100644
--- a/drivers/net/enic/enic_ethdev.c
+++ b/drivers/net/enic/enic_ethdev.c
@@ -58,7 +58,7 @@
  * The set of PCI devices this driver supports
  */
 #define 

[dpdk-dev] [PATCH 10/11] pci: no need for global device ids list

2016-01-10 Thread David Marchand
Now that all pci device ids are in their respective drivers, we can remove
this header.

Signed-off-by: David Marchand 
---
 doc/api/doxy-api-index.md   |  1 -
 doc/guides/prog_guide/dev_kit_build_system.rst  | 75 ++--
 lib/librte_eal/common/Makefile  |  2 +-
 lib/librte_eal/common/include/rte_pci_dev_ids.h | 93 -
 4 files changed, 38 insertions(+), 133 deletions(-)
 delete mode 100644 lib/librte_eal/common/include/rte_pci_dev_ids.h

diff --git a/doc/api/doxy-api-index.md b/doc/api/doxy-api-index.md
index 7a91001..0540aba 100644
--- a/doc/api/doxy-api-index.md
+++ b/doc/api/doxy-api-index.md
@@ -45,7 +45,6 @@ There are many libraries, so their headers may be grouped by 
topics:
   [vhost]  (@ref rte_virtio_net.h),
   [KNI](@ref rte_kni.h),
   [PCI](@ref rte_pci.h),
-  [PCI IDs](@ref rte_pci_dev_ids.h)

 - **memory**:
   [memseg] (@ref rte_memory.h),
diff --git a/doc/guides/prog_guide/dev_kit_build_system.rst 
b/doc/guides/prog_guide/dev_kit_build_system.rst
index bbb9ea0..6b89af6 100644
--- a/doc/guides/prog_guide/dev_kit_build_system.rst
+++ b/doc/guides/prog_guide/dev_kit_build_system.rst
@@ -89,44 +89,43 @@ Each build directory contains include files, libraries, and 
applications:


 ~/DEV/DPDK$ ls i686-native-linuxapp-gcc/include/
-cmdline_cirbuf.h   rte_eal_memconfig.h rte_per_lcore.h
-cmdline.h  rte_errno.h rte_pipeline.h
-cmdline_parse_etheraddr.h  rte_eth_af_packet.h rte_port_ethdev.h
-cmdline_parse.hrte_eth_bond_8023ad.h   rte_port_frag.h
-cmdline_parse_ipaddr.h rte_eth_bond.h  rte_port.h
-cmdline_parse_num.hrte_eth_ctrl.h  rte_port_ras.h
-cmdline_parse_portlist.h   rte_ethdev.hrte_port_ring.h
-cmdline_parse_string.h rte_ether.h rte_port_sched.h
-cmdline_rdline.h   rte_eth_ring.h  
rte_port_source_sink.h
-cmdline_socket.h   rte_fbk_hash.h  rte_power.h
-cmdline_vt100.hrte_hash_crc.h  rte_prefetch.h
-exec-env   rte_hash.h  rte_random.h
-genericrte_hexdump.h   rte_red.h
-rte_acl.h  rte_icmp.h  rte_reorder.h
-rte_acl_osdep.hrte_interrupts.hrte_ring.h
-rte_alarm.hrte_ip_frag.h   rte_rtm.h
-rte_approx.h   rte_ip.hrte_rwlock.h
-rte_arp.h  rte_jhash.h rte_sched_common.h
-rte_atomic_32.hrte_jobstats.h  rte_sched.h
-rte_atomic_64.hrte_kvargs.hrte_sctp.h
-rte_atomic.h   rte_launch.hrte_spinlock.h
-rte_bitmap.h   rte_lcore.h rte_string_fns.h
-rte_branch_prediction.hrte_log.h   rte_table_acl.h
-rte_byteorder_32.h rte_lpm6.h  rte_table_array.h
-rte_byteorder_64.h rte_lpm.h   rte_table.h
-rte_byteorder.hrte_lru.h   rte_table_hash.h
-rte_cfgfile.h  rte_malloc.hrte_table_lpm.h
-rte_common.h   rte_malloc_heap.h   rte_table_lpm_ipv6.h
-rte_compat.h   rte_mbuf.h  rte_table_stub.h
-rte_config.h   rte_memcpy.hrte_tailq.h
-rte_cpuflags.h rte_memory.hrte_tcp.h
-rte_cycles.h   rte_mempool.h   rte_thash.h
-rte_debug.hrte_memzone.h   rte_timer.h
-rte_devargs.h  rte_meter.h rte_udp.h
-rte_dev.h  rte_pci_dev_feature_defs.h  rte_vect.h
-rte_dev_info.h rte_pci_dev_features.h  rte_version.h
-rte_distributor.h  rte_pci_dev_ids.h   rte_virtio_net.h
-rte_eal.h  rte_pci.h
+cmdline_cirbuf.h   rte_eal.h   rte_port_ethdev.h
+cmdline.h  rte_eal_memconfig.h rte_port_frag.h
+cmdline_parse_etheraddr.h  rte_errno.h rte_port.h
+cmdline_parse.hrte_eth_af_packet.h rte_port_ras.h
+cmdline_parse_ipaddr.h rte_eth_ctrl.h  rte_port_ring.h
+cmdline_parse_num.hrte_ethdev.hrte_port_sched.h
+cmdline_parse_portlist.h   rte_ether.h 
rte_port_source_sink.h
+cmdline_parse_string.h rte_fbk_hash.h  rte_power.h
+cmdline_rdline.h   rte_hash_crc.h  rte_prefetch.h
+cmdline_socket.h   rte_hash.h  rte_random.h
+cmdline_vt100.h

[dpdk-dev] [PATCH 09/11] doc: refresh headers list

2016-01-10 Thread David Marchand
Since we are going to remove a header in next commit, let's first refresh
documentation.

Signed-off-by: David Marchand 
---
 doc/guides/prog_guide/dev_kit_build_system.rst | 57 +-
 1 file changed, 38 insertions(+), 19 deletions(-)

diff --git a/doc/guides/prog_guide/dev_kit_build_system.rst 
b/doc/guides/prog_guide/dev_kit_build_system.rst
index dd3e3d0..bbb9ea0 100644
--- a/doc/guides/prog_guide/dev_kit_build_system.rst
+++ b/doc/guides/prog_guide/dev_kit_build_system.rst
@@ -89,25 +89,44 @@ Each build directory contains include files, libraries, and 
applications:


 ~/DEV/DPDK$ ls i686-native-linuxapp-gcc/include/
-arch   rte_cpuflags.h   rte_memcpy.h
-cmdline_cirbuf.h   rte_cycles.h rte_memory.h
-cmdline.h  rte_debug.h  rte_mempool.h
-cmdline_parse_etheraddr.h  rte_eal.hrte_memzone.h
-cmdline_parse.hrte_errno.h  rte_pci_dev_ids.h
-cmdline_parse_ipaddr.h rte_ethdev.h rte_pci.h
-cmdline_parse_num.hrte_ether.h  rte_per_lcore.h
-cmdline_parse_portlist.h   rte_fbk_hash.h   rte_prefetch.h
-cmdline_parse_string.h rte_hash_crc.h   rte_random.h
-cmdline_rdline.h   rte_hash.h   rte_ring.h
-cmdline_socket.h   rte_interrupts.h rte_rwlock.h
-cmdline_vt100.hrte_ip.h rte_sctp.h
-exec-env   rte_jhash.h  rte_spinlock.h
-rte_alarm.hrte_launch.h rte_string_fns.h
-rte_atomic.h   rte_lcore.h  rte_tailq.h
-rte_branch_prediction.hrte_log.hrte_tcp.h
-rte_byteorder.hrte_lpm.hrte_timer.h
-rte_common.h   rte_malloc.h rte_udp.h
-rte_config.h   rte_mbuf.h
+cmdline_cirbuf.h   rte_eal_memconfig.h rte_per_lcore.h
+cmdline.h  rte_errno.h rte_pipeline.h
+cmdline_parse_etheraddr.h  rte_eth_af_packet.h rte_port_ethdev.h
+cmdline_parse.hrte_eth_bond_8023ad.h   rte_port_frag.h
+cmdline_parse_ipaddr.h rte_eth_bond.h  rte_port.h
+cmdline_parse_num.hrte_eth_ctrl.h  rte_port_ras.h
+cmdline_parse_portlist.h   rte_ethdev.hrte_port_ring.h
+cmdline_parse_string.h rte_ether.h rte_port_sched.h
+cmdline_rdline.h   rte_eth_ring.h  
rte_port_source_sink.h
+cmdline_socket.h   rte_fbk_hash.h  rte_power.h
+cmdline_vt100.hrte_hash_crc.h  rte_prefetch.h
+exec-env   rte_hash.h  rte_random.h
+genericrte_hexdump.h   rte_red.h
+rte_acl.h  rte_icmp.h  rte_reorder.h
+rte_acl_osdep.hrte_interrupts.hrte_ring.h
+rte_alarm.hrte_ip_frag.h   rte_rtm.h
+rte_approx.h   rte_ip.hrte_rwlock.h
+rte_arp.h  rte_jhash.h rte_sched_common.h
+rte_atomic_32.hrte_jobstats.h  rte_sched.h
+rte_atomic_64.hrte_kvargs.hrte_sctp.h
+rte_atomic.h   rte_launch.hrte_spinlock.h
+rte_bitmap.h   rte_lcore.h rte_string_fns.h
+rte_branch_prediction.hrte_log.h   rte_table_acl.h
+rte_byteorder_32.h rte_lpm6.h  rte_table_array.h
+rte_byteorder_64.h rte_lpm.h   rte_table.h
+rte_byteorder.hrte_lru.h   rte_table_hash.h
+rte_cfgfile.h  rte_malloc.hrte_table_lpm.h
+rte_common.h   rte_malloc_heap.h   rte_table_lpm_ipv6.h
+rte_compat.h   rte_mbuf.h  rte_table_stub.h
+rte_config.h   rte_memcpy.hrte_tailq.h
+rte_cpuflags.h rte_memory.hrte_tcp.h
+rte_cycles.h   rte_mempool.h   rte_thash.h
+rte_debug.hrte_memzone.h   rte_timer.h
+rte_devargs.h  rte_meter.h rte_udp.h
+rte_dev.h  rte_pci_dev_feature_defs.h  rte_vect.h
+rte_dev_info.h rte_pci_dev_features.h  rte_version.h
+rte_distributor.h  rte_pci_dev_ids.h   rte_virtio_net.h
+rte_eal.h  rte_pci.h


 A build directory is specific to a configuration that includes architecture + 
execution environment + toolchain.
-- 
1.9.1



[dpdk-dev] [PATCH 08/11] bnx2x: move pci device ids to driver

2016-01-10 Thread David Marchand
Reused defines from the driver and moved broadcom vendor id macro.

Signed-off-by: David Marchand 
---
 drivers/net/bnx2x/bnx2x.c   |  3 +-
 drivers/net/bnx2x/bnx2x_ethdev.c| 25 ---
 lib/librte_eal/common/include/rte_pci_dev_ids.h | 60 -
 3 files changed, 20 insertions(+), 68 deletions(-)

diff --git a/drivers/net/bnx2x/bnx2x.c b/drivers/net/bnx2x/bnx2x.c
index 67af5da..bf6dd71 100644
--- a/drivers/net/bnx2x/bnx2x.c
+++ b/drivers/net/bnx2x/bnx2x.c
@@ -22,7 +22,6 @@
 #include "ecore_init_ops.h"

 #include "rte_version.h"
-#include "rte_pci_dev_ids.h"

 #include 
 #include 
@@ -9592,7 +9591,7 @@ void bnx2x_load_firmware(struct bnx2x_softc *sc)
int f;
struct stat st;

-   fwname = sc->devinfo.device_id == BNX2X_DEV_ID_57711
+   fwname = sc->devinfo.device_id == CHIP_NUM_57711
? FW_NAME_57711 : FW_NAME_57810;
f = open(fwname, O_RDONLY);
if (f < 0) {
diff --git a/drivers/net/bnx2x/bnx2x_ethdev.c b/drivers/net/bnx2x/bnx2x_ethdev.c
index 69df02e..f822cfd 100644
--- a/drivers/net/bnx2x/bnx2x_ethdev.c
+++ b/drivers/net/bnx2x/bnx2x_ethdev.c
@@ -16,16 +16,29 @@
 /*
  * The set of PCI devices this driver supports
  */
+#define PCI_VENDOR_ID_BROADCOM 0x14E4
 static struct rte_pci_id pci_id_bnx2x_map[] = {
-#define RTE_PCI_DEV_ID_DECL_BNX2X(vend, dev) {RTE_PCI_DEVICE(vend, dev)},
-#include "rte_pci_dev_ids.h"
-   { .vendor_id = 0, }
+{ RTE_PCI_DEVICE(PCI_VENDOR_ID_BROADCOM, CHIP_NUM_57800) },
+{ RTE_PCI_DEVICE(PCI_VENDOR_ID_BROADCOM, CHIP_NUM_57711) },
+{ RTE_PCI_DEVICE(PCI_VENDOR_ID_BROADCOM, CHIP_NUM_57810) },
+{ RTE_PCI_DEVICE(PCI_VENDOR_ID_BROADCOM, CHIP_NUM_57811) },
+{ RTE_PCI_DEVICE(PCI_VENDOR_ID_BROADCOM, CHIP_NUM_57840_OBS) },
+{ RTE_PCI_DEVICE(PCI_VENDOR_ID_BROADCOM, CHIP_NUM_57840_4_10) },
+{ RTE_PCI_DEVICE(PCI_VENDOR_ID_BROADCOM, CHIP_NUM_57840_2_20) },
+#ifdef RTE_LIBRTE_BNX2X_MF_SUPPORT
+{ RTE_PCI_DEVICE(PCI_VENDOR_ID_BROADCOM, CHIP_NUM_57810_MF) },
+{ RTE_PCI_DEVICE(PCI_VENDOR_ID_BROADCOM, CHIP_NUM_57811_MF) },
+{ RTE_PCI_DEVICE(PCI_VENDOR_ID_BROADCOM, CHIP_NUM_57840_MF) },
+#endif
+{ .vendor_id = 0, }
 };

 static struct rte_pci_id pci_id_bnx2xvf_map[] = {
-#define RTE_PCI_DEV_ID_DECL_BNX2XVF(vend, dev) {RTE_PCI_DEVICE(vend, dev)},
-#include "rte_pci_dev_ids.h"
-   { .vendor_id = 0, }
+{ RTE_PCI_DEVICE(PCI_VENDOR_ID_BROADCOM, CHIP_NUM_57800_VF) },
+{ RTE_PCI_DEVICE(PCI_VENDOR_ID_BROADCOM, CHIP_NUM_57810_VF) },
+{ RTE_PCI_DEVICE(PCI_VENDOR_ID_BROADCOM, CHIP_NUM_57811_VF) },
+{ RTE_PCI_DEVICE(PCI_VENDOR_ID_BROADCOM, CHIP_NUM_57840_VF) },
+{ .vendor_id = 0, }
 };

 static void
diff --git a/lib/librte_eal/common/include/rte_pci_dev_ids.h 
b/lib/librte_eal/common/include/rte_pci_dev_ids.h
index 1c22c04..6720b7a 100644
--- a/lib/librte_eal/common/include/rte_pci_dev_ids.h
+++ b/lib/librte_eal/common/include/rte_pci_dev_ids.h
@@ -88,66 +88,6 @@
  * Note that this file can be included multiple times within the same file.
  */

-#ifndef RTE_PCI_DEV_ID_DECL_BNX2X
-#define RTE_PCI_DEV_ID_DECL_BNX2X(vend, dev)
-#endif
-
-#ifndef RTE_PCI_DEV_ID_DECL_BNX2XVF
-#define RTE_PCI_DEV_ID_DECL_BNX2XVF(vend, dev)
-#endif
-
-#ifndef PCI_VENDOR_ID_BROADCOM
-/** Vendor ID used by Broadcom devices */
-#define PCI_VENDOR_ID_BROADCOM 0x14E4
-#endif
-
-/** QLogic devices **/
-
-/* Broadcom/QLogic BNX2X */
-#define BNX2X_DEV_ID_57710 0x164e
-#define BNX2X_DEV_ID_57711 0x164f
-#define BNX2X_DEV_ID_57711E0x1650
-#define BNX2X_DEV_ID_57712 0x1662
-#define BNX2X_DEV_ID_57712_MF  0x1663
-#define BNX2X_DEV_ID_57712_VF  0x166f
-#define BNX2X_DEV_ID_57713 0x1651
-#define BNX2X_DEV_ID_57713E0x1652
-#define BNX2X_DEV_ID_57800 0x168a
-#define BNX2X_DEV_ID_57800_MF  0x16a5
-#define BNX2X_DEV_ID_57800_VF  0x16a9
-#define BNX2X_DEV_ID_57810 0x168e
-#define BNX2X_DEV_ID_57810_MF  0x16ae
-#define BNX2X_DEV_ID_57810_VF  0x16af
-#define BNX2X_DEV_ID_57811 0x163d
-#define BNX2X_DEV_ID_57811_MF  0x163e
-#define BNX2X_DEV_ID_57811_VF  0x163f
-
-#define BNX2X_DEV_ID_57840_OBS 0x168d
-#define BNX2X_DEV_ID_57840_OBS_MF  0x16ab
-#define BNX2X_DEV_ID_57840_4_100x16a1
-#define BNX2X_DEV_ID_57840_2_200x16a2
-#define BNX2X_DEV_ID_57840_MF  0x16a4
-#define BNX2X_DEV_ID_57840_VF  0x16ad
-
-RTE_PCI_DEV_ID_DECL_BNX2X(PCI_VENDOR_ID_BROADCOM, BNX2X_DEV_ID_57800)
-RTE_PCI_DEV_ID_DECL_BNX2XVF(PCI_VENDOR_ID_BROADCOM, BNX2X_DEV_ID_57800_VF)
-RTE_PCI_DEV_ID_DECL_BNX2X(PCI_VENDOR_ID_BROADCOM, BNX2X_DEV_ID_57711)
-RTE_PCI_DEV_ID_DECL_BNX2X(PCI_VENDOR_ID_BROADCOM, BNX2X_DEV_ID_57810)
-RTE_PCI_DEV_ID_DECL_BNX2XVF(PCI_VENDOR_ID_BROADCOM, BNX2X_DEV_ID_57810_VF)
-RTE_PCI_DEV_ID_DECL_BNX2X(PCI_VENDOR_ID_BROADCOM, BNX2X_DEV_ID_57811)
-RTE_PCI_DEV_ID_DECL_BNX2XVF(PCI_VENDOR_ID_BROADCOM, BNX2X_DEV_ID_57811_VF)
-RTE_PCI_DEV_ID_DECL_BNX2X(PCI_VENDOR_ID_BROADCOM, BNX2X_DEV_ID_57840_OBS)

[dpdk-dev] [PATCH 07/11] enic: move pci device ids to driver

2016-01-10 Thread David Marchand
Moved cisco vendor id since the driver had no such information.

Signed-off-by: David Marchand 
---
 drivers/net/enic/enic_ethdev.c  | 12 
 lib/librte_eal/common/include/rte_pci_dev_ids.h | 17 -
 2 files changed, 4 insertions(+), 25 deletions(-)

diff --git a/drivers/net/enic/enic_ethdev.c b/drivers/net/enic/enic_ethdev.c
index 2a88043..e3bd8ec 100644
--- a/drivers/net/enic/enic_ethdev.c
+++ b/drivers/net/enic/enic_ethdev.c
@@ -57,15 +57,11 @@
 /*
  * The set of PCI devices this driver supports
  */
+#define PCI_VENDOR_ID_CISCO 0x1137
 static const struct rte_pci_id pci_id_enic_map[] = {
-#define RTE_PCI_DEV_ID_DECL_ENIC(vend, dev) {RTE_PCI_DEVICE(vend, dev)},
-#ifndef PCI_VENDOR_ID_CISCO
-#define PCI_VENDOR_ID_CISCO0x1137
-#endif
-#include "rte_pci_dev_ids.h"
-RTE_PCI_DEV_ID_DECL_ENIC(PCI_VENDOR_ID_CISCO, PCI_DEVICE_ID_CISCO_VIC_ENET)
-RTE_PCI_DEV_ID_DECL_ENIC(PCI_VENDOR_ID_CISCO, PCI_DEVICE_ID_CISCO_VIC_ENET_VF)
-{.vendor_id = 0, /* Sentinal */},
+{ RTE_PCI_DEVICE(PCI_VENDOR_ID_CISCO, PCI_DEVICE_ID_CISCO_VIC_ENET) },
+{ RTE_PCI_DEVICE(PCI_VENDOR_ID_CISCO, PCI_DEVICE_ID_CISCO_VIC_ENET_VF) },
+{.vendor_id = 0, /* sentinel */},
 };

 static int
diff --git a/lib/librte_eal/common/include/rte_pci_dev_ids.h 
b/lib/librte_eal/common/include/rte_pci_dev_ids.h
index 0ecff3c..1c22c04 100644
--- a/lib/librte_eal/common/include/rte_pci_dev_ids.h
+++ b/lib/librte_eal/common/include/rte_pci_dev_ids.h
@@ -88,10 +88,6 @@
  * Note that this file can be included multiple times within the same file.
  */

-#ifndef RTE_PCI_DEV_ID_DECL_ENIC
-#define RTE_PCI_DEV_ID_DECL_ENIC(vend, dev)
-#endif
-
 #ifndef RTE_PCI_DEV_ID_DECL_BNX2X
 #define RTE_PCI_DEV_ID_DECL_BNX2X(vend, dev)
 #endif
@@ -100,24 +96,11 @@
 #define RTE_PCI_DEV_ID_DECL_BNX2XVF(vend, dev)
 #endif

-#ifndef PCI_VENDOR_ID_CISCO
-/** Vendor ID used by Cisco VIC devices */
-#define PCI_VENDOR_ID_CISCO 0x1137
-#endif
-
 #ifndef PCI_VENDOR_ID_BROADCOM
 /** Vendor ID used by Broadcom devices */
 #define PCI_VENDOR_ID_BROADCOM 0x14E4
 #endif

-/** Cisco VIC devices **/
-
-#define PCI_DEVICE_ID_CISCO_VIC_ENET 0x0043  /* ethernet vnic */
-#define PCI_DEVICE_ID_CISCO_VIC_ENET_VF  0x0071  /* enet SRIOV VF */
-
-RTE_PCI_DEV_ID_DECL_ENIC(PCI_VENDOR_ID_CISCO, PCI_DEVICE_ID_CISCO_VIC_ENET)
-RTE_PCI_DEV_ID_DECL_ENIC(PCI_VENDOR_ID_CISCO, PCI_DEVICE_ID_CISCO_VIC_ENET_VF)
-
 /** QLogic devices **/

 /* Broadcom/QLogic BNX2X */
-- 
1.9.1



[dpdk-dev] [PATCH 06/11] vmxnet3: move pci device ids to driver

2016-01-10 Thread David Marchand
Moved vmware device ids macro since the driver had no such information.

Signed-off-by: David Marchand 
---
 drivers/net/vmxnet3/vmxnet3_ethdev.c|  7 +++
 lib/librte_eal/common/include/rte_pci_dev_ids.h | 16 
 2 files changed, 3 insertions(+), 20 deletions(-)

diff --git a/drivers/net/vmxnet3/vmxnet3_ethdev.c 
b/drivers/net/vmxnet3/vmxnet3_ethdev.c
index c363bf6..b9de8eb 100644
--- a/drivers/net/vmxnet3/vmxnet3_ethdev.c
+++ b/drivers/net/vmxnet3/vmxnet3_ethdev.c
@@ -98,11 +98,10 @@ static void vmxnet3_process_events(struct vmxnet3_hw *);
 /*
  * The set of PCI devices this driver supports
  */
+#define PCI_VENDOR_ID_VMWARE 0x15AD
+#define VMWARE_DEV_ID_VMXNET3 0x07B0
 static const struct rte_pci_id pci_id_vmxnet3_map[] = {
-
-#define RTE_PCI_DEV_ID_DECL_VMXNET3(vend, dev) {RTE_PCI_DEVICE(vend, dev)},
-#include "rte_pci_dev_ids.h"
-
+{ RTE_PCI_DEVICE(PCI_VENDOR_ID_VMWARE, VMWARE_DEV_ID_VMXNET3) },
 { .vendor_id = 0, /* sentinel */ },
 };

diff --git a/lib/librte_eal/common/include/rte_pci_dev_ids.h 
b/lib/librte_eal/common/include/rte_pci_dev_ids.h
index 448b5e1..0ecff3c 100644
--- a/lib/librte_eal/common/include/rte_pci_dev_ids.h
+++ b/lib/librte_eal/common/include/rte_pci_dev_ids.h
@@ -88,10 +88,6 @@
  * Note that this file can be included multiple times within the same file.
  */

-#ifndef RTE_PCI_DEV_ID_DECL_VMXNET3
-#define RTE_PCI_DEV_ID_DECL_VMXNET3(vend, dev)
-#endif
-
 #ifndef RTE_PCI_DEV_ID_DECL_ENIC
 #define RTE_PCI_DEV_ID_DECL_ENIC(vend, dev)
 #endif
@@ -104,11 +100,6 @@
 #define RTE_PCI_DEV_ID_DECL_BNX2XVF(vend, dev)
 #endif

-#ifndef PCI_VENDOR_ID_VMWARE
-/** Vendor ID used by VMware devices */
-#define PCI_VENDOR_ID_VMWARE 0x15AD
-#endif
-
 #ifndef PCI_VENDOR_ID_CISCO
 /** Vendor ID used by Cisco VIC devices */
 #define PCI_VENDOR_ID_CISCO 0x1137
@@ -119,12 +110,6 @@
 #define PCI_VENDOR_ID_BROADCOM 0x14E4
 #endif

-/** VMware VMXNET3 devices **/
-
-#define VMWARE_DEV_ID_VMXNET3   0x07B0
-
-RTE_PCI_DEV_ID_DECL_VMXNET3(PCI_VENDOR_ID_VMWARE, VMWARE_DEV_ID_VMXNET3)
-
 /** Cisco VIC devices **/

 #define PCI_DEVICE_ID_CISCO_VIC_ENET 0x0043  /* ethernet vnic */
@@ -183,4 +168,3 @@ RTE_PCI_DEV_ID_DECL_BNX2X(PCI_VENDOR_ID_BROADCOM, 
BNX2X_DEV_ID_57840_MF)
  */
 #undef RTE_PCI_DEV_ID_DECL_BNX2X
 #undef RTE_PCI_DEV_ID_DECL_BNX2XVF
-#undef RTE_PCI_DEV_ID_DECL_VMXNET3
-- 
1.9.1



[dpdk-dev] [PATCH 05/11] virtio: move pci device ids to driver

2016-01-10 Thread David Marchand
Reused defines from virtio_pci.h.

Signed-off-by: David Marchand 
---
 drivers/net/virtio/virtio_ethdev.c  |  5 +
 lib/librte_eal/common/include/rte_pci_dev_ids.h | 17 -
 2 files changed, 1 insertion(+), 21 deletions(-)

diff --git a/drivers/net/virtio/virtio_ethdev.c 
b/drivers/net/virtio/virtio_ethdev.c
index d928339..e9af0d7 100644
--- a/drivers/net/virtio/virtio_ethdev.c
+++ b/drivers/net/virtio/virtio_ethdev.c
@@ -106,10 +106,7 @@ static int virtio_dev_queue_stats_mapping_set(
  * The set of PCI devices this driver supports
  */
 static const struct rte_pci_id pci_id_virtio_map[] = {
-
-#define RTE_PCI_DEV_ID_DECL_VIRTIO(vend, dev) {RTE_PCI_DEVICE(vend, dev)},
-#include "rte_pci_dev_ids.h"
-
+{ RTE_PCI_DEVICE(VIRTIO_PCI_VENDORID, VIRTIO_PCI_DEVICEID_MIN) },
 { .vendor_id = 0, /* sentinel */ },
 };

diff --git a/lib/librte_eal/common/include/rte_pci_dev_ids.h 
b/lib/librte_eal/common/include/rte_pci_dev_ids.h
index a19fdfa..448b5e1 100644
--- a/lib/librte_eal/common/include/rte_pci_dev_ids.h
+++ b/lib/librte_eal/common/include/rte_pci_dev_ids.h
@@ -68,7 +68,6 @@
  * driver which is a para virtualization driver running in guest virtual 
machine.
  * The inclusion of these in an array built using this file depends on the
  * definition of
- * RTE_PCI_DEV_ID_DECL_VIRTIO
  * at the time when this file is included.
  *
  * In order to populate an array, the user of this file must define this macro:
@@ -89,10 +88,6 @@
  * Note that this file can be included multiple times within the same file.
  */

-#ifndef RTE_PCI_DEV_ID_DECL_VIRTIO
-#define RTE_PCI_DEV_ID_DECL_VIRTIO(vend, dev)
-#endif
-
 #ifndef RTE_PCI_DEV_ID_DECL_VMXNET3
 #define RTE_PCI_DEV_ID_DECL_VMXNET3(vend, dev)
 #endif
@@ -109,11 +104,6 @@
 #define RTE_PCI_DEV_ID_DECL_BNX2XVF(vend, dev)
 #endif

-#ifndef PCI_VENDOR_ID_QUMRANET
-/** Vendor ID used by virtio devices */
-#define PCI_VENDOR_ID_QUMRANET 0x1AF4
-#endif
-
 #ifndef PCI_VENDOR_ID_VMWARE
 /** Vendor ID used by VMware devices */
 #define PCI_VENDOR_ID_VMWARE 0x15AD
@@ -129,12 +119,6 @@
 #define PCI_VENDOR_ID_BROADCOM 0x14E4
 #endif

-/** Virtio devices from virtio.h **/
-
-#define QUMRANET_DEV_ID_VIRTIO  0x1000
-
-RTE_PCI_DEV_ID_DECL_VIRTIO(PCI_VENDOR_ID_QUMRANET, QUMRANET_DEV_ID_VIRTIO)
-
 /** VMware VMXNET3 devices **/

 #define VMWARE_DEV_ID_VMXNET3   0x07B0
@@ -199,5 +183,4 @@ RTE_PCI_DEV_ID_DECL_BNX2X(PCI_VENDOR_ID_BROADCOM, 
BNX2X_DEV_ID_57840_MF)
  */
 #undef RTE_PCI_DEV_ID_DECL_BNX2X
 #undef RTE_PCI_DEV_ID_DECL_BNX2XVF
-#undef RTE_PCI_DEV_ID_DECL_VIRTIO
 #undef RTE_PCI_DEV_ID_DECL_VMXNET3
-- 
1.9.1



[dpdk-dev] [PATCH 04/11] fm10k: move pci device ids to driver

2016-01-10 Thread David Marchand
Since the base driver already defines all pci device ids, no need to
redefine them, let's just drop the previous RTE_PCI_DEV_ID_DECL* stuff.

Signed-off-by: David Marchand 
---
 drivers/net/fm10k/fm10k_ethdev.c|  8 +++
 lib/librte_eal/common/include/rte_pci_dev_ids.h | 29 -
 2 files changed, 4 insertions(+), 33 deletions(-)

diff --git a/drivers/net/fm10k/fm10k_ethdev.c b/drivers/net/fm10k/fm10k_ethdev.c
index e4aed94..3ab744a 100644
--- a/drivers/net/fm10k/fm10k_ethdev.c
+++ b/drivers/net/fm10k/fm10k_ethdev.c
@@ -2741,10 +2741,10 @@ eth_fm10k_dev_uninit(struct rte_eth_dev *dev)
  * and SRIOV-VF devices.
  */
 static const struct rte_pci_id pci_id_fm10k_map[] = {
-#define RTE_PCI_DEV_ID_DECL_FM10K(vend, dev) { RTE_PCI_DEVICE(vend, dev) },
-#define RTE_PCI_DEV_ID_DECL_FM10KVF(vend, dev) { RTE_PCI_DEVICE(vend, dev) },
-#include "rte_pci_dev_ids.h"
-   { .vendor_id = 0, /* sentinel */ },
+{ RTE_PCI_DEVICE(FM10K_INTEL_VENDOR_ID, FM10K_DEV_ID_PF) },
+{ RTE_PCI_DEVICE(FM10K_INTEL_VENDOR_ID, FM10K_DEV_ID_SDI_FM10420_QDA2) },
+{ RTE_PCI_DEVICE(FM10K_INTEL_VENDOR_ID, FM10K_DEV_ID_VF) },
+{ .vendor_id = 0, /* sentinel */ },
 };

 static struct eth_driver rte_pmd_fm10k = {
diff --git a/lib/librte_eal/common/include/rte_pci_dev_ids.h 
b/lib/librte_eal/common/include/rte_pci_dev_ids.h
index f1f3e13..a19fdfa 100644
--- a/lib/librte_eal/common/include/rte_pci_dev_ids.h
+++ b/lib/librte_eal/common/include/rte_pci_dev_ids.h
@@ -97,14 +97,6 @@
 #define RTE_PCI_DEV_ID_DECL_VMXNET3(vend, dev)
 #endif

-#ifndef RTE_PCI_DEV_ID_DECL_FM10K
-#define RTE_PCI_DEV_ID_DECL_FM10K(vend, dev)
-#endif
-
-#ifndef RTE_PCI_DEV_ID_DECL_FM10KVF
-#define RTE_PCI_DEV_ID_DECL_FM10KVF(vend, dev)
-#endif
-
 #ifndef RTE_PCI_DEV_ID_DECL_ENIC
 #define RTE_PCI_DEV_ID_DECL_ENIC(vend, dev)
 #endif
@@ -117,11 +109,6 @@
 #define RTE_PCI_DEV_ID_DECL_BNX2XVF(vend, dev)
 #endif

-#ifndef PCI_VENDOR_ID_INTEL
-/** Vendor ID used by Intel devices */
-#define PCI_VENDOR_ID_INTEL 0x8086
-#endif
-
 #ifndef PCI_VENDOR_ID_QUMRANET
 /** Vendor ID used by virtio devices */
 #define PCI_VENDOR_ID_QUMRANET 0x1AF4
@@ -142,14 +129,6 @@
 #define PCI_VENDOR_ID_BROADCOM 0x14E4
 #endif

-/*** Physical FM10K devices from fm10k_type.h ***/
-
-#define FM10K_DEV_ID_PF   0x15A4
-#define FM10K_DEV_ID_SDI_FM10420_QDA2 0x15D0
-
-RTE_PCI_DEV_ID_DECL_FM10K(PCI_VENDOR_ID_INTEL, FM10K_DEV_ID_PF)
-RTE_PCI_DEV_ID_DECL_FM10K(PCI_VENDOR_ID_INTEL, FM10K_DEV_ID_SDI_FM10420_QDA2)
-
 /** Virtio devices from virtio.h **/

 #define QUMRANET_DEV_ID_VIRTIO  0x1000
@@ -162,12 +141,6 @@ RTE_PCI_DEV_ID_DECL_VIRTIO(PCI_VENDOR_ID_QUMRANET, 
QUMRANET_DEV_ID_VIRTIO)

 RTE_PCI_DEV_ID_DECL_VMXNET3(PCI_VENDOR_ID_VMWARE, VMWARE_DEV_ID_VMXNET3)

-/*** Virtual FM10K devices from fm10k_type.h ***/
-
-#define FM10K_DEV_ID_VF   0x15A5
-
-RTE_PCI_DEV_ID_DECL_FM10KVF(PCI_VENDOR_ID_INTEL, FM10K_DEV_ID_VF)
-
 /** Cisco VIC devices **/

 #define PCI_DEVICE_ID_CISCO_VIC_ENET 0x0043  /* ethernet vnic */
@@ -228,5 +201,3 @@ RTE_PCI_DEV_ID_DECL_BNX2X(PCI_VENDOR_ID_BROADCOM, 
BNX2X_DEV_ID_57840_MF)
 #undef RTE_PCI_DEV_ID_DECL_BNX2XVF
 #undef RTE_PCI_DEV_ID_DECL_VIRTIO
 #undef RTE_PCI_DEV_ID_DECL_VMXNET3
-#undef RTE_PCI_DEV_ID_DECL_FM10K
-#undef RTE_PCI_DEV_ID_DECL_FM10KVF
-- 
1.9.1



[dpdk-dev] [PATCH 03/11] i40e: move pci device ids to driver

2016-01-10 Thread David Marchand
Since the base driver already defines all pci device ids, no need to
redefine them, let's just drop the previous RTE_PCI_DEV_ID_DECL* stuff.

Signed-off-by: David Marchand 
---
 drivers/net/i40e/i40e_ethdev.c  | 18 +++-
 drivers/net/i40e/i40e_ethdev_vf.c   |  6 ++-
 lib/librte_eal/common/include/rte_pci_dev_ids.h | 60 -
 3 files changed, 20 insertions(+), 64 deletions(-)

diff --git a/drivers/net/i40e/i40e_ethdev.c b/drivers/net/i40e/i40e_ethdev.c
index bf6220d..3213264 100644
--- a/drivers/net/i40e/i40e_ethdev.c
+++ b/drivers/net/i40e/i40e_ethdev.c
@@ -416,8 +416,22 @@ static int i40e_dev_rx_queue_intr_disable(struct 
rte_eth_dev *dev,


 static const struct rte_pci_id pci_id_i40e_map[] = {
-#define RTE_PCI_DEV_ID_DECL_I40E(vend, dev) {RTE_PCI_DEVICE(vend, dev)},
-#include "rte_pci_dev_ids.h"
+{ RTE_PCI_DEVICE(I40E_INTEL_VENDOR_ID, I40E_DEV_ID_SFP_XL710) },
+{ RTE_PCI_DEVICE(I40E_INTEL_VENDOR_ID, I40E_DEV_ID_QEMU) },
+{ RTE_PCI_DEVICE(I40E_INTEL_VENDOR_ID, I40E_DEV_ID_KX_A) },
+{ RTE_PCI_DEVICE(I40E_INTEL_VENDOR_ID, I40E_DEV_ID_KX_B) },
+{ RTE_PCI_DEVICE(I40E_INTEL_VENDOR_ID, I40E_DEV_ID_KX_C) },
+{ RTE_PCI_DEVICE(I40E_INTEL_VENDOR_ID, I40E_DEV_ID_QSFP_A) },
+{ RTE_PCI_DEVICE(I40E_INTEL_VENDOR_ID, I40E_DEV_ID_QSFP_B) },
+{ RTE_PCI_DEVICE(I40E_INTEL_VENDOR_ID, I40E_DEV_ID_QSFP_C) },
+{ RTE_PCI_DEVICE(I40E_INTEL_VENDOR_ID, I40E_DEV_ID_10G_BASE_T) },
+{ RTE_PCI_DEVICE(I40E_INTEL_VENDOR_ID, I40E_DEV_ID_20G_KR2) },
+{ RTE_PCI_DEVICE(I40E_INTEL_VENDOR_ID, I40E_DEV_ID_20G_KR2_A) },
+{ RTE_PCI_DEVICE(I40E_INTEL_VENDOR_ID, I40E_DEV_ID_10G_BASE_T4) },
+{ RTE_PCI_DEVICE(I40E_INTEL_VENDOR_ID, I40E_DEV_ID_X722_A0) },
+{ RTE_PCI_DEVICE(I40E_INTEL_VENDOR_ID, I40E_DEV_ID_SFP_X722) },
+{ RTE_PCI_DEVICE(I40E_INTEL_VENDOR_ID, I40E_DEV_ID_1G_BASE_T_X722) },
+{ RTE_PCI_DEVICE(I40E_INTEL_VENDOR_ID, I40E_DEV_ID_10G_BASE_T_X722) },
 { .vendor_id = 0, /* sentinel */ },
 };

diff --git a/drivers/net/i40e/i40e_ethdev_vf.c 
b/drivers/net/i40e/i40e_ethdev_vf.c
index 14d2a50..fd963fd 100644
--- a/drivers/net/i40e/i40e_ethdev_vf.c
+++ b/drivers/net/i40e/i40e_ethdev_vf.c
@@ -1117,8 +1117,10 @@ i40evf_get_link_status(struct rte_eth_dev *dev, struct 
rte_eth_link *link)
 }

 static const struct rte_pci_id pci_id_i40evf_map[] = {
-#define RTE_PCI_DEV_ID_DECL_I40EVF(vend, dev) {RTE_PCI_DEVICE(vend, dev)},
-#include "rte_pci_dev_ids.h"
+{ RTE_PCI_DEVICE(I40E_INTEL_VENDOR_ID, I40E_DEV_ID_VF) },
+{ RTE_PCI_DEVICE(I40E_INTEL_VENDOR_ID, I40E_DEV_ID_VF_HV) },
+{ RTE_PCI_DEVICE(I40E_INTEL_VENDOR_ID, I40E_DEV_ID_X722_VF) },
+{ RTE_PCI_DEVICE(I40E_INTEL_VENDOR_ID, I40E_DEV_ID_X722_VF_HV) },
 { .vendor_id = 0, /* sentinel */ },
 };

diff --git a/lib/librte_eal/common/include/rte_pci_dev_ids.h 
b/lib/librte_eal/common/include/rte_pci_dev_ids.h
index ab6c4fb..f1f3e13 100644
--- a/lib/librte_eal/common/include/rte_pci_dev_ids.h
+++ b/lib/librte_eal/common/include/rte_pci_dev_ids.h
@@ -68,8 +68,6 @@
  * driver which is a para virtualization driver running in guest virtual 
machine.
  * The inclusion of these in an array built using this file depends on the
  * definition of
- * RTE_PCI_DEV_ID_DECL_I40E
- * RTE_PCI_DEV_ID_DECL_I40EVF
  * RTE_PCI_DEV_ID_DECL_VIRTIO
  * at the time when this file is included.
  *
@@ -91,14 +89,6 @@
  * Note that this file can be included multiple times within the same file.
  */

-#ifndef RTE_PCI_DEV_ID_DECL_I40E
-#define RTE_PCI_DEV_ID_DECL_I40E(vend, dev)
-#endif
-
-#ifndef RTE_PCI_DEV_ID_DECL_I40EVF
-#define RTE_PCI_DEV_ID_DECL_I40EVF(vend, dev)
-#endif
-
 #ifndef RTE_PCI_DEV_ID_DECL_VIRTIO
 #define RTE_PCI_DEV_ID_DECL_VIRTIO(vend, dev)
 #endif
@@ -152,42 +142,6 @@
 #define PCI_VENDOR_ID_BROADCOM 0x14E4
 #endif

-/*** Physical I40E devices from i40e_type.h */
-
-#define I40E_DEV_ID_SFP_XL710   0x1572
-#define I40E_DEV_ID_QEMU0x1574
-#define I40E_DEV_ID_KX_A0x157F
-#define I40E_DEV_ID_KX_B0x1580
-#define I40E_DEV_ID_KX_C0x1581
-#define I40E_DEV_ID_QSFP_A  0x1583
-#define I40E_DEV_ID_QSFP_B  0x1584
-#define I40E_DEV_ID_QSFP_C  0x1585
-#define I40E_DEV_ID_10G_BASE_T  0x1586
-#define I40E_DEV_ID_20G_KR2 0x1587
-#define I40E_DEV_ID_20G_KR2_A   0x1588
-#define I40E_DEV_ID_10G_BASE_T4 0x1589
-#define I40E_DEV_ID_X722_A0 0x374C
-#define I40E_DEV_ID_SFP_X7220x37D0
-#define I40E_DEV_ID_1G_BASE_T_X722  0x37D1
-#define I40E_DEV_ID_10G_BASE_T_X722 0x37D2
-
-RTE_PCI_DEV_ID_DECL_I40E(PCI_VENDOR_ID_INTEL, I40E_DEV_ID_SFP_XL710)
-RTE_PCI_DEV_ID_DECL_I40E(PCI_VENDOR_ID_INTEL, I40E_DEV_ID_QEMU)
-RTE_PCI_DEV_ID_DECL_I40E(PCI_VENDOR_ID_INTEL, I40E_DEV_ID_KX_A)
-RTE_PCI_DEV_ID_DECL_I40E(PCI_VENDOR_ID_INTEL, I40E_DEV_ID_KX_B)
-RTE_PCI_DEV_ID_DECL_I40E(PCI_VENDOR_ID_INTEL, I40E_DEV_ID_KX_C)
-RTE_PCI_DEV_ID_DECL_I40E(PCI_VENDOR_ID_INTEL, I40E_DEV_ID_QSFP_A)

[dpdk-dev] [PATCH 02/11] ixgbe: move pci device ids to driver

2016-01-10 Thread David Marchand
test application and kni still want to know ixgbe pci devices.
So let's create a header in the driver that will be used by them.

Signed-off-by: David Marchand 
---
 app/test-pmd/Makefile   |   2 +
 app/test-pmd/cmdline.c  |   2 +-
 app/test/Makefile   |   1 +
 app/test/test_pci.c |   2 +-
 drivers/net/ixgbe/ixgbe_ethdev.c|   4 +-
 drivers/net/ixgbe/ixgbe_pci_dev_ids.h   | 185 
 lib/librte_eal/common/include/rte_pci_dev_ids.h | 130 -
 lib/librte_eal/linuxapp/kni/Makefile|   1 +
 lib/librte_eal/linuxapp/kni/kni_misc.c  |   4 +-
 9 files changed, 195 insertions(+), 136 deletions(-)
 create mode 100644 drivers/net/ixgbe/ixgbe_pci_dev_ids.h

diff --git a/app/test-pmd/Makefile b/app/test-pmd/Makefile
index 72426f3..a8899b8 100644
--- a/app/test-pmd/Makefile
+++ b/app/test-pmd/Makefile
@@ -64,6 +64,8 @@ ifeq ($(CONFIG_RTE_EXEC_ENV_LINUXAPP),y)
 CFLAGS_mempool_anon.o := -D_GNU_SOURCE
 endif
 CFLAGS_cmdline.o := -D_GNU_SOURCE
+# for bypass pci device ids
+CFLAGS_cmdline.o += -I$(RTE_SDK)/drivers/net/ixgbe

 # this application needs libraries first
 DEPDIRS-y += lib drivers
diff --git a/app/test-pmd/cmdline.c b/app/test-pmd/cmdline.c
index 73298c9..fdb2e1b 100644
--- a/app/test-pmd/cmdline.c
+++ b/app/test-pmd/cmdline.c
@@ -9816,7 +9816,7 @@ cmd_reconfig_device_queue(portid_t id, uint8_t dev, 
uint8_t queue)
 }

 #ifdef RTE_NIC_BYPASS
-#include 
+#include 
 uint8_t
 bypass_is_supported(portid_t port_id)
 {
diff --git a/app/test/Makefile b/app/test/Makefile
index 687ae59..13fed78 100644
--- a/app/test/Makefile
+++ b/app/test/Makefile
@@ -170,6 +170,7 @@ endif

 # pci tests want to know some pci devices ids
 CFLAGS_test_pci.o += -I$(RTE_SDK)/drivers/net/e1000
+CFLAGS_test_pci.o += -I$(RTE_SDK)/drivers/net/ixgbe

 # this application needs libraries first
 DEPDIRS-y += lib drivers
diff --git a/app/test/test_pci.c b/app/test/test_pci.c
index b289138..d6a23d6 100644
--- a/app/test/test_pci.c
+++ b/app/test/test_pci.c
@@ -68,7 +68,7 @@ static int my_driver_init(struct rte_pci_driver *dr,
 struct rte_pci_id my_driver_id[] = {

 #define RTE_PCI_DEV_ID_DECL_IXGBE(vend, dev) {RTE_PCI_DEVICE(vend, dev)},
-#include 
+#include 

 { .vendor_id = 0, /* sentinel */ },
 };
diff --git a/drivers/net/ixgbe/ixgbe_ethdev.c b/drivers/net/ixgbe/ixgbe_ethdev.c
index 4c4c6df..b31f52e 100644
--- a/drivers/net/ixgbe/ixgbe_ethdev.c
+++ b/drivers/net/ixgbe/ixgbe_ethdev.c
@@ -381,7 +381,7 @@ static int ixgbe_timesync_write_time(struct rte_eth_dev 
*dev,
 static const struct rte_pci_id pci_id_ixgbe_map[] = {

 #define RTE_PCI_DEV_ID_DECL_IXGBE(vend, dev) {RTE_PCI_DEVICE(vend, dev)},
-#include "rte_pci_dev_ids.h"
+#include "ixgbe_pci_dev_ids.h"

 { .vendor_id = 0, /* sentinel */ },
 };
@@ -393,7 +393,7 @@ static const struct rte_pci_id pci_id_ixgbe_map[] = {
 static const struct rte_pci_id pci_id_ixgbevf_map[] = {

 #define RTE_PCI_DEV_ID_DECL_IXGBEVF(vend, dev) {RTE_PCI_DEVICE(vend, dev)},
-#include "rte_pci_dev_ids.h"
+#include "ixgbe_pci_dev_ids.h"
 { .vendor_id = 0, /* sentinel */ },

 };
diff --git a/drivers/net/ixgbe/ixgbe_pci_dev_ids.h 
b/drivers/net/ixgbe/ixgbe_pci_dev_ids.h
new file mode 100644
index 000..362a2ce
--- /dev/null
+++ b/drivers/net/ixgbe/ixgbe_pci_dev_ids.h
@@ -0,0 +1,185 @@
+/*-
+ * This file is provided under a dual BSD/GPLv2 license.  When using or
+ *   redistributing this file, you may do so under either license.
+ *
+ *   GPL LICENSE SUMMARY
+ *
+ *   Copyright(c) 2010-2015 Intel Corporation. All rights reserved.
+ *
+ *   This program is free software; you can redistribute it and/or modify
+ *   it under the terms of version 2 of the GNU General Public License as
+ *   published by the Free Software Foundation.
+ *
+ *   This program is distributed in the hope that it will be useful, but
+ *   WITHOUT ANY WARRANTY; without even the implied warranty of
+ *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ *   General Public License for more details.
+ *
+ *   The full GNU General Public License is included in this distribution
+ *   in the file called LICENSE.GPL.
+ *
+ *   Contact Information:
+ *   Intel Corporation
+ *
+ *   BSD LICENSE
+ *
+ *   Copyright(c) 2010-2014 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 

[dpdk-dev] [PATCH 01/11] e1000: move pci device ids to driver

2016-01-10 Thread David Marchand
test application and kni still want to know e1000 pci devices.
So let's create headers in the driver that will be used by them.

Signed-off-by: David Marchand 
---
 app/test/Makefile   |   3 +
 app/test/test_pci.c |   3 +-
 drivers/net/e1000/em_ethdev.c   |   2 +-
 drivers/net/e1000/em_pci_dev_ids.h  | 200 +++
 drivers/net/e1000/igb_ethdev.c  |   4 +-
 drivers/net/e1000/igb_pci_dev_ids.h | 164 
 lib/librte_eal/common/include/rte_pci_dev_ids.h | 245 
 lib/librte_eal/linuxapp/kni/Makefile|   1 +
 lib/librte_eal/linuxapp/kni/kni_misc.c  |   4 +-
 9 files changed, 375 insertions(+), 251 deletions(-)
 create mode 100644 drivers/net/e1000/em_pci_dev_ids.h
 create mode 100644 drivers/net/e1000/igb_pci_dev_ids.h

diff --git a/app/test/Makefile b/app/test/Makefile
index ec33e1a..687ae59 100644
--- a/app/test/Makefile
+++ b/app/test/Makefile
@@ -168,6 +168,9 @@ CFLAGS_test_memcpy_perf.o += -fno-var-tracking-assignments
 endif
 endif

+# pci tests want to know some pci devices ids
+CFLAGS_test_pci.o += -I$(RTE_SDK)/drivers/net/e1000
+
 # this application needs libraries first
 DEPDIRS-y += lib drivers

diff --git a/app/test/test_pci.c b/app/test/test_pci.c
index 5530d99..b289138 100644
--- a/app/test/test_pci.c
+++ b/app/test/test_pci.c
@@ -77,8 +77,9 @@ struct rte_pci_id my_driver_id2[] = {

 /* IGB & EM NICS */
 #define RTE_PCI_DEV_ID_DECL_EM(vend, dev) {RTE_PCI_DEVICE(vend, dev)},
+#include 
 #define RTE_PCI_DEV_ID_DECL_IGB(vend, dev) {RTE_PCI_DEVICE(vend, dev)},
-#include 
+#include 

 { .vendor_id = 0, /* sentinel */ },
 };
diff --git a/drivers/net/e1000/em_ethdev.c b/drivers/net/e1000/em_ethdev.c
index 66e8993..4cf9217 100644
--- a/drivers/net/e1000/em_ethdev.c
+++ b/drivers/net/e1000/em_ethdev.c
@@ -139,7 +139,7 @@ static enum e1000_fc_mode em_fc_setting = e1000_fc_full;
 static const struct rte_pci_id pci_id_em_map[] = {

 #define RTE_PCI_DEV_ID_DECL_EM(vend, dev) {RTE_PCI_DEVICE(vend, dev)},
-#include "rte_pci_dev_ids.h"
+#include "em_pci_dev_ids.h"

 {0},
 };
diff --git a/drivers/net/e1000/em_pci_dev_ids.h 
b/drivers/net/e1000/em_pci_dev_ids.h
new file mode 100644
index 000..c79697b
--- /dev/null
+++ b/drivers/net/e1000/em_pci_dev_ids.h
@@ -0,0 +1,200 @@
+/*-
+ * This file is provided under a dual BSD/GPLv2 license.  When using or
+ *   redistributing this file, you may do so under either license.
+ *
+ *   GPL LICENSE SUMMARY
+ *
+ *   Copyright(c) 2010-2015 Intel Corporation. All rights reserved.
+ *
+ *   This program is free software; you can redistribute it and/or modify
+ *   it under the terms of version 2 of the GNU General Public License as
+ *   published by the Free Software Foundation.
+ *
+ *   This program is distributed in the hope that it will be useful, but
+ *   WITHOUT ANY WARRANTY; without even the implied warranty of
+ *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ *   General Public License for more details.
+ *
+ *   The full GNU General Public License is included in this distribution
+ *   in the file called LICENSE.GPL.
+ *
+ *   Contact Information:
+ *   Intel Corporation
+ *
+ *   BSD LICENSE
+ *
+ *   Copyright(c) 2010-2014 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.
+ *
+ */

[dpdk-dev] [PATCH 00/11] kill global pci device id list

2016-01-10 Thread David Marchand
This patchset moves all pci device ids from eal to the pmds that need them
(patches 1 to 8).
Global pci device id list is then removed (patches 9, 10).

In last patch, all those device ids are put in a dedicated section for
retrieval by external tools.

-- 
David Marchand

David Marchand (11):
  e1000: move pci device ids to driver
  ixgbe: move pci device ids to driver
  i40e: move pci device ids to driver
  fm10k: move pci device ids to driver
  virtio: move pci device ids to driver
  vmxnet3: move pci device ids to driver
  enic: move pci device ids to driver
  bnx2x: move pci device ids to driver
  doc: refresh headers list
  pci: no need for global device ids list
  pci: place all uio pci device ids in a dedicated section

 app/test-pmd/Makefile   |   2 +
 app/test-pmd/cmdline.c  |   2 +-
 app/test/Makefile   |   4 +
 app/test/test_pci.c |   5 +-
 doc/api/doxy-api-index.md   |   1 -
 doc/guides/prog_guide/dev_kit_build_system.rst  |  56 +-
 drivers/crypto/qat/rte_qat_cryptodev.c  |   2 +-
 drivers/net/bnx2x/bnx2x.c   |   3 +-
 drivers/net/bnx2x/bnx2x_ethdev.c|  29 +-
 drivers/net/cxgbe/cxgbe_ethdev.c|   2 +-
 drivers/net/e1000/em_ethdev.c   |   4 +-
 drivers/net/e1000/em_pci_dev_ids.h  | 200 +++
 drivers/net/e1000/igb_ethdev.c  |   8 +-
 drivers/net/e1000/igb_pci_dev_ids.h | 164 ++
 drivers/net/enic/enic_ethdev.c  |  14 +-
 drivers/net/fm10k/fm10k_ethdev.c|  10 +-
 drivers/net/i40e/i40e_ethdev.c  |  20 +-
 drivers/net/i40e/i40e_ethdev_vf.c   |   8 +-
 drivers/net/ixgbe/ixgbe_ethdev.c|   8 +-
 drivers/net/ixgbe/ixgbe_pci_dev_ids.h   | 185 +++
 drivers/net/nfp/nfp_net.c   |   2 +-
 drivers/net/virtio/virtio_ethdev.c  |   7 +-
 drivers/net/vmxnet3/vmxnet3_ethdev.c|   9 +-
 lib/librte_eal/common/Makefile  |   2 +-
 lib/librte_eal/common/include/rte_pci.h |   2 +
 lib/librte_eal/common/include/rte_pci_dev_ids.h | 667 
 lib/librte_eal/linuxapp/kni/Makefile|   2 +
 lib/librte_eal/linuxapp/kni/kni_misc.c  |   8 +-
 28 files changed, 678 insertions(+), 748 deletions(-)
 create mode 100644 drivers/net/e1000/em_pci_dev_ids.h
 create mode 100644 drivers/net/e1000/igb_pci_dev_ids.h
 create mode 100644 drivers/net/ixgbe/ixgbe_pci_dev_ids.h
 delete mode 100644 lib/librte_eal/common/include/rte_pci_dev_ids.h

-- 
1.9.1



[dpdk-dev] [PATCH 03/11] i40e: move pci device ids to driver

2016-01-10 Thread Stephen Hemminger
On Sun, 10 Jan 2016 13:50:46 +0100
David Marchand  wrote:

> +{ RTE_PCI_DEVICE(I40E_INTEL_VENDOR_ID, I40E_DEV_ID_SFP_XL710) },
> +{ RTE_PCI_DEVICE(I40E_INTEL_VENDOR_ID, I40E_DEV_ID_QEMU) },
> +{ RTE_PCI_DEVICE(I40E_INTEL_VENDOR_ID, I40E_DEV_ID_KX_A) },
> +{ RTE_PCI_DEVICE(I40E_INTEL_VENDOR_ID, I40E_DEV_ID_KX_B) }

You should indent the initializers.