[dpdk-dev] [PATCH 2/7] cxgbe: update link state when link speed changes
Ferruh Yigit
ferruh.yigit at intel.com
Mon Feb 5 18:05:57 CET 2018
On 2/4/2018 6:06 AM, Rahul Lakkireddy wrote:
> From: Kumar Sanghvi <kumaras at chelsio.com>
>
> Original work by Surendra Mobiya <surendra at chelsio.com>
>
> Fixes: cdac6e2eeafc ("cxgbe: add link related functions")
> Signed-off-by: Kumar Sanghvi <kumaras at chelsio.com>
> Signed-off-by: Rahul Lakkireddy <rahul.lakkireddy at 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;
>
More information about the dev
mailing list