From mboxrd@z Thu Jan 1 00:00:00 1970 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) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=6wind-com.20150623.gappssmtp.com; s=20150623; h=date:from:to:cc:subject:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=gJTxovJjcdIA77RmCeIAc5gsUVdH1kI63t4A7zwiJTs=; b=Uq05WkqnBI8hlRhvUUVFH4pnLQa27YH6y+ZzSvD8nvj8Z0WIIUU5MjWgFsjkzWPg+x iqChwiyjB9MbERkno3wK6T3YckZnX2j0toTDLQr8DSsZUVkijNFcAxKI4XE5cY6diZPM 5v4Ett1mqkOLBmx9daUfQxe90YVsHU5h1PbKQi5SMoKz6y3IGOJgj2TEN2WH7yIZlqqw aGHRoSySSPyW38M8MY+a/VJHkWVjWnEHgjrlk2ucTRJEMYP7heFOGSkjS+bJ2fz5IiQA JApzQR0Sy/rhCB6AlVWa/p53QYNT5lEU9MPqBnPJmn9I+J6qrqwc5C9qhYtWT3KtLhWY 31qw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=gJTxovJjcdIA77RmCeIAc5gsUVdH1kI63t4A7zwiJTs=; b=mi2yleplEVmFG5YkHwaNNphqkZD4+kc+q39Pv9UBfym9ggoH5ad8zOeZ+wncaglCVc t3p5zAwXiU0/Xg9FP7hs6AAH2s8scjjCGh8jL+U19A48i7o5tCuB5NWqOoX9oUYpgoEu UQ4xiktvhCsqwf8DE8LmDX6PlPqtWrYHWPR0TUXNpq87jJyv3hIsXu5WqZsxg0NiP+uX KMEJtC7wcFChB0q+ZUluShW6f+VaYZdhB/MMUTAs9qfi7dF5CRE7XF/NGV7a5kyyzwtC 8Kr9bEUHtleMFCYWW4wEqsE2mMQRv/YEX1L7GCOZosjvIziAYZPJeM6B9RlJpxQe/dFh VEmA== X-Gm-Message-State: AMke39mM8pgVx3hQApdYerazXytMXFksMvIPb8NWxQmyEJJ9CqAwpq4oA0Ai2TudcAoDUSu+ X-Received: by 10.28.47.7 with SMTP id v7mr8251779wmv.138.1488467650913; Thu, 02 Mar 2017 07:14:10 -0800 (PST) Received: from platinum (2a01cb0c03c651000226b0fffeed02fc.ipv6.abo.wanadoo.fr. [2a01:cb0c:3c6:5100:226:b0ff:feed:2fc]) by smtp.gmail.com with ESMTPSA id e16sm11285947wra.36.2017.03.02.07.14.10 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Thu, 02 Mar 2017 07:14:10 -0800 (PST) Date: Thu, 2 Mar 2017 16:14:06 +0100 From: Olivier Matz To: Andrew Rybchenko Cc: , , , , , , , , , Message-ID: <20170302161406.77f5177b@platinum> In-Reply-To: <27118555-7baa-41e4-ff1e-f4bddec97b43@solarflare.com> 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> X-Mailer: Claws Mail 3.14.1 (GTK+ 2.24.31; x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Subject: Re: [dpdk-dev] [PATCH 1/6] ethdev: add descriptor status API 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, 02 Mar 2017 15:14:11 -0000 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