Commit 15126bab authored by Dariusz Stojaczyk's avatar Dariusz Stojaczyk Committed by Daniel Verkamp
Browse files

rte_virtio: removed hw->nb_tx_queues field



The field was set, but unused. virtio_hw already has
max_queues field. Since SPDK rte_virtio does not provide
any virtqueue abstraction nb_tx_queues and it's setup
functions are not needed.

Change-Id: Ib9bbdc86e6b6cede13a6cc251331590d6985db66
Signed-off-by: default avatarDariusz Stojaczyk <dariuszx.stojaczyk@intel.com>
Reviewed-on: https://review.gerrithub.io/376345


Tested-by: default avatarSPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: default avatarPawel Wodkowski <pawelx.wodkowski@intel.com>
Reviewed-by: default avatarJim Harris <james.r.harris@intel.com>
Reviewed-by: default avatarDaniel Verkamp <daniel.verkamp@intel.com>
parent 64e80646
Loading
Loading
Loading
Loading
+1 −7
Original line number Diff line number Diff line
@@ -344,7 +344,7 @@ virtio_set_vtpci_ops(struct virtio_hw *hw)
int
eth_virtio_dev_init(struct virtio_hw *hw, int num_queues)
{
	int ret, i;
	int ret;

	if (rte_eal_process_type() == RTE_PROC_SECONDARY) {
		virtio_set_vtpci_ops(hw);
@@ -362,12 +362,6 @@ eth_virtio_dev_init(struct virtio_hw *hw, int num_queues)
	if (ret < 0)
		return ret;

	hw->nb_tx_queues = num_queues;

	for (i = 0; i < num_queues; i++) {
		virtio_dev_tx_queue_setup(hw, i, 512, -1);
	}

	return 0;
}

+0 −7
Original line number Diff line number Diff line
@@ -61,13 +61,6 @@ struct virtio_req {
#define VIRTIO_PMD_SUPPORTED_GUEST_FEATURES	\
	(VIRTIO_PMD_DEFAULT_GUEST_FEATURES)

/*
 * RX/TX function prototypes
 */

int  virtio_dev_tx_queue_setup(struct virtio_hw *hw, uint16_t tx_queue_id,
		uint16_t nb_tx_desc, unsigned int socket_id);

uint16_t virtio_recv_pkts(struct virtqueue *vq, struct virtio_req **reqs,
		uint16_t nb_pkts);

+0 −1
Original line number Diff line number Diff line
@@ -230,7 +230,6 @@ struct virtio_hw {
	void	    *virtio_user_dev;

	struct virtqueue **vqs;
	uint32_t nb_tx_queues;
};


+0 −23
Original line number Diff line number Diff line
@@ -190,29 +190,6 @@ virtqueue_enqueue_xmit(struct virtqueue *vq, struct virtio_req *req)
	vq_update_avail_ring(vq, head_idx);
}

/*
 * struct rte_eth_dev *dev: Used to update dev
 * uint16_t nb_desc: Defaults to values read from config space
 * unsigned int socket_id: Used to allocate memzone
 * const struct rte_eth_txconf *tx_conf: Used to setup tx engine
 * uint16_t queue_idx: Just used as an index in dev txq list
 */
int
virtio_dev_tx_queue_setup(struct virtio_hw *hw,
			uint16_t queue_idx,
			uint16_t nb_desc,
			unsigned int socket_id __rte_unused)
{
	struct virtqueue *vq = hw->vqs[queue_idx];

	PMD_INIT_FUNC_TRACE();

	if (nb_desc == 0 || nb_desc > vq->vq_nentries)
		nb_desc = vq->vq_nentries;
	vq->vq_free_cnt = RTE_MIN(vq->vq_free_cnt, nb_desc);
	return 0;
}

#define VIRTIO_MBUF_BURST_SZ 64
#define DESC_PER_CACHELINE (RTE_CACHE_LINE_SIZE / sizeof(struct vring_desc))
uint16_t