From: Leyi Rong Date: Wed, 16 Oct 2019 06:24:46 +0000 (+0800) Subject: net/ice: invoke callback when link status change X-Git-Url: http://git.droids-corp.org/?a=commitdiff_plain;h=41eb707e822c2ac1d260c1cf53ceaba902fa6908;p=dpdk.git net/ice: invoke callback when link status change 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 Reviewed-by: Xiaolong Ye --- diff --git a/drivers/net/ice/ice_ethdev.c b/drivers/net/ice/ice_ethdev.c index b433ba8446..dc4d1e6c71 100644 --- a/drivers/net/ice/ice_ethdev.c +++ b/drivers/net/ice/ice_ethdev.c @@ -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