DPDK patches and discussions
 help / color / mirror / Atom feed
* [dpdk-dev] [PATCH] netvsc: update link info when getting device info
@ 2020-02-06 10:55 Mohammed Gamal
  2020-02-06 23:45 ` Stephen Hemminger
                   ` (2 more replies)
  0 siblings, 3 replies; 8+ messages in thread
From: Mohammed Gamal @ 2020-02-06 10:55 UTC (permalink / raw)
  To: dev, sthemmin; +Cc: kys, haiyangz, Mohammed Gamal

testpmd 'show summary' command always shows interface status as down
with 0 Mbps speed regardless of the underlying VF's status.
This happens as hn_dev_link_update() is never called, even on the initial
RNDIS_STATUS_MEDIA_CONNECT message as LSC interrupts are not yet enabled
at this point.

Let's call it and update link info when calling hn_dev_info_get().

Signed-off-by: Mohammed Gamal <mgamal@redhat.com>
---
 drivers/net/netvsc/hn_ethdev.c | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/drivers/net/netvsc/hn_ethdev.c b/drivers/net/netvsc/hn_ethdev.c
index c79f92437..1120fc688 100644
--- a/drivers/net/netvsc/hn_ethdev.c
+++ b/drivers/net/netvsc/hn_ethdev.c
@@ -265,6 +265,11 @@ static int hn_dev_info_get(struct rte_eth_dev *dev,
 	if (rc != 0)
 		return rc;
 
+	/* fill in link status and link speed */
+	rc = hn_dev_link_update(dev, 0);
+	if (rc != 0)
+		return rc;
+
 	/* merges the offload and queues of vf */
 	return hn_vf_info_get(hv, dev_info);
 }
-- 
2.21.0


^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2020-02-10 13:10 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-02-06 10:55 [dpdk-dev] [PATCH] netvsc: update link info when getting device info Mohammed Gamal
2020-02-06 23:45 ` Stephen Hemminger
2020-02-07  0:10 ` [dpdk-dev] [RFT] net/netvsc: initialize link state Stephen Hemminger
2020-02-07 13:22   ` Mohammed Gamal
2020-02-07 16:12     ` Stephen Hemminger
2020-02-07 16:26       ` Mohammed Gamal
2020-02-07 18:08 ` [dpdk-dev] [PATCH v2] " Stephen Hemminger
2020-02-10 13:10   ` [dpdk-dev] [dpdk-stable] " Ferruh Yigit

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).