vhost: inline vhost_vring_desc_is_wr()
This is executed on hot path for I/O. Inline it. Signed-off-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com> Change-Id: I6ded0dd3c15e81954350a9eb372156e9d38f87e4 Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/1725 Tested-by: SPDK CI Jenkins <sys_sgci@intel.com> Community-CI: Mellanox Build Bot Reviewed-by: Jim Harris <james.r.harris@intel.com> Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com> Reviewed-by: Ben Walker <benjamin.walker@intel.com>
This commit is contained in:
parent
6a29c6a906
commit
693ca39917
@ -704,12 +704,6 @@ vhost_vring_desc_get_next(struct vring_desc **desc,
|
||||
return 0;
|
||||
}
|
||||
|
||||
bool
|
||||
vhost_vring_desc_is_wr(struct vring_desc *cur_desc)
|
||||
{
|
||||
return !!(cur_desc->flags & VRING_DESC_F_WRITE);
|
||||
}
|
||||
|
||||
int
|
||||
vhost_vring_desc_to_iov(struct spdk_vhost_session *vsession, struct iovec *iov,
|
||||
uint16_t *iov_index, const struct vring_desc *desc)
|
||||
|
@ -332,7 +332,11 @@ void vhost_vq_packed_ring_enqueue(struct spdk_vhost_session *vsession,
|
||||
*/
|
||||
int vhost_vring_desc_get_next(struct vring_desc **desc,
|
||||
struct vring_desc *desc_table, uint32_t desc_table_size);
|
||||
bool vhost_vring_desc_is_wr(struct vring_desc *cur_desc);
|
||||
static inline bool
|
||||
vhost_vring_desc_is_wr(struct vring_desc *cur_desc)
|
||||
{
|
||||
return !!(cur_desc->flags & VRING_DESC_F_WRITE);
|
||||
}
|
||||
|
||||
int vhost_vring_desc_to_iov(struct spdk_vhost_session *vsession, struct iovec *iov,
|
||||
uint16_t *iov_index, const struct vring_desc *desc);
|
||||
|
Loading…
Reference in New Issue
Block a user