summaryrefslogtreecommitdiff
path: root/drivers/net/virtio/virtio_ethdev.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/net/virtio/virtio_ethdev.c')
-rw-r--r--drivers/net/virtio/virtio_ethdev.c10
1 files changed, 4 insertions, 6 deletions
diff --git a/drivers/net/virtio/virtio_ethdev.c b/drivers/net/virtio/virtio_ethdev.c
index 3100087..2272bb2 100644
--- a/drivers/net/virtio/virtio_ethdev.c
+++ b/drivers/net/virtio/virtio_ethdev.c
@@ -168,8 +168,7 @@ virtio_send_command_packed(struct virtnet_ctl *cvq,
nb_descs++;
if (++vq->vq_avail_idx >= vq->vq_nentries) {
vq->vq_avail_idx -= vq->vq_nentries;
- vq->vq_packed.cached_flags ^=
- VRING_DESC_F_AVAIL(1) | VRING_DESC_F_USED(1);
+ vq->vq_packed.cached_flags ^= VRING_PACKED_DESC_F_AVAIL_USED;
}
for (k = 0; k < pkt_num; k++) {
@@ -185,7 +184,7 @@ virtio_send_command_packed(struct virtnet_ctl *cvq,
if (++vq->vq_avail_idx >= vq->vq_nentries) {
vq->vq_avail_idx -= vq->vq_nentries;
vq->vq_packed.cached_flags ^=
- VRING_DESC_F_AVAIL(1) | VRING_DESC_F_USED(1);
+ VRING_PACKED_DESC_F_AVAIL_USED;
}
}
@@ -198,8 +197,7 @@ virtio_send_command_packed(struct virtnet_ctl *cvq,
nb_descs++;
if (++vq->vq_avail_idx >= vq->vq_nentries) {
vq->vq_avail_idx -= vq->vq_nentries;
- vq->vq_packed.cached_flags ^=
- VRING_DESC_F_AVAIL(1) | VRING_DESC_F_USED(1);
+ vq->vq_packed.cached_flags ^= VRING_PACKED_DESC_F_AVAIL_USED;
}
virtio_wmb(vq->hw->weak_barriers);
@@ -502,7 +500,7 @@ virtio_init_queue(struct rte_eth_dev *dev, uint16_t vtpci_queue_idx)
vq->vq_nentries = vq_size;
if (vtpci_packed_queue(hw)) {
vq->vq_packed.used_wrap_counter = 1;
- vq->vq_packed.cached_flags = VRING_DESC_F_AVAIL(1);
+ vq->vq_packed.cached_flags = VRING_PACKED_DESC_F_AVAIL;
vq->vq_packed.event_flags_shadow = 0;
if (queue_type == VTNET_RQ)
vq->vq_packed.cached_flags |= VRING_DESC_F_WRITE;