[dpdk-dev] [PATCH] netvsc: update link info when getting device info
Mohammed Gamal
mgamal at redhat.com
Thu Feb 6 11:55:41 CET 2020
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 at 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
More information about the dev
mailing list