Code Review
/
deb_dpdk.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
review
|
tree
raw
|
inline
| side by side
New upstream version 16.11.5
[deb_dpdk.git]
/
drivers
/
net
/
virtio
/
virtqueue.h
diff --git
a/drivers/net/virtio/virtqueue.h
b/drivers/net/virtio/virtqueue.h
index
ec967a5
..
3748f60
100644
(file)
--- a/
drivers/net/virtio/virtqueue.h
+++ b/
drivers/net/virtio/virtqueue.h
@@
-288,10
+288,10
@@
void virtqueue_dump(struct virtqueue *vq);
/**
* Get all mbufs to be freed.
*/
/**
* Get all mbufs to be freed.
*/
-struct rte_mbuf *virtqueue_deta
t
ch_unused(struct virtqueue *vq);
+struct rte_mbuf *virtqueue_detach_unused(struct virtqueue *vq);
/* Flush the elements in the used ring. */
/* Flush the elements in the used ring. */
-void virtqueue_flush(struct virtqueue *vq);
+void virtqueue_
rxvq_
flush(struct virtqueue *vq);
static inline int
virtqueue_full(const struct virtqueue *vq)
static inline int
virtqueue_full(const struct virtqueue *vq)
@@
-299,6
+299,17
@@
virtqueue_full(const struct virtqueue *vq)
return vq->vq_free_cnt == 0;
}
return vq->vq_free_cnt == 0;
}
+static inline int
+virtio_get_queue_type(struct virtio_hw *hw, uint16_t vtpci_queue_idx)
+{
+ if (vtpci_queue_idx == hw->max_queue_pairs * 2)
+ return VTNET_CQ;
+ else if (vtpci_queue_idx % 2 == 0)
+ return VTNET_RQ;
+ else
+ return VTNET_TQ;
+}
+
#define VIRTQUEUE_NUSED(vq) ((uint16_t)((vq)->vq_ring.used->idx - (vq)->vq_used_cons_idx))
void vq_ring_free_chain(struct virtqueue *vq, uint16_t desc_idx);
#define VIRTQUEUE_NUSED(vq) ((uint16_t)((vq)->vq_ring.used->idx - (vq)->vq_used_cons_idx))
void vq_ring_free_chain(struct virtqueue *vq, uint16_t desc_idx);