From: Thomas Monjalon <thomas@monjalon.net>
To: Akhil Goyal <akhil.goyal@nxp.com>,
"anatoly.burakov@intel.com" <anatoly.burakov@intel.com>
Cc: dev@dpdk.org, "stable@dpdk.org" <stable@dpdk.org>
Subject: Re: [dpdk-dev] [PATCH v2] examples/multi_process/symmetric_mp: fix link check
Date: Fri, 05 Apr 2019 15:03:48 +0200 [thread overview]
Message-ID: <2108513.ynXuZs2m7e@xps> (raw)
In-Reply-To: <20190327112348.12785-1-akhil.goyal@nxp.com>
27/03/2019 12:33, Akhil Goyal:
> link check is done for primary process for the ports
> which are given in the port mask and not the complete
> set of ports.
>
> Fixes: d3641ae86313 ("examples: update link status checks")
> Cc: stable@dpdk.org
>
> Signed-off-by: Akhil Goyal <akhil.goyal@nxp.com>
> ---
> for (portid = 0; portid < port_num; portid++) {
The logic of this loop is wrong.
The port ids may be not contiguous.
Look at RTE_ETH_FOREACH_DEV* for such iteration.
> - if ((port_mask & (1 << portid)) == 0)
> + if ((mask & (1 << portid)) == 0)
> continue;
[...]
> - check_all_ports_link_status((uint8_t)num_ports, (~0x0));
> + check_all_ports_link_status(rte_eth_dev_count(), port_mask);
The function rte_eth_dev_count is deprecated.
It should be noticed when compiling.
On more comment, I think such wrong implementation is existing
in many examples:
% git grep -l 'check_all_ports_link_status(.*num'
app/test/test_pmd_perf.c
examples/link_status_interrupt/main.c
examples/load_balancer/init.c
examples/multi_process/client_server_mp/mp_server/init.c
examples/multi_process/symmetric_mp/main.c
examples/server_node_efd/server/init.c
prev parent reply other threads:[~2019-04-05 13:03 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-03-27 11:22 [PATCH] examples/multi_process/symmetric_mp: fix link check Akhil Goyal
2019-03-27 11:33 ` [PATCH v2] " Akhil Goyal
2019-04-05 12:42 ` [dpdk-dev] " Burakov, Anatoly
2019-04-05 13:03 ` 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=2108513.ynXuZs2m7e@xps \
--to=thomas@monjalon.net \
--cc=akhil.goyal@nxp.com \
--cc=anatoly.burakov@intel.com \
--cc=dev@dpdk.org \
--cc=stable@dpdk.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.