Re: [PATCH net-next RFC] virtio-net: drop rq->max and rq->num
From: David Miller <davem@davemloft.net>
Date: 2014-01-16 00:46:53
Also in:
lkml, virtualization
From: David Miller <davem@davemloft.net>
Date: 2014-01-16 00:46:53
Also in:
lkml, virtualization
From: Rusty Russell <redacted> Date: Thu, 16 Jan 2014 10:25:26 +1030
Rusty Russell [off-list ref] writes:quoted
Jason Wang [off-list ref] writes:quoted
It looks like there's no need for those two fields: - Unless there's a failure for the first refill try, rq->max should be always equal to the vring size. - rq->num is only used to determine the condition that we need to do the refill, we could check vq->num_free instead. - rq->num was required to be increased or decreased explicitly after each get/put which results a bad API. So this patch removes them both to make the code simpler.Nice. These fields date from when the vq struct was opaque. Applied, Rusty.Oops, this doesn't require any core virtio changes, so it's for DaveM: Acked-by: Rusty Russell <redacted>
Jason please repost this with Rusty's ACK, thanks.