Commit 8c6bd597 authored by Dariusz Stojaczyk's avatar Dariusz Stojaczyk Committed by Jim Harris
Browse files

virtio: remove unnecessary if



This `if` came from the original DPDK virtio PMD.
Generally, we do not want to trigger cache coherency
updates if we don't have to, but in this particular
case we know we always do.

If there were no changes to the avail index, there
would be no requests started and the function would
return much earlier.

Change-Id: Ic1231cf82288c1cb95dc89346f54d51849b8bae9
Signed-off-by: default avatarDariusz Stojaczyk <dariuszx.stojaczyk@intel.com>
Reviewed-on: https://review.gerrithub.io/415589


Reviewed-by: default avatarDaniel Verkamp <daniel.verkamp@intel.com>
Reviewed-by: default avatarJim Harris <james.r.harris@intel.com>
Tested-by: default avatarSPDK Automated Test System <sys_sgsw@intel.com>
parent ba43426c
Loading
Loading
Loading
Loading
+1 −3
Original line number Diff line number Diff line
@@ -460,9 +460,7 @@ virtqueue_req_flush(struct virtqueue *vq)
	 * descriptor.
	 */
	avail_idx = (uint16_t)(vq->vq_avail_idx & (vq->vq_nentries - 1));
	if (spdk_unlikely(vq->vq_ring.avail->ring[avail_idx] != vq->req_start)) {
	vq->vq_ring.avail->ring[avail_idx] = vq->req_start;
	}

	vq->vq_avail_idx++;
	vq->req_start = VQ_RING_DESC_CHAIN_END;