On Thu, 2011-03-17 at 07:02 +0200, Michael S. Tsirkin wrote: > So, this just tries to make sure there's enough space for > max packet in the ring, if not - drop and return OK. > Why bother checking beforehand though? > If that's what we want to do, we can just call add_buf and see > if it fails? In add_buf, there is an additional kick, see below. I added check capacity to avoid this, thought it would be better performance. I will retest it w/i add_buf to see the performance difference. if (vq->num_free < out + in) { pr_debug("Can't add buf len %i - avail = %i\n", out + in, vq->num_free); /* FIXME: for historical reasons, we force a notify here if * there are outgoing parts to the buffer. Presumably the * host should service the ring ASAP. */ if (out) vq->notify(&vq->vq); END_USE(vq); return -ENOSPC; } Thanks Shirley -- To unsubscribe from this list: send the line "unsubscribe kvm" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html