DPDK patches and discussions
 help / color / mirror / Atom feed
From: Thomas Monjalon <thomas@monjalon.net>
To: dev@dpdk.org
Cc: ferruh.yigit@intel.com
Subject: Re: [dpdk-dev] [PATCH v2 0/3] ethdev: fix ports enumeration
Date: Wed, 18 Apr 2018 00:22:47 +0200	[thread overview]
Message-ID: <3054863.hexJULFvxB@xps> (raw)
In-Reply-To: <20180405153322.5488-1-thomas@monjalon.net>

05/04/2018 17:33, Thomas Monjalon:
> Some DPDK applications wrongly assume these requirements:
>   - no hotplug, i.e. ports are never detached
>   - all allocated ports are available to the application
> 
> Such application iterates over ports by its own mean.
> The most common pattern is to request the port count and
> assume ports with index in the range [0..count[ can be used.
> 
> There are three consequences when using such wrong design:
>   - new ports having an index higher than the port count won't be seen
>   - old ports being detached (RTE_ETH_DEV_UNUSED) can be seen as ghosts
>   - failsafe sub-devices (RTE_ETH_DEV_DEFERRED) will be seen by the application
> 
> Such mistake will be less common with growing hotplug awareness.
> All applications and examples inside this repository - except testpmd -
> must be fixed to use the iterator RTE_ETH_FOREACH_DEV,
> and to use the function rte_eth_dev_is_valid_port.
> 
> In order to fix this common mistake in all external applications,
> the function rte_eth_dev_count is deprecated, while introducing
> the new functions rte_eth_dev_count_avail and rte_eth_dev_count_total.


The RFC was sent on 9th of March, and this v2 is available since 5th of April,
without any comment.

Applied

      parent reply	other threads:[~2018-04-17 22:22 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-03-09 22:22 [dpdk-dev] [RFC PATCH] " Thomas Monjalon
2018-04-05 15:33 ` [dpdk-dev] [PATCH v2 0/3] " Thomas Monjalon
2018-04-05 15:33   ` [dpdk-dev] [PATCH v2 1/3] fix ethdev " Thomas Monjalon
2018-04-05 15:33   ` [dpdk-dev] [PATCH v2 2/3] fix ethdev port id validation Thomas Monjalon
2018-04-05 15:33   ` [dpdk-dev] [PATCH v2 3/3] ethdev: deprecate port count function Thomas Monjalon
2018-04-17 22:22   ` Thomas Monjalon [this message]

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=3054863.hexJULFvxB@xps \
    --to=thomas@monjalon.net \
    --cc=dev@dpdk.org \
    --cc=ferruh.yigit@intel.com \
    /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).