Skip to content

Commit

Permalink
net/enic: re-enable link status change interrupt
Browse files Browse the repository at this point in the history
[ upstream commit 8bac78f ]

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: fefed3d ("enic: new driver")

Signed-off-by: Hyong Youb Kim <hyonkim@cisco.com>
Reviewed-by: John Daley <johndale@cisco.com>
  • Loading branch information
Hyong Youb Kim authored and kevintraynor committed Dec 11, 2019
1 parent 9b30de5 commit 759a205
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 0 deletions.
2 changes: 2 additions & 0 deletions drivers/net/enic/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 2 additions & 0 deletions drivers/net/enic/enic_main.c
Original file line number Diff line number Diff line change
Expand Up @@ -441,6 +441,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)
Expand Down
2 changes: 2 additions & 0 deletions drivers/net/enic/meson.build
Original file line number Diff line number Diff line change
@@ -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',
Expand Down

0 comments on commit 759a205

Please sign in to comment.