From mboxrd@z Thu Jan 1 00:00:00 1970 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) Received: from orsmga004.jf.intel.com ([10.7.209.38]) by orsmga101.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 13 Apr 2017 01:33:12 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.37,194,1488873600"; d="scan'208";a="76878296" Received: from bricha3-mobl3.ger.corp.intel.com ([10.237.221.140]) by orsmga004.jf.intel.com with SMTP; 13 Apr 2017 01:33:11 -0700 Received: by (sSMTP sendmail emulation); Thu, 13 Apr 2017 09:33:10 +0100 Date: Thu, 13 Apr 2017 09:33:09 +0100 From: Bruce Richardson To: "Wang, Zhihong" Cc: "olivier.matz@6wind.com" , "dev@dpdk.org" 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 Content-Disposition: inline In-Reply-To: <8F6C2BD409508844A0EFC19955BE0941512656FB@SHSMSX103.ccr.corp.intel.com> Organization: Intel Research and =?iso-8859-1?Q?De=ACvel?= =?iso-8859-1?Q?opment?= Ireland Ltd. User-Agent: Mutt/1.8.0 (2017-02-23) Subject: Re: [dpdk-dev] [PATCH v5 07/14] ring: make bulk and burst fn return vals consistent X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 13 Apr 2017 08:33:14 -0000 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