From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id 5399FA0548 for ; Wed, 10 Nov 2021 07:49:34 +0100 (CET) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 4D0CF40142; Wed, 10 Nov 2021 07:49:34 +0100 (CET) Received: from NAM12-BN8-obe.outbound.protection.outlook.com (mail-bn8nam12on2057.outbound.protection.outlook.com [40.107.237.57]) by mails.dpdk.org (Postfix) with ESMTP id 6F02F40142 for ; Wed, 10 Nov 2021 07:49:32 +0100 (CET) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=knMDX6dh9CKFQbeelXqxtUhP3A+lQuMTNGgIRsY7oWyaQx5FXwzqfA2eR8uL52/txb9ldxYAeRewsv+mjNg7pIPGolC7Djxpzpf3+a05qBm50NHBsekUqxez5cmEaHgGLoIFBGe2mxUTLlI88uSkqRDKTUtb7U0gxU433ist21YfiAXoqLIn4m3Le1c7lajx1+tXp95pKCMAEudgNRhGsPSBlr+5MoJuRU/pQf9b61xsI8h5Lz01mNKX/a9Eo4KhhoP4bYzV5dFa+THh2EOGKQujUEVwpnhVjdKZCDXEQQinCsirRS+CTVPjbYByzox76dVhsVUTcl3/YJ8lg/Gh5Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=l2rFv5fJTDRZjFfMW0j5I2070iy++GopkaXL9Bp2ipY=; b=bUhjKTDkbK/OlaT2uabIofdnB8lZ535zYnq/OQ+P3QTrTKeRCzQd8W/mlPiHNy5gFtrqfM/VDnkRzVBv/qxqA8yoVr6ip4F9MCkfRQhrSngh4ROnljvJnbg5RI9vlpIPf1IPsTjUHfENK6QSAV4Usc8aIvOFlz9ybJ6jWbxGmKFlrzCVpWnEaw4f1S9NPki3L7DTQtfuiTa68ozcG8rhN6VZPdBC0ucC+mgWkqYLEny6Y3A1yfiqkP90Q2puls0ettZgTK73gko0/2XUhBdF3lSWvIDgdgtvpZxe7gVt4dm5ybuZaAPAkqt7eX83LMys8Tayh3WiCs+ps1rrPGtPfA== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 216.228.112.34) smtp.rcpttodomain=dpdk.org smtp.mailfrom=nvidia.com; dmarc=pass (p=quarantine sp=quarantine pct=100) action=none header.from=nvidia.com; dkim=none (message not signed); arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=Nvidia.com; s=selector2; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=l2rFv5fJTDRZjFfMW0j5I2070iy++GopkaXL9Bp2ipY=; b=rqtlPU3twTNczXPN+tLcIcakRG1zfNQv+LZ5RvHiCP6fxzXDaGPi8h0oK83YAoDFQpEi8iICM6kMY6hw1qh+U7Dh0Bl5qzP5qJvzFZkWsvDTxCDDO8LDRI2gTvzNAF5wHjS8k1DOGl2X/fedGlgTEJHPwQTszZrOaB6TFJ3feJV+gAtP6UzA87N53C4mZ3W+bLANLWa3nPFZQDHZxrt3lpCahHTe4SaM4jSWGbB7c4qAWpVALVOaHr7zbLS2IXCza6/Wi/ldCgYPQI4VAX0DuRq0frpMNX8rGhBirRK9vFC5HjMR5WLBhdb6GYB/mhtaSsQh4eLocF8ZEJO7NKItOA== Received: from BN8PR07CA0030.namprd07.prod.outlook.com (2603:10b6:408:ac::43) by MW2PR12MB2409.namprd12.prod.outlook.com (2603:10b6:907:9::26) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4669.10; Wed, 10 Nov 2021 06:49:30 +0000 Received: from BN8NAM11FT025.eop-nam11.prod.protection.outlook.com (2603:10b6:408:ac:cafe::bf) by BN8PR07CA0030.outlook.office365.com (2603:10b6:408:ac::43) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4669.13 via Frontend Transport; Wed, 10 Nov 2021 06:49:30 +0000 X-MS-Exchange-Authentication-Results: spf=pass (sender IP is 216.228.112.34) smtp.mailfrom=nvidia.com; dpdk.org; dkim=none (message not signed) header.d=none;dpdk.org; dmarc=pass action=none header.from=nvidia.com; Received-SPF: Pass (protection.outlook.com: domain of nvidia.com designates 216.228.112.34 as permitted sender) receiver=protection.outlook.com; client-ip=216.228.112.34; helo=mail.nvidia.com; Received: from mail.nvidia.com (216.228.112.34) by BN8NAM11FT025.mail.protection.outlook.com (10.13.177.136) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384) id 15.20.4669.10 via Frontend Transport; Wed, 10 Nov 2021 06:49:27 +0000 Received: from nvidia.com (172.20.187.6) by HQMAIL107.nvidia.com (172.20.187.13) with Microsoft SMTP Server (TLS) id 15.0.1497.18; Wed, 10 Nov 2021 06:49:24 +0000 From: Xueming Li To: Jiawen Wu CC: Luca Boccassi , dpdk stable Date: Wed, 10 Nov 2021 14:30:38 +0800 Message-ID: <20211110063216.2744012-155-xuemingl@nvidia.com> X-Mailer: git-send-email 2.33.0 In-Reply-To: <20211110063216.2744012-1-xuemingl@nvidia.com> References: <20211110063216.2744012-1-xuemingl@nvidia.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Type: text/plain X-Originating-IP: [172.20.187.6] X-ClientProxiedBy: HQMAIL101.nvidia.com (172.20.187.10) To HQMAIL107.nvidia.com (172.20.187.13) X-EOPAttributedMessage: 0 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 10be817c-7f3a-4785-f83c-08d9a4163d35 X-MS-TrafficTypeDiagnostic: MW2PR12MB2409: X-Microsoft-Antispam-PRVS: X-MS-Oob-TLC-OOBClassifiers: OLM:9508; X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: CScGtCGRytShsQN3TT9aP/TtnR5PL54dQI4oKtrBRFokjApj7sLRUH5057G1CY0Ca+yOcpipb0p4qJPYgxJer1j4GCMUfEG73mZmB57a9slcB/YGNNO4X5CuLNlyOWf8UFRSRLGwchQcG2bB4TXjGumQrdN1WVAuj0p8uK0QllAFqOFKbeabPv1/eWOUBJHxFGcKUi4PiqzZZAU7wsVYmQ9RNiDoIHwTdTQ7t2rKDYjykIr3cAz06fwjjlcI33CQxSldGgGV9B3I8gdlu5bDDOkqlaN5Qj8rAAffzvtPfw9WVQbKPAsmUOxTwyd0yviSzpgrSu/L/Bbh8zQK/TRgzWtkoIURb/AFn105DD0vC0+FIPY3T+v1gHxP+UDWuJgpDaU0vJV39ifY/MaKgL5KaOh15qS8wETYGaIKPgiP868lDpgyINqx3JHuvj+BfkrKWsz8G5SgHW/3Lw36V4Mjfl/veSHJFUD61tZkZ4EIdDMOS0OQpgPBZ1rX+a46R+RaGZBdY6O+4Ofx7/UX7Ik/hEq/NTE9hWb1sDucP8fgynVjPpngISJonD+vbsLtpfg/kHtEyz8n2BanBnDi3kIGrs6/xko7JtklZ4xqiNzHLqPismJ7GS/krrjSu9eqszhAnJYO4rMrOLBVkB8m1lsHgiCN5WTmX/68X50d5rQnooG8SByyTseWjypUWWu3cWGe9rQDx+E4JI5a5x79aKLIMat9RUk2ayfcsq1o8+GyKfNfamTjbpVtZykvQ9kMO4moZAJiqPNwrRjGub9v7l3qZmGwj8UiUa1MSYIs9zKKTSsp+2BxYuBcMo3+tuyxtB0duxniGKbzEBN2PPa8JPZZSg== X-Forefront-Antispam-Report: CIP:216.228.112.34; CTRY:US; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:mail.nvidia.com; PTR:schybrid03.nvidia.com; CAT:NONE; SFS:(4636009)(46966006)(36840700001)(16526019)(70206006)(82310400003)(54906003)(36756003)(186003)(36860700001)(966005)(53546011)(55016002)(83380400001)(6916009)(8936002)(7696005)(26005)(508600001)(2616005)(6666004)(70586007)(336012)(356005)(6286002)(4001150100001)(47076005)(2906002)(1076003)(8676002)(86362001)(316002)(426003)(7636003)(5660300002)(4326008); DIR:OUT; SFP:1101; X-OriginatorOrg: Nvidia.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 10 Nov 2021 06:49:27.1099 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 10be817c-7f3a-4785-f83c-08d9a4163d35 X-MS-Exchange-CrossTenant-Id: 43083d15-7273-40c1-b7db-39efd9ccc17a X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=43083d15-7273-40c1-b7db-39efd9ccc17a; Ip=[216.228.112.34]; Helo=[mail.nvidia.com] X-MS-Exchange-CrossTenant-AuthSource: BN8NAM11FT025.eop-nam11.prod.protection.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: MW2PR12MB2409 Subject: [dpdk-stable] patch 'net/txgbe: fix to get interrupt status' has been queued to stable release 20.11.4 X-BeenThere: stable@dpdk.org X-Mailman-Version: 2.1.29 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" Hi, FYI, your patch has been queued to stable release 20.11.4 Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet. It will be pushed if I get no objections before 11/12/21. So please shout if anyone has objections. Also note that after the patch there's a diff of the upstream commit vs the patch applied to the branch. This will indicate if there was any rebasing needed to apply to the stable branch. If there were code changes for rebasing (ie: not only metadata diffs), please double check that the rebase was correctly done. Queued patches are on a temporary branch at: https://github.com/steevenlee/dpdk This queued commit can be viewed at: https://github.com/steevenlee/dpdk/commit/d551929c9282544e0203138d84c9e45851266066 Thanks. Xueming Li --- >From d551929c9282544e0203138d84c9e45851266066 Mon Sep 17 00:00:00 2001 From: Jiawen Wu Date: Wed, 13 Oct 2021 10:45:19 +0800 Subject: [PATCH] net/txgbe: fix to get interrupt status Cc: Xueming Li [ upstream commit ef6427a3f2868af08dc888031dcdf4eb41451b24 ] It's necessary to set 1 on TXGBE_PX_INTA register to get interrupts normally, when legacy interrupt mode is used. Fixes: 2fc745e6b606 ("net/txgbe: add interrupt operation") Signed-off-by: Jiawen Wu --- drivers/net/txgbe/base/txgbe_regs.h | 1 + drivers/net/txgbe/txgbe_ethdev.c | 12 +++++++++--- 2 files changed, 10 insertions(+), 3 deletions(-) diff --git a/drivers/net/txgbe/base/txgbe_regs.h b/drivers/net/txgbe/base/txgbe_regs.h index 052609e3c1..83c219a6e2 100644 --- a/drivers/net/txgbe/base/txgbe_regs.h +++ b/drivers/net/txgbe/base/txgbe_regs.h @@ -1218,6 +1218,7 @@ enum txgbe_5tuple_protocol { #define TXGBE_IVARMISC 0x0004FC #define TXGBE_IVARMISC_VEC(v) LS(v, 0, 0x7) #define TXGBE_IVARMISC_VLD MS(7, 0x1) +#define TXGBE_PX_INTA 0x000110 #define TXGBE_ICR(i) (0x000120 + (i) * 4) /* 0-1 */ #define TXGBE_ICR_MASK MS(0, 0xFFFFFFFF) #define TXGBE_ICS(i) (0x000130 + (i) * 4) /* 0-1 */ diff --git a/drivers/net/txgbe/txgbe_ethdev.c b/drivers/net/txgbe/txgbe_ethdev.c index d9cc7d236a..a3ed99bae3 100644 --- a/drivers/net/txgbe/txgbe_ethdev.c +++ b/drivers/net/txgbe/txgbe_ethdev.c @@ -102,7 +102,8 @@ static void txgbe_dev_link_status_print(struct rte_eth_dev *dev); static int txgbe_dev_lsc_interrupt_setup(struct rte_eth_dev *dev, uint8_t on); static int txgbe_dev_macsec_interrupt_setup(struct rte_eth_dev *dev); static int txgbe_dev_rxq_interrupt_setup(struct rte_eth_dev *dev); -static int txgbe_dev_interrupt_get_status(struct rte_eth_dev *dev); +static int txgbe_dev_interrupt_get_status(struct rte_eth_dev *dev, + struct rte_intr_handle *handle); static int txgbe_dev_interrupt_action(struct rte_eth_dev *dev, struct rte_intr_handle *handle); static void txgbe_dev_interrupt_handler(void *param); @@ -2669,12 +2670,17 @@ txgbe_dev_macsec_interrupt_setup(struct rte_eth_dev *dev) * - On failure, a negative value. */ static int -txgbe_dev_interrupt_get_status(struct rte_eth_dev *dev) +txgbe_dev_interrupt_get_status(struct rte_eth_dev *dev, + struct rte_intr_handle *intr_handle) { uint32_t eicr; struct txgbe_hw *hw = TXGBE_DEV_HW(dev); struct txgbe_interrupt *intr = TXGBE_DEV_INTR(dev); + if (intr_handle->type != RTE_INTR_HANDLE_UIO && + intr_handle->type != RTE_INTR_HANDLE_VFIO_MSIX) + wr32(hw, TXGBE_PX_INTA, 1); + /* clear all cause mask */ txgbe_disable_intr(hw); @@ -2877,7 +2883,7 @@ txgbe_dev_interrupt_handler(void *param) { struct rte_eth_dev *dev = (struct rte_eth_dev *)param; - txgbe_dev_interrupt_get_status(dev); + txgbe_dev_interrupt_get_status(dev, dev->intr_handle); txgbe_dev_interrupt_action(dev, dev->intr_handle); } -- 2.33.0 --- Diff of the applied patch vs upstream commit (please double-check if non-empty: --- --- - 2021-11-10 14:17:08.782784932 +0800 +++ 0154-net-txgbe-fix-to-get-interrupt-status.patch 2021-11-10 14:17:01.950745436 +0800 @@ -1 +1 @@ -From ef6427a3f2868af08dc888031dcdf4eb41451b24 Mon Sep 17 00:00:00 2001 +From d551929c9282544e0203138d84c9e45851266066 Mon Sep 17 00:00:00 2001 @@ -4,0 +5,3 @@ +Cc: Xueming Li + +[ upstream commit ef6427a3f2868af08dc888031dcdf4eb41451b24 ] @@ -10 +12,0 @@ -Cc: stable@dpdk.org @@ -19 +21 @@ -index 990589b013..48d9300a2e 100644 +index 052609e3c1..83c219a6e2 100644 @@ -22 +24 @@ -@@ -1219,6 +1219,7 @@ enum txgbe_5tuple_protocol { +@@ -1218,6 +1218,7 @@ enum txgbe_5tuple_protocol { @@ -31 +33 @@ -index b267da462b..ab972a3a35 100644 +index d9cc7d236a..a3ed99bae3 100644 @@ -34 +36,2 @@ -@@ -109,7 +109,8 @@ static int txgbe_dev_lsc_interrupt_setup(struct rte_eth_dev *dev, uint8_t on); +@@ -102,7 +102,8 @@ static void txgbe_dev_link_status_print(struct rte_eth_dev *dev); + static int txgbe_dev_lsc_interrupt_setup(struct rte_eth_dev *dev, uint8_t on); @@ -36 +38,0 @@ - static int txgbe_dev_misc_interrupt_setup(struct rte_eth_dev *dev); @@ -44 +46 @@ -@@ -2938,12 +2939,17 @@ txgbe_dev_macsec_interrupt_setup(struct rte_eth_dev *dev) +@@ -2669,12 +2670,17 @@ txgbe_dev_macsec_interrupt_setup(struct rte_eth_dev *dev) @@ -63 +65 @@ -@@ -3165,7 +3171,7 @@ txgbe_dev_interrupt_handler(void *param) +@@ -2877,7 +2883,7 @@ txgbe_dev_interrupt_handler(void *param)