DPDK patches and discussions
 help / color / mirror / Atom feed
From: Zhiyong Yang <zhiyong.yang@intel.com>
To: dev@dpdk.org
Cc: yliu@fridaylinux.org, maxime.coquelin@red.hat,
	Zhiyong Yang <zhiyong.yang@intel.com>
Subject: [dpdk-dev] [PATCH] lib/librte_vhost: mov enum definition from PMD to lib
Date: Fri, 12 Jan 2018 16:12:12 +0800	[thread overview]
Message-ID: <20180112081212.11264-1-zhiyong.yang@intel.com> (raw)

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(-)

diff --git a/drivers/net/vhost/rte_eth_vhost.c b/drivers/net/vhost/rte_eth_vhost.c
index 2536ee4a2..1cd68433f 100644
--- a/drivers/net/vhost/rte_eth_vhost.c
+++ b/drivers/net/vhost/rte_eth_vhost.c
@@ -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"
diff --git a/examples/tep_termination/main.h b/examples/tep_termination/main.h
index 966c63a51..c0aad3613 100644
--- a/examples/tep_termination/main.h
+++ b/examples/tep_termination/main.h
@@ -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;
diff --git a/examples/vhost/main.h b/examples/vhost/main.h
index 764c33afe..ea89b080d 100644
--- a/examples/vhost/main.h
+++ b/examples/vhost/main.h
@@ -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 {
diff --git a/lib/librte_vhost/rte_vhost.h b/lib/librte_vhost/rte_vhost.h
index d33206997..7d7ed1e62 100644
--- a/lib/librte_vhost/rte_vhost.h
+++ b/lib/librte_vhost/rte_vhost.h
@@ -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.
-- 
2.13.3

             reply	other threads:[~2018-01-12  8:25 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-01-12  8:12 Zhiyong Yang [this message]
2018-01-18 13:05 ` Yuanhan Liu

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20180112081212.11264-1-zhiyong.yang@intel.com \
    --to=zhiyong.yang@intel.com \
    --cc=dev@dpdk.org \
    --cc=maxime.coquelin@red.hat \
    --cc=yliu@fridaylinux.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).