From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from smtp.tuxdriver.com (charlotte.tuxdriver.com [70.61.120.58]) by dpdk.org (Postfix) with ESMTP id 089E711F5 for ; Sun, 28 Sep 2014 22:37:32 +0200 (CEST) Received: from [2001:470:8:a08:215:ff:fecc:4872] (helo=localhost) by smtp.tuxdriver.com with esmtpsa (TLSv1:AES128-SHA:128) (Exim 4.63) (envelope-from ) id 1XYLK5-0006wM-WD; Sun, 28 Sep 2014 16:44:03 -0400 Date: Sun, 28 Sep 2014 16:44:01 -0400 From: Neil Horman To: "Wiles, Roger Keith" Message-ID: <20140928204401.GB4012@localhost.localdomain> References: MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: User-Agent: Mutt/1.5.23 (2014-03-12) X-Spam-Score: -2.9 (--) X-Spam-Status: No Cc: "" Subject: Re: [dpdk-dev] Bulk dequeue of packets and the returned values, question X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: patches and discussions about DPDK List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 28 Sep 2014 20:37:32 -0000 On Sun, Sep 28, 2014 at 06:04:42PM +0000, Wiles, Roger Keith wrote: > I am also looking at the bulk dequeue routines, which the ring can be fixed or variable. On fixed < 0 on error is returned and 0 if successful. On a variable ring < 0 on error or n on success, but I think n can be zero in the variable case, correct? > Yes, that seems right. > If these are true then why not have the routines return < 0 on error and >= 0 on success. Which means a dequeue from a fixed ring would return only ’requested size n’ or < 0 if you error off the 0 case. The 0 case could be OK, if you allow zero to be return on a empty ring for the fixed ring case. > > Does this make sense to anyone? > I agree, I don't see why the behavior is bifurcated the way it is, its nonsensical. Neil > Thanks > ++Keith > > Keith Wiles, Principal Technologist with CTO office, Wind River mobile 972-213-5533 > >