From: Slava Ovsiienko <viacheslavo@mellanox.com>
To: Thomas Monjalon <thomas@monjalon.net>,
"gaetan.rivet@6wind.com" <gaetan.rivet@6wind.com>,
Wenzhuo Lu <wenzhuo.lu@intel.com>,
Jingjing Wu <jingjing.wu@intel.com>,
Bernard Iremonger <bernard.iremonger@intel.com>
Cc: "dev@dpdk.org" <dev@dpdk.org>
Subject: Re: [dpdk-dev] [PATCH v3 4/4] app/testpmd: use port sibling iterator in device cleanup
Date: Wed, 3 Apr 2019 15:04:26 +0000 [thread overview]
Message-ID: <AM4PR05MB3265FA9D4D88FE90DC1C5587D2570@AM4PR05MB3265.eurprd05.prod.outlook.com> (raw)
Message-ID: <20190403150426.4LjqUetSqFG50nOkLaqk_Vv8JyjSe1fDxX3qC--coLA@z> (raw)
In-Reply-To: <20190401022700.1570-5-thomas@monjalon.net>
> -----Original Message-----
> From: dev <dev-bounces@dpdk.org> On Behalf Of Thomas Monjalon
> Sent: Monday, April 1, 2019 5:27
> To: gaetan.rivet@6wind.com; Wenzhuo Lu <wenzhuo.lu@intel.com>; Jingjing
> Wu <jingjing.wu@intel.com>; Bernard Iremonger
> <bernard.iremonger@intel.com>
> Cc: dev@dpdk.org
> Subject: [dpdk-dev] [PATCH v3 4/4] app/testpmd: use port sibling iterator in
> device cleanup
>
> When removing a rte_device on a port-based request, all the sibling ports
> must be marked as closed.
> The iterator loop can be simplified by using the dedicated macro.
>
> Signed-off-by: Thomas Monjalon <thomas@monjalon.net>
Tested-by: Viacheslav Ovsiienko <mellanox.com>
> ---
> app/test-pmd/testpmd.c | 4 +---
> 1 file changed, 1 insertion(+), 3 deletions(-)
>
> diff --git a/app/test-pmd/testpmd.c b/app/test-pmd/testpmd.c index
> 40c873b97..aeaa74c98 100644
> --- a/app/test-pmd/testpmd.c
> +++ b/app/test-pmd/testpmd.c
> @@ -2370,9 +2370,7 @@ detach_port_device(portid_t port_id)
> return;
> }
>
> - for (sibling = 0; sibling < RTE_MAX_ETHPORTS; sibling++) {
> - if (rte_eth_devices[sibling].device != dev)
> - continue;
> + RTE_ETH_FOREACH_DEV_SIBLING(sibling, port_id) {
> /* reset mapping between old ports and removed device */
> rte_eth_devices[sibling].device = NULL;
> if (ports[sibling].port_status != RTE_PORT_CLOSED) {
> --
> 2.21.0
next prev parent reply other threads:[~2019-04-03 15:04 UTC|newest]
Thread overview: 70+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-11-30 0:27 [dpdk-dev] [PATCH] ethdev: add siblings iterator Thomas Monjalon
2018-12-11 16:31 ` Ferruh Yigit
2018-12-11 18:19 ` Thomas Monjalon
2019-02-20 22:10 ` [dpdk-dev] [PATCH v2 0/4] ethdev iterators for multi-ports device Thomas Monjalon
2019-02-20 22:10 ` [dpdk-dev] [PATCH v2 1/4] ethdev: simplify port state comparisons Thomas Monjalon
2019-02-24 17:18 ` Andrew Rybchenko
2019-02-20 22:10 ` [dpdk-dev] [PATCH v2 2/4] ethdev: add siblings iterators Thomas Monjalon
2019-02-24 17:22 ` Andrew Rybchenko
2019-02-27 10:07 ` Gaëtan Rivet
2019-02-27 10:51 ` Thomas Monjalon
2019-04-01 1:59 ` Thomas Monjalon
2019-04-01 1:59 ` Thomas Monjalon
2019-03-19 15:47 ` Ferruh Yigit
2019-03-19 15:47 ` Ferruh Yigit
2019-03-19 17:34 ` Thomas Monjalon
2019-03-19 17:34 ` Thomas Monjalon
2019-03-19 18:04 ` Ferruh Yigit
2019-03-19 18:04 ` Ferruh Yigit
2019-04-01 2:16 ` Thomas Monjalon
2019-04-01 2:16 ` Thomas Monjalon
2019-04-01 6:46 ` David Marchand
2019-04-01 6:46 ` David Marchand
2019-04-01 8:09 ` Thomas Monjalon
2019-04-01 8:09 ` Thomas Monjalon
2019-04-02 23:35 ` Ferruh Yigit
2019-04-02 23:35 ` Ferruh Yigit
2019-04-02 23:37 ` Thomas Monjalon
2019-04-02 23:37 ` Thomas Monjalon
2019-02-20 22:10 ` [dpdk-dev] [PATCH v2 3/4] net/mlx5: use port sibling iterators Thomas Monjalon
2019-02-20 22:10 ` [dpdk-dev] [PATCH v2 4/4] app/testpmd: use port sibling iterator in device cleanup Thomas Monjalon
2019-04-01 2:26 ` [dpdk-dev] [PATCH v3 0/4] ethdev iterators for multi-ports device Thomas Monjalon
2019-04-01 2:26 ` Thomas Monjalon
2019-04-01 2:26 ` [dpdk-dev] [PATCH v3 1/4] ethdev: simplify port state comparisons Thomas Monjalon
2019-04-01 2:26 ` Thomas Monjalon
2019-04-01 14:58 ` Stephen Hemminger
2019-04-01 14:58 ` Stephen Hemminger
2019-04-01 15:17 ` Thomas Monjalon
2019-04-01 15:17 ` Thomas Monjalon
2019-04-01 16:07 ` Stephen Hemminger
2019-04-01 16:07 ` Stephen Hemminger
2019-04-03 15:03 ` Slava Ovsiienko
2019-04-03 15:03 ` Slava Ovsiienko
2019-04-01 2:26 ` [dpdk-dev] [PATCH v3 2/4] ethdev: add siblings iterators Thomas Monjalon
2019-04-01 2:26 ` Thomas Monjalon
2019-04-01 7:23 ` Andrew Rybchenko
2019-04-01 7:23 ` Andrew Rybchenko
2019-04-02 23:42 ` Ferruh Yigit
2019-04-02 23:42 ` Ferruh Yigit
2019-04-02 23:48 ` Thomas Monjalon
2019-04-02 23:48 ` Thomas Monjalon
2019-04-03 15:03 ` Slava Ovsiienko
2019-04-03 15:03 ` Slava Ovsiienko
2019-04-01 2:26 ` [dpdk-dev] [PATCH v3 3/4] net/mlx5: use port sibling iterators Thomas Monjalon
2019-04-01 2:26 ` Thomas Monjalon
2019-04-03 14:19 ` Ferruh Yigit
2019-04-03 14:19 ` Ferruh Yigit
2019-04-03 18:07 ` Yongseok Koh
2019-04-03 18:07 ` Yongseok Koh
2019-04-04 11:33 ` Ferruh Yigit
2019-04-04 11:33 ` Ferruh Yigit
2019-04-03 15:04 ` Slava Ovsiienko
2019-04-03 15:04 ` Slava Ovsiienko
2019-04-01 2:27 ` [dpdk-dev] [PATCH v3 4/4] app/testpmd: use port sibling iterator in device cleanup Thomas Monjalon
2019-04-01 2:27 ` Thomas Monjalon
2019-04-02 23:43 ` Ferruh Yigit
2019-04-02 23:43 ` Ferruh Yigit
2019-04-03 15:04 ` Slava Ovsiienko [this message]
2019-04-03 15:04 ` Slava Ovsiienko
2019-04-03 16:42 ` [dpdk-dev] [PATCH v3 0/4] ethdev iterators for multi-ports device Ferruh Yigit
2019-04-03 16:42 ` 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=AM4PR05MB3265FA9D4D88FE90DC1C5587D2570@AM4PR05MB3265.eurprd05.prod.outlook.com \
--to=viacheslavo@mellanox.com \
--cc=bernard.iremonger@intel.com \
--cc=dev@dpdk.org \
--cc=gaetan.rivet@6wind.com \
--cc=jingjing.wu@intel.com \
--cc=thomas@monjalon.net \
--cc=wenzhuo.lu@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).