From: Yuanhan Liu Date: Sat, 1 Apr 2017 07:22:50 +0000 (+0800) Subject: vhost: drop the Rx and Tx queue macro X-Git-Tag: spdx-start~3888 X-Git-Url: http://git.droids-corp.org/?a=commitdiff_plain;h=f53cf83980451f5f930037daef4af15e0011266f;p=dpdk.git vhost: drop the Rx and Tx queue macro They are virtio-net specific and should be defined inside the virtio-net driver. Signed-off-by: Yuanhan Liu Reviewed-by: Maxime Coquelin --- diff --git a/doc/guides/rel_notes/release_17_05.rst b/doc/guides/rel_notes/release_17_05.rst index fa305476c7..4759ce8358 100644 --- a/doc/guides/rel_notes/release_17_05.rst +++ b/doc/guides/rel_notes/release_17_05.rst @@ -299,6 +299,12 @@ API Changes * The vhost API ``rte_vhost_get_queue_num`` is deprecated, instead, ``rte_vhost_get_vring_num`` should be used. + * Following macros are removed in ``rte_virtio_net.h`` + + * ``VIRTIO_RXQ`` + * ``VIRTIO_TXQ`` + * ``VIRTIO_QNUM`` + ABI Changes ----------- diff --git a/drivers/net/vhost/rte_eth_vhost.c b/drivers/net/vhost/rte_eth_vhost.c index 5feb79cc5f..b355c526fa 100644 --- a/drivers/net/vhost/rte_eth_vhost.c +++ b/drivers/net/vhost/rte_eth_vhost.c @@ -45,6 +45,8 @@ #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 c0ea766764..8ed817d464 100644 --- a/examples/tep_termination/main.h +++ b/examples/tep_termination/main.h @@ -54,6 +54,8 @@ /* 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 6bb42e8990..7a3d251fc3 100644 --- a/examples/vhost/main.h +++ b/examples/vhost/main.h @@ -41,6 +41,8 @@ #define RTE_LOGTYPE_VHOST_DATA RTE_LOGTYPE_USER2 #define RTE_LOGTYPE_VHOST_PORT RTE_LOGTYPE_USER3 +enum {VIRTIO_RXQ, VIRTIO_TXQ, VIRTIO_QNUM}; + struct device_statistics { uint64_t tx; uint64_t tx_total; diff --git a/lib/librte_vhost/rte_virtio_net.h b/lib/librte_vhost/rte_virtio_net.h index 52915b33c5..6e07de9f06 100644 --- a/lib/librte_vhost/rte_virtio_net.h +++ b/lib/librte_vhost/rte_virtio_net.h @@ -55,9 +55,6 @@ #define RTE_VHOST_USER_NO_RECONNECT (1ULL << 1) #define RTE_VHOST_USER_DEQUEUE_ZERO_COPY (1ULL << 2) -/* Enum for virtqueue management. */ -enum {VIRTIO_RXQ, VIRTIO_TXQ, VIRTIO_QNUM}; - /** * Information relating to memory regions including offsets to * addresses in QEMUs memory file. diff --git a/lib/librte_vhost/vhost_user.c b/lib/librte_vhost/vhost_user.c index 9140f60954..604d95da9a 100644 --- a/lib/librte_vhost/vhost_user.c +++ b/lib/librte_vhost/vhost_user.c @@ -233,6 +233,8 @@ numa_realloc(struct virtio_net *dev, int index) struct vhost_virtqueue *old_vq, *vq; int ret; + enum {VIRTIO_RXQ, VIRTIO_TXQ, VIRTIO_QNUM}; + old_dev = dev; vq = old_vq = dev->virtqueue[index];