DPDK patches and discussions
 help / color / mirror / Atom feed
From: wang wei <lnykww@gmail.com>
To: dev@dpdk.org
Subject: [dpdk-dev] [PATCH] drivers/net/bonding: fix updating the slave link status
Date: Tue, 25 Apr 2017 14:11:58 +0800	[thread overview]
Message-ID: <20170425061158.4435-1-lnykww@gmail.com> (raw)

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;
 }
-- 
2.11.0 (Apple Git-81)

             reply	other threads:[~2017-04-25  6:12 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-04-25  6:11 wang wei [this message]
2017-04-25  6:30 wang wei
2017-04-27 14:28 ` Declan Doherty
2017-04-28  5:15   ` 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=20170425061158.4435-1-lnykww@gmail.com \
    --to=lnykww@gmail.com \
    --cc=dev@dpdk.org \
    /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).