net/sfc: fix missing notification on link status change

Message ID 1567766989-25918-1-git-send-email-arybchenko@solarflare.com (mailing list archive)
State Accepted, archived
Delegated to: Ferruh Yigit
Headers
Series net/sfc: fix missing notification on link status change |

Checks

Context Check Description
ci/checkpatch success coding style OK
ci/iol-dpdk_compile_ovs success Compile Testing PASS
ci/iol-dpdk_compile success Compile Testing PASS
ci/iol-dpdk_compile_spdk success Compile Testing PASS
ci/intel-Performance success Performance Testing PASS
ci/mellanox-Performance success Performance Testing PASS

Commit Message

Andrew Rybchenko Sept. 6, 2019, 10:49 a.m. UTC
  rte_eth_linkstatus_set() returns 0 when link up status changes.

Fixes: 4abe903e5078 ("net/sfc: use link status helper functions")
Cc: stable@dpdk.org

Reported-by: Shuki Katzenelson <shuki@lightbitslabs.com>
Signed-off-by: Andrew Rybchenko <arybchenko@solarflare.com>
---
 drivers/net/sfc/sfc_ev.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
  

Comments

Ferruh Yigit Sept. 13, 2019, 5:52 p.m. UTC | #1
On 9/6/2019 11:49 AM, Andrew Rybchenko wrote:
> rte_eth_linkstatus_set() returns 0 when link up status changes.
> 
> Fixes: 4abe903e5078 ("net/sfc: use link status helper functions")
> Cc: stable@dpdk.org
> 
> Reported-by: Shuki Katzenelson <shuki@lightbitslabs.com>
> Signed-off-by: Andrew Rybchenko <arybchenko@solarflare.com>

Applied to dpdk-next-net/master, thanks.
  

Patch

diff --git a/drivers/net/sfc/sfc_ev.c b/drivers/net/sfc/sfc_ev.c
index 0f216da5d9..6a58a2d975 100644
--- a/drivers/net/sfc/sfc_ev.c
+++ b/drivers/net/sfc/sfc_ev.c
@@ -420,7 +420,7 @@  sfc_ev_link_change(void *arg, efx_link_mode_t link_mode)
 	struct rte_eth_link new_link;
 
 	sfc_port_link_mode_to_info(link_mode, &new_link);
-	if (rte_eth_linkstatus_set(sa->eth_dev, &new_link))
+	if (rte_eth_linkstatus_set(sa->eth_dev, &new_link) == 0)
 		evq->sa->port.lsc_seq++;
 
 	return B_FALSE;