net/ice: invoke callback when link status change
authorLeyi Rong <leyi.rong@intel.com>
Wed, 16 Oct 2019 06:24:46 +0000 (14:24 +0800)
committerFerruh Yigit <ferruh.yigit@intel.com>
Wed, 23 Oct 2019 14:43:09 +0000 (16:43 +0200)
Needs to call _rte_eth_dev_callback_process to run registered
callbacks when link status change.

Fixes: cf911d90e366 ("net/ice: support link update")
Cc: stable@dpdk.org
Signed-off-by: Leyi Rong <leyi.rong@intel.com>
Reviewed-by: Xiaolong Ye <xiaolong.ye@intel.com>
drivers/net/ice/ice_ethdev.c

index b433ba8..dc4d1e6 100644 (file)
@@ -1305,6 +1305,7 @@ ice_interrupt_handler(void *param)
        uint8_t pf_num;
        uint8_t event;
        uint16_t queue;
+       int ret;
 #ifdef ICE_LSE_SPT
        uint32_t int_fw_ctl;
 #endif
@@ -1332,7 +1333,10 @@ ice_interrupt_handler(void *param)
 #else
        if (oicr & PFINT_OICR_LINK_STAT_CHANGE_M) {
                PMD_DRV_LOG(INFO, "OICR: link state change event");
-               ice_link_update(dev, 0);
+               ret = ice_link_update(dev, 0);
+               if (!ret)
+                       _rte_eth_dev_callback_process
+                               (dev, RTE_ETH_EVENT_INTR_LSC, NULL);
        }
 #endif