DPDK patches and discussions
 help / color / mirror / Atom feed
From: Ferruh Yigit <ferruh.yigit@intel.com>
To: Stephen Hemminger <stephen@networkplumber.org>, dev@dpdk.org
Subject: Re: [dpdk-dev] [PATCH v2 2/4] net/netvsc: implement rx/tx descriptor status functions
Date: Thu, 7 May 2020 16:27:49 +0100	[thread overview]
Message-ID: <b1fc7cbc-5f9a-1304-36d8-273f4586dde9@intel.com> (raw)
In-Reply-To: <20200506195221.26306-3-stephen@networkplumber.org>

On 5/6/2020 8:52 PM, Stephen Hemminger wrote:
> These functions are useful for applications and debugging.
> The netvsc PMD also transparently handles the rx/tx descriptor
> functions for underlying VF device.
> 
> Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>

<...>

> +int hn_dev_rx_queue_status(void *arg, uint16_t offset)
> +{
> +	const struct hn_rx_queue *rxq = arg;
> +
> +	hn_process_events(rxq->hv, rxq->queue_id, 0);
> +	if (offset >= rxq->rx_ring->capacity)
> +		return -EINVAL;
> +	else if (offset < rte_ring_count(rxq->rx_ring))

Is this logic correct, can we compare 'offset' with used entry count in circular
buffer?

> +		return RTE_ETH_RX_DESC_DONE;
> +	else
> +		return RTE_ETH_RX_DESC_AVAIL;
> +}

Can't there be descriptors with 'RTE_ETH_RX_DESC_UNAVAIL' status?

  reply	other threads:[~2020-05-07 15:27 UTC|newest]

Thread overview: 23+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-05-06 19:27 [dpdk-dev] [PATCH 0/4] net/netvsc: diagnostic enhancements Stephen Hemminger
2020-05-06 19:27 ` [dpdk-dev] [PATCH 1/4] net/netvsc: support per-queue info requests Stephen Hemminger
2020-05-06 19:27 ` [dpdk-dev] [PATCH 2/4] net/netvsc: implement rx/tx descriptor status functions Stephen Hemminger
2020-05-06 19:27 ` [dpdk-dev] [PATCH 3/4] net/netvsc: change tx/rx error handling Stephen Hemminger
2020-05-06 19:27 ` [dpdk-dev] [PATCH 4/4] bus/vmbus: improve debug output Stephen Hemminger
2020-05-06 19:52 ` [dpdk-dev] [PATCH v2 0/4] net/netvsc: diagnostic enhancements Stephen Hemminger
2020-05-06 19:52   ` [dpdk-dev] [PATCH v2 1/4] net/netvsc: support per-queue info requests Stephen Hemminger
2020-05-06 19:52   ` [dpdk-dev] [PATCH v2 2/4] net/netvsc: implement rx/tx descriptor status functions Stephen Hemminger
2020-05-07 15:27     ` Ferruh Yigit [this message]
2020-05-06 19:52   ` [dpdk-dev] [PATCH v2 3/4] net/netvsc: change tx/rx error handling Stephen Hemminger
2020-05-07 15:29     ` Ferruh Yigit
2020-05-06 19:52   ` [dpdk-dev] [PATCH v2 4/4] bus/vmbus: improve debug output Stephen Hemminger
2020-05-19 16:52 ` [dpdk-dev] [PATCH v3 0/7] net/netvsc: VF bug fix and diagnostic support Stephen Hemminger
2020-05-19 16:52   ` [dpdk-dev] [PATCH v3 1/7] net/netvsc: support per-queue info requests Stephen Hemminger
2020-05-19 16:52   ` [dpdk-dev] [PATCH v3 2/7] net/netvsc: implement rx/tx descriptor status functions Stephen Hemminger
2020-05-27 18:14     ` Ferruh Yigit
2020-05-27 21:00       ` Stephen Hemminger
2020-05-19 16:52   ` [dpdk-dev] [PATCH v3 3/7] net/netvsc: change tx/rx logging Stephen Hemminger
2020-05-19 16:52   ` [dpdk-dev] [PATCH v3 4/7] net/netvsc: fix warning when VF is removed Stephen Hemminger
2020-05-19 16:52   ` [dpdk-dev] [PATCH v3 5/7] net/netvsc: don't query VF link state Stephen Hemminger
2020-05-19 16:52   ` [dpdk-dev] [PATCH v3 6/7] net/netvsc: process link change messages in alarm Stephen Hemminger
2020-05-19 16:52   ` [dpdk-dev] [PATCH v3 7/7] net/netvsc: do not spin forever waiting for reply Stephen Hemminger
2020-05-27 18:16   ` [dpdk-dev] [PATCH v3 0/7] net/netvsc: VF bug fix and diagnostic support Ferruh Yigit

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=b1fc7cbc-5f9a-1304-36d8-273f4586dde9@intel.com \
    --to=ferruh.yigit@intel.com \
    --cc=dev@dpdk.org \
    --cc=stephen@networkplumber.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).