Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752127AbaAPAqx (ORCPT ); Wed, 15 Jan 2014 19:46:53 -0500 Received: from shards.monkeyblade.net ([149.20.54.216]:43015 "EHLO shards.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751214AbaAPAqt (ORCPT ); Wed, 15 Jan 2014 19:46:49 -0500 Date: Wed, 15 Jan 2014 16:46:49 -0800 (PST) Message-Id: <20140115.164649.533508366980529205.davem@davemloft.net> To: rusty@rustcorp.com.au Cc: jasowang@redhat.com, mst@redhat.com, virtualization@lists.linux-foundation.org, netdev@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH net-next RFC] virtio-net: drop rq->max and rq->num From: David Miller In-Reply-To: <87zjmwvlzl.fsf@rustcorp.com.au> References: <1388134685-30691-1-git-send-email-jasowang@redhat.com> <87mwixx670.fsf@rustcorp.com.au> <87zjmwvlzl.fsf@rustcorp.com.au> X-Mailer: Mew version 6.5 on Emacs 24.1 / Mule 6.0 (HANACHIRUSATO) Mime-Version: 1.0 Content-Type: Text/Plain; charset=us-ascii Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.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. -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/