net/sfc: fix missing notification on link status change
authorAndrew Rybchenko <arybchenko@solarflare.com>
Fri, 6 Sep 2019 10:49:49 +0000 (11:49 +0100)
committerFerruh Yigit <ferruh.yigit@intel.com>
Mon, 7 Oct 2019 13:00:52 +0000 (15:00 +0200)
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

index 0f216da..6a58a2d 100644 (file)
@@ -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;