[dpdk-dev] lib/librte_vhost: mov enum definition from PMD to lib
Checks
Commit Message
The enum definition is placed in librte_vhost in order to avoid many
duplication definitions in PMD and example code everywhere.
Signed-off-by: Zhiyong Yang <zhiyong.yang@intel.com>
---
drivers/net/vhost/rte_eth_vhost.c | 2 --
examples/tep_termination/main.h | 2 --
examples/vhost/main.h | 2 --
lib/librte_vhost/rte_vhost.h | 2 ++
4 files changed, 2 insertions(+), 6 deletions(-)
Comments
On Fri, Jan 12, 2018 at 04:12:12PM +0800, Zhiyong Yang wrote:
> The enum definition is placed in librte_vhost in order to avoid many
> duplication definitions in PMD and example code everywhere.
I moved them out from rte_vhost.h on purpose, for they are virtio-net
specific while this library is not.
So nack.
--yliu
@@ -46,8 +46,6 @@
#include "rte_eth_vhost.h"
-enum {VIRTIO_RXQ, VIRTIO_TXQ, VIRTIO_QNUM};
-
#define ETH_VHOST_IFACE_ARG "iface"
#define ETH_VHOST_QUEUES_ARG "queues"
#define ETH_VHOST_CLIENT_ARG "client"
@@ -25,8 +25,6 @@
/* Max number of devices. Limited by the application. */
#define MAX_DEVICES 64
-enum {VIRTIO_RXQ, VIRTIO_TXQ, VIRTIO_QNUM};
-
/* Per-device statistics struct */
struct device_statistics {
uint64_t tx_total;
@@ -14,8 +14,6 @@
#define RTE_LOGTYPE_VHOST_DATA RTE_LOGTYPE_USER2
#define RTE_LOGTYPE_VHOST_PORT RTE_LOGTYPE_USER3
-enum {VIRTIO_RXQ, VIRTIO_TXQ, VIRTIO_QNUM};
-
#define MAX_PKT_BURST 32 /* Max burst size for RX/TX */
struct device_statistics {
@@ -29,6 +29,8 @@ extern "C" {
#define RTE_VHOST_USER_DEQUEUE_ZERO_COPY (1ULL << 2)
#define RTE_VHOST_USER_IOMMU_SUPPORT (1ULL << 3)
+enum {VIRTIO_RXQ, VIRTIO_TXQ, VIRTIO_QNUM};
+
/**
* Information relating to memory regions including offsets to
* addresses in QEMUs memory file.