[dpdk-dev] [PATCH v2] net/ice: invoke callback func when link status change
Leyi Rong
leyi.rong at intel.com
Wed Oct 16 08:24:46 CEST 2019
Needs to call _rte_eth_dev_callback_process to run registered
callbacks when link status change.
Fixes: cf911d90e366 ("net/ice: support link update")
Signed-off-by: Leyi Rong <leyi.rong at intel.com>
---
v2:
- adds fixline in commit log.
---
drivers/net/ice/ice_ethdev.c | 6 +++++-
1 file changed, 5 insertions(+), 1 deletion(-)
diff --git a/drivers/net/ice/ice_ethdev.c b/drivers/net/ice/ice_ethdev.c
index 5567beb55..092f10d47 100644
--- a/drivers/net/ice/ice_ethdev.c
+++ b/drivers/net/ice/ice_ethdev.c
@@ -1303,6 +1303,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
@@ -1330,7 +1331,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
--
2.17.1
More information about the dev
mailing list