From mboxrd@z Thu Jan 1 00:00:00 1970 From: Olivier Matz Subject: Re: [PATCH 1/6] ethdev: add descriptor status API Date: Thu, 2 Mar 2017 16:14:06 +0100 Message-ID: <20170302161406.77f5177b@platinum> References: <1479981261-19512-1-git-send-email-olivier.matz@6wind.com> <1488388752-1819-1-git-send-email-olivier.matz@6wind.com> <1488388752-1819-2-git-send-email-olivier.matz@6wind.com> <8966736f-3bcb-5096-5c2b-643c65751d5f@solarflare.com> <20170302145752.38b2f820@platinum> <20170302155432.7e81e969@platinum> <27118555-7baa-41e4-ff1e-f4bddec97b43@solarflare.com> Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Cc: , , , , , , , , , To: Andrew Rybchenko Return-path: Received: from mail-wm0-f49.google.com (mail-wm0-f49.google.com [74.125.82.49]) by dpdk.org (Postfix) with ESMTP id 8C6312B88 for ; Thu, 2 Mar 2017 16:14:11 +0100 (CET) Received: by mail-wm0-f49.google.com with SMTP id t193so14441862wmt.1 for ; Thu, 02 Mar 2017 07:14:11 -0800 (PST) In-Reply-To: <27118555-7baa-41e4-ff1e-f4bddec97b43@solarflare.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, 2 Mar 2017 18:05:52 +0300, Andrew Rybchenko wrote: > On 03/02/2017 05:54 PM, Olivier Matz wrote: > >>>>> + * > >>>>> + * @param port_id > >>>>> + * The port identifier of the Ethernet device. > >>>>> + * @param queue_id > >>>>> + * The Rx queue identifier on this port. > >>>>> + * @param offset > >>>>> + * The offset of the descriptor starting from tail (0 is the next > >>>>> + * packet to be received by the driver). > >>>>> + * @return > >>>>> + * - (RTE_ETH_DESC_AVAIL): Descriptor is available for the hardware to > >>>>> + * receive a packet. > >>>>> + * - (RTE_ETH_DESC_DONE): Descriptor is done, it is filled by hw, but > >>>>> + * not yet processed by the driver (i.e. in the receive queue). > >>>>> + * - (RTE_ETH_DESC_USED): Descriptor is unavailable (hold by driver, > >>>>> + * not yet returned to hw). > >>>> It looks like it is the most suitable for descriptors which are reserved > >>>> and never used. > >>> Can you give some more details about what is a reserved but never > >>> used descriptor? (same question for Tx) > >> Our HW has a requirement to keep few descriptors always unused (i.e. > >> some gap between tail and head). It is just a few descriptors, but > >> invalid descriptor status may misguide application. E.g. if Rx queue > >> size is 512 and offset 510, it will always be unused (since it is > >> reserved). It is not an indication that core is too slow and can't keep > >> the pace. > > Understood. > > > > I can change _USED into _UNAVAIL (add it for Tx), with the following > > description: > > > > - (RTE_ETH_DESC_UNAVAIL): Descriptor is unavailable: either hold by driver > > and not yet returned to hw, or reserved by the hardware. > > Looks good. Do I understand correctly that it will be reported for > descriptors which are not refilled (posted to HW) because of rx_free_thresh? > Yes