From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from dpdk.org (dpdk.org [92.243.14.124]) by inbox.dpdk.org (Postfix) with ESMTP id 62EC1A034E for ; Thu, 7 Nov 2019 15:42:47 +0100 (CET) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 4074E1BF32; Thu, 7 Nov 2019 15:42:47 +0100 (CET) Received: from alln-iport-3.cisco.com (alln-iport-3.cisco.com [173.37.142.90]) by dpdk.org (Postfix) with ESMTP id 00BCD1BF05; Thu, 7 Nov 2019 15:42:43 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=cisco.com; i=@cisco.com; l=2014; q=dns/txt; s=iport; t=1573137764; x=1574347364; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=I0oVPRUO2dbcNurn82xVuGofVoHKgX6vCJcmy0blZ0o=; b=bYix+Mxy6FMi7JwGdP+Ygqv5l4SAJELH4fGiHSKgJ8wrFURSDzz8xlyG i3hyBQ/mNrpZDJBesCcQq/b3F8VRiFTzmf5u50FK9PRrvoTOlt2SePmRU +65BrHwWAhS+c9Hpnh7XDll9oK1vpUnj/2xS0/t8fcxLJzguFz7rl0Qrf A=; X-IronPort-AV: E=Sophos;i="5.68,278,1569283200"; d="scan'208";a="374727014" Received: from alln-core-11.cisco.com ([173.36.13.133]) by alln-iport-3.cisco.com with ESMTP/TLS/DHE-RSA-SEED-SHA; 07 Nov 2019 14:42:43 +0000 Received: from cisco.com (savbu-usnic-a.cisco.com [10.193.184.48]) by alln-core-11.cisco.com (8.15.2/8.15.2) with ESMTP id xA7Eggpk019789; Thu, 7 Nov 2019 14:42:42 GMT Received: by cisco.com (Postfix, from userid 508933) id 9D9D720F2003; Thu, 7 Nov 2019 06:42:42 -0800 (PST) From: Hyong Youb Kim To: Ferruh Yigit Cc: dev@dpdk.org, John Daley , Hyong Youb Kim , stable@dpdk.org Date: Thu, 7 Nov 2019 06:42:24 -0800 Message-Id: <20191107144224.629-1-hyonkim@cisco.com> X-Mailer: git-send-email 2.22.0 In-Reply-To: <20191102013502.17965-1-hyonkim@cisco.com> References: <20191102013502.17965-1-hyonkim@cisco.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Outbound-SMTP-Client: 10.193.184.48, savbu-usnic-a.cisco.com X-Outbound-Node: alln-core-11.cisco.com Subject: [dpdk-stable] [PATCH v2] net/enic: re-enable link status change interrupt X-BeenThere: stable@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: patches for DPDK stable branches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: stable-bounces@dpdk.org Sender: "stable" 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 Reviewed-by: John Daley --- v2: spell out experimental APIs used drivers/net/enic/Makefile | 2 ++ drivers/net/enic/enic_main.c | 2 ++ drivers/net/enic/meson.build | 2 ++ 3 files changed, 6 insertions(+) diff --git a/drivers/net/enic/Makefile b/drivers/net/enic/Makefile index 10736a567..4e0c83da5 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 f5b9b0dcb..57574a5f7 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 1bd7cc7e1..e5eeb5667 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', -- 2.22.0