summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHyong Youb Kim <hyonkim@cisco.com>2019-11-07 06:42:24 -0800
committerFerruh Yigit <ferruh.yigit@intel.com>2019-11-08 23:15:05 +0100
commit8bac78f8262e2c4d8d72bf7e77c2d55b62b844f2 (patch)
tree97ee80f6933c1700141535c6adb04f57635be4c7
parentfc2dd8dd492fade39a4c4de037ff3c869daff47d (diff)
downloaddpdk-8bac78f8262e2c4d8d72bf7e77c2d55b62b844f2.zip
dpdk-8bac78f8262e2c4d8d72bf7e77c2d55b62b844f2.tar.gz
dpdk-8bac78f8262e2c4d8d72bf7e77c2d55b62b844f2.tar.xz
net/enic: re-enable link status change interrupt
When INTx is used, the interrupt handler needs to explicitly re-enable interrupt in order to receive another one in future. The LSC interrupt handler currently does not, and the link state never gets updated when INTx is used (e.g. uio_pci_generic). Call rte_intr_ack() at the end of the handler, to re-enable INTx. Fixes: fefed3d1e62c ("enic: new driver") Cc: stable@dpdk.org Signed-off-by: Hyong Youb Kim <hyonkim@cisco.com> Reviewed-by: John Daley <johndale@cisco.com>
-rw-r--r--drivers/net/enic/Makefile2
-rw-r--r--drivers/net/enic/enic_main.c2
-rw-r--r--drivers/net/enic/meson.build2
3 files changed, 6 insertions, 0 deletions
diff --git a/drivers/net/enic/Makefile b/drivers/net/enic/Makefile
index 10736a5..4e0c83d 100644
--- a/drivers/net/enic/Makefile
+++ b/drivers/net/enic/Makefile
@@ -13,6 +13,8 @@ EXPORT_MAP := rte_pmd_enic_version.map
LIBABIVER := 1
+# Experimental APIs used: rte_intr_ack
+CFLAGS += -DALLOW_EXPERIMENTAL_API
CFLAGS += -I$(SRCDIR)/base/
CFLAGS += -I$(SRCDIR)
CFLAGS += -O3
diff --git a/drivers/net/enic/enic_main.c b/drivers/net/enic/enic_main.c
index f5b9b0d..57574a5 100644
--- a/drivers/net/enic/enic_main.c
+++ b/drivers/net/enic/enic_main.c
@@ -448,6 +448,8 @@ enic_intr_handler(void *arg)
enic_link_update(dev);
_rte_eth_dev_callback_process(dev, RTE_ETH_EVENT_INTR_LSC, NULL);
enic_log_q_error(enic);
+ /* Re-enable irq in case of INTx */
+ rte_intr_ack(&enic->pdev->intr_handle);
}
static int enic_rxq_intr_init(struct enic *enic)
diff --git a/drivers/net/enic/meson.build b/drivers/net/enic/meson.build
index 1bd7cc7..e5eeb56 100644
--- a/drivers/net/enic/meson.build
+++ b/drivers/net/enic/meson.build
@@ -1,6 +1,8 @@
# SPDX-License-Identifier: BSD-3-Clause
# Copyright(c) 2018 Cisco Systems, Inc.
+# Experimental APIs used: rte_intr_ack
+cflags += ['-DALLOW_EXPERIMENTAL_API']
sources = files(
'base/vnic_cq.c',
'base/vnic_dev.c',