Message ID | c269a506083c54182af874bbb22a8f31fe23b61e.1565252336.git.thierry.herbelot@6wind.com (mailing list archive) |
---|---|
State | Superseded, archived |
Headers |
Return-Path: <dev-bounces@dpdk.org> X-Original-To: patchwork@dpdk.org Delivered-To: patchwork@dpdk.org Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 4A4D92B9C; Thu, 8 Aug 2019 10:22:59 +0200 (CEST) Received: from mail-wr1-f65.google.com (mail-wr1-f65.google.com [209.85.221.65]) by dpdk.org (Postfix) with ESMTP id E1A7C2A6A for <dev@dpdk.org>; Thu, 8 Aug 2019 10:22:53 +0200 (CEST) Received: by mail-wr1-f65.google.com with SMTP id g17so93976320wrr.5 for <dev@dpdk.org>; Thu, 08 Aug 2019 01:22:53 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=6wind.com; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :in-reply-to:references; bh=1ap8Frg/Gf51xmOYNsf5m9BH5ZgczfUC5RTDt84nhnI=; b=W5CNif+OZ9ojBqOBx53h9zBcvK45SwhfPqrPXEBuxbAPAuMJOPY/sVujpFKyR/vPln 4UbhGYz/Vj6oh84x1ufMhIe2Jb4wumqAGMJNmSxplPIhi/FRiFd7+ZZnMmPx01eNswI/ hfU4ilN3PBKiBQXF+vY/BLa/quzVoZoBDKRcW7N6Bh1Gw2EQOOkXc2Vxi3JsmMi3eGqw d8qdP3/ol5Wt04dCh6HxYHaYa+rClj630ZXftaCGnyRq4Cn/LNHJr6h1gJ7IxUwyHsUJ voji1oJWeezsS8/yGX1xw/ia3ATk5PS+yFZg7J29bPnk3/RaqM/xnMxXSAZcUPlxkVuc xEoA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:in-reply-to:references; bh=1ap8Frg/Gf51xmOYNsf5m9BH5ZgczfUC5RTDt84nhnI=; b=oS0kxdjjErIMO+ToAVGRm8goI0lQ6syG2Bf/FVRvzBuZU724DJcXv5fHucHUhwLAzt N7Mmo6tJPDfq+lHw7qdJTPTUwA+BwFfEPcCbkGp7lJUIaVYqkh9HNNSgHT7BASv7/r9y EHeMsdyjzRGoRVxUN5sBM/2Lv5dSTS4WsYYwVfTPiN+5PZ/TP/jxKguJNOdChgu6S0L1 D6BPJMFNa7wj9v16QuondRlRP8bpJkijm5DLq8EWrJytc3VBRmBEZE/60Naq87yHWxEo mRadkxGKhRSz4TACGXZLJ4lmzuuKgm15NVqYxGQolObh6bMUU9h3nXI108vYPwVr2UAi Mvvg== X-Gm-Message-State: APjAAAVmgrux1xLU6Twmf/HWzYFoRHYBLUBiNqyZk4e9tjwE4VuK+WV5 9G/C5gy0aWgemufePs5GvJDyr7kBCQ== X-Google-Smtp-Source: APXvYqzxAAjFc4ycT32534cBCULrWMEa2WN2EGfZquY0QkmhXGRPMmLKVlBVykg8o7CXqLb70JLX/g== X-Received: by 2002:a05:6000:1189:: with SMTP id g9mr16559011wrx.51.1565252573483; Thu, 08 Aug 2019 01:22:53 -0700 (PDT) Received: from ascain.dev.6wind.com. (host.78.145.23.62.rev.coltfrance.com. [62.23.145.78]) by smtp.gmail.com with ESMTPSA id t13sm111437018wrr.0.2019.08.08.01.22.52 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 08 Aug 2019 01:22:52 -0700 (PDT) From: Thierry Herbelot <thierry.herbelot@6wind.com> To: dev@dpdk.org Cc: Olivier Matz <olivier.matz@6wind.com>, stable@dpdk.org, Thomas Monjalon <thomas@monjalon.net> Date: Thu, 8 Aug 2019 10:22:07 +0200 Message-Id: <c269a506083c54182af874bbb22a8f31fe23b61e.1565252336.git.thierry.herbelot@6wind.com> X-Mailer: git-send-email 2.11.0 In-Reply-To: <cover.1565252336.git.thierry.herbelot@6wind.com> References: <cover.1565252336.git.thierry.herbelot@6wind.com> In-Reply-To: <cover.1565252336.git.thierry.herbelot@6wind.com> References: <cover.1565190405.git.thierry.herbelot@6wind.com> <cover.1565252336.git.thierry.herbelot@6wind.com> Subject: [dpdk-dev] [PATCH 19.11 V3 02/12] ethdev: fix description of tx descriptor status X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK patches and discussions <dev.dpdk.org> List-Unsubscribe: <https://mails.dpdk.org/options/dev>, <mailto:dev-request@dpdk.org?subject=unsubscribe> List-Archive: <http://mails.dpdk.org/archives/dev/> List-Post: <mailto:dev@dpdk.org> List-Help: <mailto:dev-request@dpdk.org?subject=help> List-Subscribe: <https://mails.dpdk.org/listinfo/dev>, <mailto:dev-request@dpdk.org?subject=subscribe> Errors-To: dev-bounces@dpdk.org Sender: "dev" <dev-bounces@dpdk.org> |
Series |
Miscellaneous fixes
|
|
Checks
Context | Check | Description |
---|---|---|
ci/checkpatch | success | coding style OK |
ci/Intel-compilation | fail | Compilation issues |
Commit Message
Thierry Herbelot
Aug. 8, 2019, 8:22 a.m. UTC
From: Olivier Matz <olivier.matz@6wind.com> The API comment of rte_eth_tx_descriptor_status() was incorrect. The reference descriptor (when offset = 0) is not where the next packet will be sent, but where the latest packet has been enqueued. Fixes: 52f5cdd2e897 ("ethdev: add descriptor status API") Cc: stable@dpdk.org Signed-off-by: Olivier Matz <olivier.matz@6wind.com> --- lib/librte_ethdev/rte_ethdev.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
Comments
On 8/8/19 11:22 AM, Thierry Herbelot wrote: > From: Olivier Matz <olivier.matz@6wind.com> > > The API comment of rte_eth_tx_descriptor_status() was incorrect. The > reference descriptor (when offset = 0) is not where the next packet > will be sent, but where the latest packet has been enqueued. > > Fixes: 52f5cdd2e897 ("ethdev: add descriptor status API") > Cc: stable@dpdk.org > > Signed-off-by: Olivier Matz <olivier.matz@6wind.com> > --- > lib/librte_ethdev/rte_ethdev.h | 4 ++-- > 1 file changed, 2 insertions(+), 2 deletions(-) > > diff --git a/lib/librte_ethdev/rte_ethdev.h b/lib/librte_ethdev/rte_ethdev.h > index dc6596bc93b4..b423e71050e9 100644 > --- a/lib/librte_ethdev/rte_ethdev.h > +++ b/lib/librte_ethdev/rte_ethdev.h > @@ -4245,8 +4245,8 @@ rte_eth_rx_descriptor_status(uint16_t port_id, uint16_t queue_id, > * @param queue_id > * A valid Tx queue identifier on this port. > * @param offset > - * The offset of the descriptor starting from tail (0 is the place where > - * the next packet will be send). > + * The offset of the descriptor starting from tail (0 is the last written > + * descriptor). > * > * @return > * - (RTE_ETH_TX_DESC_FULL) Descriptor is being processed by the hw, i.e. The patch lacks explanation why it was wrong before and why it is correct after the patch. I think there is a space here for description improvements since it is still confusing. I'd suggest to remove 'tail' term from the description or write down full description to explain what/where is head and tail. Rx case: V-->offset =========***********----------------00000000000== UNAVAIL DONE AVAIL UNUSED i.e. V points to the next packet to be received by the driver, i.e. the first * (the descriptor is done by HW and packet is ready to be processed). DONE(*) are descriptors filled in by HW, but not processed by the driver yet. AVAIL(-) are available for HW to fill in with received packets. UNUSED(0) (right now it is UNAVAIL as well) are descriptors which can be done AVAIL on Rx queue refill UNAVAIL(=) are reserved Rx ring space which cannot be used The key question for Rx is the length of DONE. Is CPU fast enough to handle incoming traffic? Tx case (where is tail V and why): =========************--------------00000000000== UNAVAIL DONE FULL UNUSED DONE(*) are descriptors processed by HW and should be processed by the driver to free associated mbuf (rte_eth_tx_done_cleanup()) FULL(-) are available for HW to send these packets out, but not processed yet. UNUSED(0) is available space in Tx ring to make it FULL UNAVAIL(=) is reserved Tx ring space which cannot be used I'd say that it should be similar to Rx here, but it looks different in accordance with current description. Above patch fixes it from the first '-' (or the first '0'?) to be the last '-'. What is the main question for Tx status descriptor user?
diff --git a/lib/librte_ethdev/rte_ethdev.h b/lib/librte_ethdev/rte_ethdev.h index dc6596bc93b4..b423e71050e9 100644 --- a/lib/librte_ethdev/rte_ethdev.h +++ b/lib/librte_ethdev/rte_ethdev.h @@ -4245,8 +4245,8 @@ rte_eth_rx_descriptor_status(uint16_t port_id, uint16_t queue_id, * @param queue_id * A valid Tx queue identifier on this port. * @param offset - * The offset of the descriptor starting from tail (0 is the place where - * the next packet will be send). + * The offset of the descriptor starting from tail (0 is the last written + * descriptor). * * @return * - (RTE_ETH_TX_DESC_FULL) Descriptor is being processed by the hw, i.e.