dev.dpdk.org archive mirror
 help / color / mirror / Atom feed
From: Declan Doherty <declan.doherty@intel.com>
To: wang wei <lnykww@gmail.com>, dev@dpdk.org
Cc: ferruh.yigit@intel.com
Subject: Re: [PATCH] drivers/net/bonding: fix updating the slave link status
Date: Thu, 27 Apr 2017 15:28:05 +0100	[thread overview]
Message-ID: <af828cda-9bdf-4a3c-734a-bef40743f999@intel.com> (raw)
In-Reply-To: <20170425063049.4705-1-lnykww@gmail.com>

On 25/04/2017 7:30 AM, wang wei wrote:
> we need to update dev->data->dev_link before handling lsc event.
> Otherwise it will still have the initial value after the startup of
> the program before interrupt callback was executed.
>
> Signed-off-by: wang wei <lnykww@gmail.com>
> ---
>  drivers/net/bonding/rte_eth_bond_pmd.c | 4 +++-
>  1 file changed, 3 insertions(+), 1 deletion(-)
>
> diff --git a/drivers/net/bonding/rte_eth_bond_pmd.c b/drivers/net/bonding/rte_eth_bond_pmd.c
> index c94071ffb..57b1012c4 100644
> --- a/drivers/net/bonding/rte_eth_bond_pmd.c
> +++ b/drivers/net/bonding/rte_eth_bond_pmd.c
> @@ -1435,9 +1435,11 @@ slave_configure(struct rte_eth_dev *bonded_eth_dev,
>  	}
>
>  	/* If lsc interrupt is set, check initial slave's link status */
> -	if (slave_eth_dev->data->dev_flags & RTE_ETH_DEV_INTR_LSC)
> +	if (slave_eth_dev->data->dev_flags & RTE_ETH_DEV_INTR_LSC) {
> +		slave_eth_dev->dev_ops->link_update(slave_eth_dev, 0);
>  		bond_ethdev_lsc_event_callback(slave_eth_dev->data->port_id,
>  			RTE_ETH_EVENT_INTR_LSC, &bonded_eth_dev->data->port_id);
> +	}
>
>  	return 0;
>  }
>

Acked-by: Declan Doherty <declan.doherty@intel.com>

  reply	other threads:[~2017-04-27 14:28 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-04-25  6:30 [PATCH] drivers/net/bonding: fix updating the slave link status wang wei
2017-04-27 14:28 ` Declan Doherty [this message]
2017-04-28  5:15   ` Ferruh Yigit
  -- strict thread matches above, loose matches on Subject: below --
2017-04-25  6:11 wang wei

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=af828cda-9bdf-4a3c-734a-bef40743f999@intel.com \
    --to=declan.doherty@intel.com \
    --cc=dev@dpdk.org \
    --cc=ferruh.yigit@intel.com \
    --cc=lnykww@gmail.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).