From mboxrd@z Thu Jan 1 00:00:00 1970 From: Neil Horman Subject: Re: Bulk dequeue of packets and the returned values, question Date: Sun, 28 Sep 2014 16:44:01 -0400 Message-ID: <20140928204401.GB4012@localhost.localdomain> References: Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Cc: "" To: "Wiles, Roger Keith" Return-path: Content-Disposition: inline In-Reply-To: List-Id: patches and discussions about DPDK List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces-VfR2kkLFssw@public.gmane.org Sender: "dev" 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 f= ixed 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 ze= ro in the variable case, correct? >=20 Yes, that seems right. > If these are true then why not have the routines return < 0 on error a= nd >=3D 0 on success. Which means a dequeue from a fixed ring would retur= n only =E2=80=99requested size n=E2=80=99 or < 0 if you error off the 0 c= ase. The 0 case could be OK, if you allow zero to be return on a empty ri= ng for the fixed ring case. >=20 > Does this make sense to anyone? >=20 I agree, I don't see why the behavior is bifurcated the way it is, its nonsensical. Neil > Thanks > ++Keith >=20 > Keith Wiles, Principal Technologist with CTO office, Wind River mobile = 972-213-5533 >=20 >=20