patches for DPDK stable branches
 help / color / mirror / Atom feed
* [dpdk-stable] [PATCH] net/i40e: fix VF link status update
@ 2017-05-17  6:10 Qi Zhang
  2017-05-17  6:19 ` Yuanhan Liu
  0 siblings, 1 reply; 2+ messages in thread
From: Qi Zhang @ 2017-05-17  6:10 UTC (permalink / raw)
  To: stable; +Cc: qi.z.zhang

VF link status rely on PF's notification, so when PF link status
be updated, it should notify VF to update link status also.
Current implementation only cover part of the situation when PF's link
status is updated, call i40e_notify_all_vfs_link_status in
i4e_dev_link_update will cover all situationa.

Fixes: bb6722fb5c0e ("net/i40e: fix VF bonded device link down")

Signed-off-by: Qi Zhang <qi.z.zhang@intel.com>
---
 drivers/net/i40e/i40e_ethdev.c | 7 ++++---
 1 file changed, 4 insertions(+), 3 deletions(-)

diff --git a/drivers/net/i40e/i40e_ethdev.c b/drivers/net/i40e/i40e_ethdev.c
index 67778ba..c4f79e4 100644
--- a/drivers/net/i40e/i40e_ethdev.c
+++ b/drivers/net/i40e/i40e_ethdev.c
@@ -460,6 +460,7 @@ static void i40e_set_default_mac_addr(struct rte_eth_dev *dev,
 				      struct ether_addr *mac_addr);
 
 static int i40e_dev_mtu_set(struct rte_eth_dev *dev, uint16_t mtu);
+static void i40e_notify_all_vfs_link_status(struct rte_eth_dev *dev);
 
 static const struct rte_pci_id pci_id_i40e_map[] = {
 	{ RTE_PCI_DEVICE(I40E_INTEL_VENDOR_ID, I40E_DEV_ID_SFP_XL710) },
@@ -2070,6 +2071,8 @@ i40e_dev_link_update(struct rte_eth_dev *dev,
 	if (link.link_status == old.link_status)
 		return -1;
 
+	i40e_notify_all_vfs_link_status(dev);
+
 	return 0;
 }
 
@@ -5498,11 +5501,9 @@ i40e_dev_handle_aq_msg(struct rte_eth_dev *dev)
 			break;
 		case i40e_aqc_opc_get_link_status:
 			ret = i40e_dev_link_update(dev, 0);
-			if (!ret) {
-				i40e_notify_all_vfs_link_status(dev);
+			if (!ret)
 				_rte_eth_dev_callback_process(dev,
 					RTE_ETH_EVENT_INTR_LSC, NULL);
-			}
 			break;
 		default:
 			PMD_DRV_LOG(ERR, "Request %u is not supported yet",
-- 
2.9.3

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

* Re: [dpdk-stable] [PATCH] net/i40e: fix VF link status update
  2017-05-17  6:10 [dpdk-stable] [PATCH] net/i40e: fix VF link status update Qi Zhang
@ 2017-05-17  6:19 ` Yuanhan Liu
  0 siblings, 0 replies; 2+ messages in thread
From: Yuanhan Liu @ 2017-05-17  6:19 UTC (permalink / raw)
  To: Qi Zhang; +Cc: stable

On Wed, May 17, 2017 at 02:10:26AM -0400, Qi Zhang wrote:
>

A line is missing here:

    [ backported from upstream commit 7c59dbd5dbac77bb34d66e066630f5247af2732b ]

Applied to dpdk-stable/16.11. Thanks!

	--yliu


> VF link status rely on PF's notification, so when PF link status
> be updated, it should notify VF to update link status also.
> Current implementation only cover part of the situation when PF's link
> status is updated, call i40e_notify_all_vfs_link_status in
> i4e_dev_link_update will cover all situationa.
> 
> Fixes: bb6722fb5c0e ("net/i40e: fix VF bonded device link down")
> 
> Signed-off-by: Qi Zhang <qi.z.zhang@intel.com>
> ---
>  drivers/net/i40e/i40e_ethdev.c | 7 ++++---
>  1 file changed, 4 insertions(+), 3 deletions(-)

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

end of thread, other threads:[~2017-05-17  6:23 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-05-17  6:10 [dpdk-stable] [PATCH] net/i40e: fix VF link status update Qi Zhang
2017-05-17  6:19 ` Yuanhan Liu

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