From mboxrd@z Thu Jan 1 00:00:00 1970 From: Bruce Richardson Subject: Re: [PATCH v5 07/14] ring: make bulk and burst fn return vals consistent Date: Thu, 13 Apr 2017 09:33:09 +0100 Message-ID: <20170413083309.GA40568@bricha3-MOBL3.ger.corp.intel.com> References: <20170328203606.27457-1-bruce.richardson@intel.com> <20170329130941.31190-1-bruce.richardson@intel.com> <20170329130941.31190-8-bruce.richardson@intel.com> <8F6C2BD409508844A0EFC19955BE0941512656FB@SHSMSX103.ccr.corp.intel.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Cc: "olivier.matz@6wind.com" , "dev@dpdk.org" To: "Wang, Zhihong" Return-path: Received: from mga02.intel.com (mga02.intel.com [134.134.136.20]) by dpdk.org (Postfix) with ESMTP id 121B05592 for ; Thu, 13 Apr 2017 10:33:13 +0200 (CEST) Content-Disposition: inline In-Reply-To: <8F6C2BD409508844A0EFC19955BE0941512656FB@SHSMSX103.ccr.corp.intel.com> List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" On Thu, Apr 13, 2017 at 07:42:39AM +0100, Wang, Zhihong wrote: > Hi Bruce, > > This patch changes the behavior and causes some existing code to > malfunction, e.g. bond_ethdev_stop() will get stuck here: > > while (rte_ring_dequeue(port->rx_ring, &pkt) != -ENOENT) > rte_pktmbuf_free(pkt); > > Another example in test/test/virtual_pmd.c: virtual_ethdev_stop(). > > > Thanks > Zhihong > Actually, the behaviour of dequeue function should not be changing, so this error initially confused me. However, it looks like a typo in my patchset, compare function API comment, vs implementation: * @return * - 0: Success, objects dequeued. * - -ENOENT: Not enough entries in the ring to dequeue, no object is * dequeued. rte_ring_dequeue_bulk(r, obj_p, 1, NULL) ? 0 : -ENOBUFS; So it looks like I put in ENOBUFS instead of ENOENT when modifying the line. I'll do up a patch to fix that. /Bruce