| 451 | uint16_t num); |
| 452 | |
| 453 | static inline void |
| 454 | vq_update_avail_idx(struct virtqueue *vq) |
| 455 | { |
| 456 | if (vq->hw->weak_barriers) { |
| 457 | /* x86 prefers to using rte_smp_wmb over __atomic_store_n as |
| 458 | * it reports a slightly better perf, which comes from the |
| 459 | * saved branch by the compiler. |
| 460 | * The if and else branches are identical with the smp and |
| 461 | * io barriers both defined as compiler barriers on x86. |
| 462 | */ |
| 463 | #ifdef RTE_ARCH_X86_64 |
| 464 | rte_smp_wmb(); |
| 465 | vq->vq_split.ring.avail->idx = vq->vq_avail_idx; |
| 466 | #else |
| 467 | __atomic_store_n(&vq->vq_split.ring.avail->idx, |
| 468 | vq->vq_avail_idx, __ATOMIC_RELEASE); |
| 469 | #endif |
| 470 | } else { |
| 471 | rte_io_wmb(); |
| 472 | vq->vq_split.ring.avail->idx = vq->vq_avail_idx; |
| 473 | } |
| 474 | } |
| 475 | |
| 476 | static inline void |
| 477 | vq_update_avail_ring(struct virtqueue *vq, uint16_t desc_idx) |
no outgoing calls
no test coverage detected