> -----Original Message-----
> From: dev [mailto:[email protected]] On Behalf Of Chas Williams
> Sent: Wednesday, February 14, 2018 6:56 AM
> To: [email protected]
> Cc: Lu, Wenzhuo <[email protected]>; Ananyev, Konstantin
> <[email protected]>; Charles (Chas) Williams <[email protected]>
> Subject: [dpdk-dev] [PATCH] net/ixgbe: update data->eth_link status on start
> 
> From: "Charles (Chas) Williams" <[email protected]>
> 
> dev->data->eth_link isn't updated until the first interrupt.  If a
> link is carrier down, then this interrupt may never happen.  Before we
> finished starting the PMD, call ixgbe_dev_link_update() to ensure we have a
> valid status.
> 
> Signed-off-by: Chas Williams <[email protected]>

Acked-by: Qi Zhang <[email protected]>

> ---
>  drivers/net/ixgbe/ixgbe_ethdev.c | 4 ++++
>  1 file changed, 4 insertions(+)
> 
> diff --git a/drivers/net/ixgbe/ixgbe_ethdev.c
> b/drivers/net/ixgbe/ixgbe_ethdev.c
> index 37eb668..27d29dc 100644
> --- a/drivers/net/ixgbe/ixgbe_ethdev.c
> +++ b/drivers/net/ixgbe/ixgbe_ethdev.c
> @@ -2666,6 +2666,8 @@ ixgbe_dev_start(struct rte_eth_dev *dev)
>       if (err)
>               goto error;
> 
> +     ixgbe_dev_link_update(dev, 0);
> +
>  skip_link_setup:
> 
>       if (rte_intr_allow_others(intr_handle)) { @@ -5033,6 +5035,8 @@
> ixgbevf_dev_start(struct rte_eth_dev *dev)
> 
>       ixgbevf_dev_rxtx_start(dev);
> 
> +     ixgbevf_dev_link_update(dev, 0);
> +
>       /* check and configure queue intr-vector mapping */
>       if (rte_intr_cap_multiple(intr_handle) &&
>           dev->data->dev_conf.intr_conf.rxq) {
> --
> 2.9.5

Reply via email to