DPDK patches and discussions
 help / color / mirror / Atom feed
From: Ferruh Yigit <ferruh.yigit@intel.com>
To: Rahul Lakkireddy <rahul.lakkireddy@chelsio.com>, dev@dpdk.org
Cc: kumaras@chelsio.com, surendra@chelsio.com, nirranjan@chelsio.com,
	indranil@chelsio.com
Subject: Re: [dpdk-dev] [PATCH 2/7] cxgbe: update link state when link speed changes
Date: Mon, 5 Feb 2018 17:05:57 +0000	[thread overview]
Message-ID: <57cd8be1-b01c-bf49-a0e1-676eb028cbed@intel.com> (raw)
In-Reply-To: <e61f3eb95823b8695e0ae9cda739051f7170c390.1517685185.git.rahul.lakkireddy@chelsio.com>

On 2/4/2018 6:06 AM, Rahul Lakkireddy wrote:
> From: Kumar Sanghvi <kumaras@chelsio.com>
> 
> Original work by Surendra Mobiya <surendra@chelsio.com>
> 
> Fixes: cdac6e2eeafc ("cxgbe: add link related functions")
> Signed-off-by: Kumar Sanghvi <kumaras@chelsio.com>
> Signed-off-by: Rahul Lakkireddy <rahul.lakkireddy@chelsio.com>
> ---
>  drivers/net/cxgbe/cxgbe_ethdev.c | 3 ++-
>  1 file changed, 2 insertions(+), 1 deletion(-)
> 
> diff --git a/drivers/net/cxgbe/cxgbe_ethdev.c b/drivers/net/cxgbe/cxgbe_ethdev.c
> index 6d56f3c1b..5a25125fe 100644
> --- a/drivers/net/cxgbe/cxgbe_ethdev.c
> +++ b/drivers/net/cxgbe/cxgbe_ethdev.c
> @@ -227,7 +227,8 @@ static int cxgbe_dev_link_update(struct rte_eth_dev *eth_dev,
>  	unsigned int work_done, budget = 4;
>  
>  	cxgbe_poll(&s->fw_evtq, NULL, budget, &work_done);
> -	if (old_link->link_status == pi->link_cfg.link_ok)
> +	if (old_link->link_status == pi->link_cfg.link_ok &&
> +	    old_link->link_speed == pi->link_cfg.speed)

As Stephen's patch tried to clean this up, link_update dev_ops return value is
not very clear now and this return value not used at all in ethdev layer. And as
far as I can see you are also not using this locally in driver, so there is no
effect of updating this code, good or bad, I suggest postponing this update
until return value cleared more.

>  		return -1;  /* link not changed */
>  
>  	eth_dev->data->dev_link.link_status = pi->link_cfg.link_ok;
> 

  reply	other threads:[~2018-02-05 17:06 UTC|newest]

Thread overview: 29+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-02-04  6:06 [dpdk-dev] [PATCH 0/7] cxgbe: bug fixes and updates Rahul Lakkireddy
2018-02-04  6:06 ` [dpdk-dev] [PATCH 1/7] cxgbe: fix secondary process initialization Rahul Lakkireddy
2018-02-05 17:23   ` Ferruh Yigit
2018-02-06  9:20     ` Rahul Lakkireddy
2018-02-04  6:06 ` [dpdk-dev] [PATCH 2/7] cxgbe: update link state when link speed changes Rahul Lakkireddy
2018-02-05 17:05   ` Ferruh Yigit [this message]
2018-02-04  6:06 ` [dpdk-dev] [PATCH 3/7] cxgbe: add support to update RSS hash configuration and key Rahul Lakkireddy
2018-02-05 17:09   ` Ferruh Yigit
2018-02-06  9:22     ` Rahul Lakkireddy
2018-02-06 10:11       ` Ferruh Yigit
2018-02-06 10:38         ` Thomas Monjalon
2018-02-07  7:01           ` Rahul Lakkireddy
2018-02-04  6:06 ` [dpdk-dev] [PATCH 4/7] cxgbe: add support to get programmed " Rahul Lakkireddy
2018-02-04  6:06 ` [dpdk-dev] [PATCH 5/7] cxgbe: update link Forward Error Correction (FEC) Rahul Lakkireddy
2018-02-04  6:06 ` [dpdk-dev] [PATCH 6/7] cxgbe: update link configuration for 32-bit port capability Rahul Lakkireddy
2018-02-04  6:06 ` [dpdk-dev] [PATCH 7/7] cxgbe: rework and use " Rahul Lakkireddy
2018-02-28 18:04 ` [dpdk-dev] [PATCH v2 0/7] cxgbe: bug fixes and updates Rahul Lakkireddy
2018-02-28 18:04   ` [dpdk-dev] [PATCH v2 1/7] cxgbe: rework rte_eth_dev allocation Rahul Lakkireddy
2018-02-28 18:04   ` [dpdk-dev] [PATCH v2 2/7] cxgbe: fix secondary process initialization Rahul Lakkireddy
2018-02-28 18:04   ` [dpdk-dev] [PATCH v2 3/7] cxgbe: add support to update RSS hash configuration and key Rahul Lakkireddy
2018-03-08 13:34     ` Ferruh Yigit
2018-03-10  5:21       ` Rahul Lakkireddy
2018-02-28 18:04   ` [dpdk-dev] [PATCH v2 4/7] cxgbe: add support to get programmed " Rahul Lakkireddy
2018-02-28 18:04   ` [dpdk-dev] [PATCH v2 5/7] cxgbe: update link Forward Error Correction (FEC) Rahul Lakkireddy
2018-02-28 18:04   ` [dpdk-dev] [PATCH v2 6/7] cxgbe: update link configuration for 32-bit port capability Rahul Lakkireddy
2018-02-28 18:04   ` [dpdk-dev] [PATCH v2 7/7] cxgbe: rework and use " Rahul Lakkireddy
2018-03-08 13:44   ` [dpdk-dev] [PATCH v2 0/7] cxgbe: bug fixes and updates Ferruh Yigit
2018-03-08 13:50     ` Ferruh Yigit
2018-03-10  5:24       ` Rahul Lakkireddy

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=57cd8be1-b01c-bf49-a0e1-676eb028cbed@intel.com \
    --to=ferruh.yigit@intel.com \
    --cc=dev@dpdk.org \
    --cc=indranil@chelsio.com \
    --cc=kumaras@chelsio.com \
    --cc=nirranjan@chelsio.com \
    --cc=rahul.lakkireddy@chelsio.com \
    --cc=surendra@chelsio.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).