DPDK patches and discussions
 help / color / mirror / Atom feed
From: Ori Kam <orika@mellanox.com>
To: Andrew Rybchenko <arybchenko@solarflare.com>,
	Marko Kovacevic <marko.kovacevic@intel.com>,
	Bruce Richardson <bruce.richardson@intel.com>,
	Pablo de Lara <pablo.de.lara.guarch@intel.com>,
	Radu Nicolau <radu.nicolau@intel.com>,
	Akhil Goyal <akhil.goyal@nxp.com>,
	Tomasz Kantecki <tomasz.kantecki@intel.com>
Cc: "dev@dpdk.org" <dev@dpdk.org>, Igor Romanov <igor.romanov@oktetlabs.ru>
Subject: Re: [dpdk-dev] [PATCH 14/18] examples/flow_filtering: check status of getting link info
Date: Thu, 12 Sep 2019 05:16:33 +0000	[thread overview]
Message-ID: <AM4PR05MB34258C646F7969A866ADD74DDBB00@AM4PR05MB3425.eurprd05.prod.outlook.com> (raw)
In-Reply-To: <1568103959-25572-15-git-send-email-arybchenko@solarflare.com>



> -----Original Message-----
> From: Andrew Rybchenko <arybchenko@solarflare.com>
> Sent: Tuesday, September 10, 2019 11:26 AM
> To: Marko Kovacevic <marko.kovacevic@intel.com>; Ori Kam
> <orika@mellanox.com>; Bruce Richardson <bruce.richardson@intel.com>;
> Pablo de Lara <pablo.de.lara.guarch@intel.com>; Radu Nicolau
> <radu.nicolau@intel.com>; Akhil Goyal <akhil.goyal@nxp.com>; Tomasz
> Kantecki <tomasz.kantecki@intel.com>
> Cc: dev@dpdk.org; Igor Romanov <igor.romanov@oktetlabs.ru>
> Subject: [PATCH 14/18] examples/flow_filtering: check status of getting link
> info
> 
> From: Igor Romanov <igor.romanov@oktetlabs.ru>
> 
> The return value of rte_eth_link_get() and rte_eth_link_get_nowait()
> was changed from void to int. Update the usage of the functions
> according to the new return type.
> 
> Signed-off-by: Igor Romanov <igor.romanov@oktetlabs.ru>
> Signed-off-by: Andrew Rybchenko <arybchenko@solarflare.com>
> ---
>  examples/flow_filtering/main.c | 8 ++++++--
>  1 file changed, 6 insertions(+), 2 deletions(-)
> 
> diff --git a/examples/flow_filtering/main.c b/examples/flow_filtering/main.c
> index c40cfd098..cc9e7e780 100644
> --- a/examples/flow_filtering/main.c
> +++ b/examples/flow_filtering/main.c
> @@ -100,15 +100,19 @@ assert_link_status(void)
>  {
>  	struct rte_eth_link link;
>  	uint8_t rep_cnt = MAX_REPEAT_TIMES;
> +	int link_get_err = -EINVAL;
> 
>  	memset(&link, 0, sizeof(link));
>  	do {
> -		rte_eth_link_get(port_id, &link);
> -		if (link.link_status == ETH_LINK_UP)
> +		link_get_err = rte_eth_link_get(port_id, &link);
> +		if (link_get_err == 0 && link.link_status == ETH_LINK_UP)
>  			break;
>  		rte_delay_ms(CHECK_INTERVAL);
>  	} while (--rep_cnt);
> 
> +	if (link_get_err < 0)
> +		rte_exit(EXIT_FAILURE, ":: error: link get is failing: %s\n",
> +			 rte_strerror(-link_get_err));
>  	if (link.link_status == ETH_LINK_DOWN)
>  		rte_exit(EXIT_FAILURE, ":: error: link is still down\n");
>  }
> --
> 2.17.1

Acked-by: Ori Kam <orika@mellanox.com>
Thanks,
Ori Kam



  reply	other threads:[~2019-09-12  5:16 UTC|newest]

Thread overview: 22+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-09-10  8:25 [dpdk-dev] [PATCH 00/18] ethdev: change link status get functions return value to int Andrew Rybchenko
2019-09-10  8:25 ` [dpdk-dev] [PATCH 01/18] net/bonding: fix link speed update in broadcast mode Andrew Rybchenko
2019-09-10 23:01   ` Chas Williams
2019-09-10  8:25 ` [dpdk-dev] [PATCH 02/18] ethdev: change link status get functions return value to int Andrew Rybchenko
2019-09-10  8:25 ` [dpdk-dev] [PATCH 03/18] app/testpmd: check status of getting link info Andrew Rybchenko
2019-09-10  8:25 ` [dpdk-dev] [PATCH 04/18] net/bonding: " Andrew Rybchenko
2019-09-10  8:25 ` [dpdk-dev] [PATCH 05/18] net/ixgbe: " Andrew Rybchenko
2019-09-10  8:25 ` [dpdk-dev] [PATCH 06/18] net/memif: " Andrew Rybchenko
2019-09-10  8:25 ` [dpdk-dev] [PATCH 07/18] app/proc-info: " Andrew Rybchenko
2019-09-10  8:25 ` [dpdk-dev] [PATCH 08/18] app/test: " Andrew Rybchenko
2019-09-10  8:25 ` [dpdk-dev] [PATCH 09/18] app/pipeline: " Andrew Rybchenko
2019-09-10  8:25 ` [dpdk-dev] [PATCH 10/18] examples: " Andrew Rybchenko
2019-09-10  8:25 ` [dpdk-dev] [PATCH 11/18] examples/bbdev_app: " Andrew Rybchenko
2019-09-10  8:25 ` [dpdk-dev] [PATCH 12/18] examples/ip_pipeline: " Andrew Rybchenko
2019-09-10  8:25 ` [dpdk-dev] [PATCH 13/18] examples/ethtool: " Andrew Rybchenko
2019-09-10  8:25 ` [dpdk-dev] [PATCH 14/18] examples/flow_filtering: " Andrew Rybchenko
2019-09-12  5:16   ` Ori Kam [this message]
2019-09-10  8:25 ` [dpdk-dev] [PATCH 15/18] examples/link_status_interrupt: check status of getting link Andrew Rybchenko
2019-09-10  8:25 ` [dpdk-dev] [PATCH 16/18] examples/distributor: check status of getting link info Andrew Rybchenko
2019-09-10  8:25 ` [dpdk-dev] [PATCH 17/18] examples/qos_sched: " Andrew Rybchenko
2019-09-10  8:25 ` [dpdk-dev] [PATCH 18/18] examples/kni: " Andrew Rybchenko
2019-09-24 12:38 ` [dpdk-dev] [PATCH 00/18] ethdev: change link status get functions return value to int 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=AM4PR05MB34258C646F7969A866ADD74DDBB00@AM4PR05MB3425.eurprd05.prod.outlook.com \
    --to=orika@mellanox.com \
    --cc=akhil.goyal@nxp.com \
    --cc=arybchenko@solarflare.com \
    --cc=bruce.richardson@intel.com \
    --cc=dev@dpdk.org \
    --cc=igor.romanov@oktetlabs.ru \
    --cc=marko.kovacevic@intel.com \
    --cc=pablo.de.lara.guarch@intel.com \
    --cc=radu.nicolau@intel.com \
    --cc=tomasz.kantecki@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).