diff options
author | Mohsin Kazmi <sykazmi@cisco.com> | 2022-02-01 18:35:59 +0000 |
---|---|---|
committer | Damjan Marion <dmarion@me.com> | 2022-03-01 16:08:11 +0000 |
commit | 0f8912f0d6af49ec8093e3c478b48767a00b3710 (patch) | |
tree | c919de059799fb89029f470c96b81cffa9dacec3 /src/vnet/devices/virtio/vhost_user_inline.h | |
parent | 855ad3373ee9257ce7c917b90c638bd2f8a76da4 (diff) |
virtio: refactor code
Type: refactor
Signed-off-by: Mohsin Kazmi <sykazmi@cisco.com>
Change-Id: I3788cc857023fafcc8eb6d6ff4524425026a75d8
Diffstat (limited to 'src/vnet/devices/virtio/vhost_user_inline.h')
-rw-r--r-- | src/vnet/devices/virtio/vhost_user_inline.h | 23 |
1 files changed, 13 insertions, 10 deletions
diff --git a/src/vnet/devices/virtio/vhost_user_inline.h b/src/vnet/devices/virtio/vhost_user_inline.h index 5297453c317..8bdff3733a7 100644 --- a/src/vnet/devices/virtio/vhost_user_inline.h +++ b/src/vnet/devices/virtio/vhost_user_inline.h @@ -199,12 +199,15 @@ vhost_user_log_dirty_pages_2 (vhost_user_intf_t * vui, } } - -#define vhost_user_log_dirty_ring(vui, vq, member) \ - if (PREDICT_FALSE(vq->log_used)) { \ - vhost_user_log_dirty_pages_2(vui, vq->log_guest_addr + STRUCT_OFFSET_OF(vring_used_t, member), \ - sizeof(vq->used->member), 0); \ - } +#define vhost_user_log_dirty_ring(vui, vq, member) \ + if (PREDICT_FALSE (vq->log_used)) \ + { \ + vhost_user_log_dirty_pages_2 ( \ + vui, \ + vq->log_guest_addr + \ + STRUCT_OFFSET_OF (vnet_virtio_vring_used_t, member), \ + sizeof (vq->used->member), 0); \ + } static_always_inline u8 * format_vhost_trace (u8 * s, va_list * va) @@ -425,7 +428,7 @@ vhost_user_advance_last_avail_table_idx (vhost_user_intf_t * vui, { if (chained) { - vring_packed_desc_t *desc_table = vring->packed_desc; + vnet_virtio_vring_packed_desc_t *desc_table = vring->packed_desc; /* pick up the slot of the next avail idx */ while (desc_table[vring->last_avail_idx & vring->qsz_mask].flags & @@ -449,9 +452,9 @@ vhost_user_undo_advanced_last_avail_idx (vhost_user_vring_t * vring) } static_always_inline void -vhost_user_dequeue_descs (vhost_user_vring_t * rxvq, - virtio_net_hdr_mrg_rxbuf_t * hdr, - u16 * n_descs_processed) +vhost_user_dequeue_descs (vhost_user_vring_t *rxvq, + vnet_virtio_net_hdr_mrg_rxbuf_t *hdr, + u16 *n_descs_processed) { u16 i; |