net/bnxt: add support for LSC interrupt event
authorQingmin Liu <qingmin.liu@broadcom.com>
Tue, 1 May 2018 01:06:05 +0000 (18:06 -0700)
committerFerruh Yigit <ferruh.yigit@intel.com>
Mon, 14 May 2018 21:31:48 +0000 (22:31 +0100)
Add support to bnxt driver to register RTE_ETH_EVENT_INTR_LSC
event and monitor physical link status.

Signed-off-by: Qingmin Liu <qingmin.liu@broadcom.com>
Signed-off-by: Scott Branden <scott.branden@broadcom.com>
Signed-off-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
Reviewed-by: Randy Schacher <stuart.schacher@broadcom.com>
drivers/net/bnxt/bnxt_ethdev.c

index 7c29bff..2190a2e 100644 (file)
@@ -780,6 +780,11 @@ out:
        new.link_speed != eth_dev->data->dev_link.link_speed) {
                memcpy(&eth_dev->data->dev_link, &new,
                        sizeof(struct rte_eth_link));
+
+               _rte_eth_dev_callback_process(eth_dev,
+                                             RTE_ETH_EVENT_INTR_LSC,
+                                             NULL);
+
                bnxt_print_link_info(eth_dev);
        }