From mboxrd@z Thu Jan 1 00:00:00 1970 From: David Miller Subject: Re: [PATCH net-next RFC] virtio-net: drop rq->max and rq->num Date: Wed, 15 Jan 2014 16:46:49 -0800 (PST) Message-ID: <20140115.164649.533508366980529205.davem@davemloft.net> References: <1388134685-30691-1-git-send-email-jasowang@redhat.com> <87mwixx670.fsf@rustcorp.com.au> <87zjmwvlzl.fsf@rustcorp.com.au> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <87zjmwvlzl.fsf@rustcorp.com.au> List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: virtualization-bounces@lists.linux-foundation.org Errors-To: virtualization-bounces@lists.linux-foundation.org To: rusty@rustcorp.com.au Cc: netdev@vger.kernel.org, virtualization@lists.linux-foundation.org, linux-kernel@vger.kernel.org, mst@redhat.com List-Id: virtualization@lists.linuxfoundation.org From: Rusty Russell Date: Thu, 16 Jan 2014 10:25:26 +1030 > Rusty Russell writes: >> Jason Wang writes: >>> 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 Jason please repost this with Rusty's ACK, thanks.