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 66320A0560; Tue, 18 Oct 2022 21:45:09 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 6A25641145; Tue, 18 Oct 2022 21:45:06 +0200 (CEST) Received: from NAM10-MW2-obe.outbound.protection.outlook.com (mail-mw2nam10on2051.outbound.protection.outlook.com [40.107.94.51]) by mails.dpdk.org (Postfix) with ESMTP id 6FD32410EE for ; Tue, 18 Oct 2022 21:45:04 +0200 (CEST) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=iqE8StBsp7mtQQzj3RHoSYs/WnyMWZ3DZA397PjoyEMTz2iJBZuNDe81vYWwNk5Y411lKI61cR0wPQQFqGV0xGRirFRtb/DNTv3eFIvNbUTYpu1oMcCyBJ9S6FbGwYykzQoq1fnWbBIYJzZO3g4P/KtCLJXaQHqJOsOZNAf5dNRAn/velgsWsLcvEPi5jLmgnCLYwa+qyAc+aYL3tnq0mEnEw9Zlkj69Yct+Eurpm2KbyqDx81k4USJVCO2OEcr6RBpjIPFmGq9R07n+SrfSLzYIGqvQKIRAUTzJzvzo3MVkb2WAV6mlynw3ezYMelQJ7Othe7t7IUlUbUAwB5tuLQ== 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=bYQ/2R8nkyiyryLK3YHdeRx1Hry+iJHZVVjooasybL8=; b=AyZrvKY7i8oghqOWusHIu4twtaj5K8rfmi7fftjJaB3SToP8M78RdWP5BboysLnHKXJM/CWDTjA0cjwkiPFZCpqoj6v/VaEhYJg0rkR7XVm+kqoNt+hcbdPYlqtz8FVHiVpE3K8waoMZ5iL/sDc8JwfVhZ6kX4GpYOKUOchGEbCnVABbfo7KUgq744GSA7QptzarKpQRvnncI9dGN1XUgS66yp97JHUM9gIELbNYEQtaeCU/IAXiuGIKCb+R4VM7Ta0oHqEOVL4DY1BcdcRPsXYhqmoeQnOTQ9P9BKSfBk4H4fQkOaOIKSwL2OVfQtFwr2nPWJOdrk0JKWUXpKBXpg== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 165.204.84.17) smtp.rcpttodomain=dpdk.org smtp.mailfrom=amd.com; dmarc=pass (p=quarantine sp=quarantine pct=100) action=none header.from=amd.com; dkim=none (message not signed); arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=amd.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=bYQ/2R8nkyiyryLK3YHdeRx1Hry+iJHZVVjooasybL8=; b=OKuVNnkD/jC9kMMjml8jHNu2PinXpPB8/Gp9feXFpSwnFd6LVNVJWzYdbJI/qY0KJG1lQnE6OuqK0ieCE2FDPLB0Evgnl/SdlInVbfRfx4JuY6L8+zmixXEwHOfLG2nUTQpUvl6uE2JnLqxJYWpwz0/mnhRsdmGW5rF6o7ce5pg= Received: from DM6PR18CA0028.namprd18.prod.outlook.com (2603:10b6:5:15b::41) by BL3PR12MB6620.namprd12.prod.outlook.com (2603:10b6:208:38f::21) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5723.32; Tue, 18 Oct 2022 19:45:00 +0000 Received: from DM6NAM11FT008.eop-nam11.prod.protection.outlook.com (2603:10b6:5:15b:cafe::8f) by DM6PR18CA0028.outlook.office365.com (2603:10b6:5:15b::41) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5723.32 via Frontend Transport; Tue, 18 Oct 2022 19:44:59 +0000 X-MS-Exchange-Authentication-Results: spf=pass (sender IP is 165.204.84.17) smtp.mailfrom=amd.com; dkim=none (message not signed) header.d=none;dmarc=pass action=none header.from=amd.com; Received-SPF: Pass (protection.outlook.com: domain of amd.com designates 165.204.84.17 as permitted sender) receiver=protection.outlook.com; client-ip=165.204.84.17; helo=SATLEXMB04.amd.com; pr=C Received: from SATLEXMB04.amd.com (165.204.84.17) by DM6NAM11FT008.mail.protection.outlook.com (10.13.172.85) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.20.5746.16 via Frontend Transport; Tue, 18 Oct 2022 19:44:59 +0000 Received: from driver-dev1.pensando.io (10.180.168.240) by SATLEXMB04.amd.com (10.181.40.145) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2375.31; Tue, 18 Oct 2022 14:44:58 -0500 From: Andrew Boyer To: CC: Andrew Boyer Subject: [PATCH v2 14/36] net/ionic: only request notifyq interrupt if supported Date: Tue, 18 Oct 2022 12:41:09 -0700 Message-ID: <20221018194131.23006-15-andrew.boyer@amd.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20221011005032.47584-1-andrew.boyer@amd.com> References: <20221011005032.47584-1-andrew.boyer@amd.com> MIME-Version: 1.0 Content-Type: text/plain X-Originating-IP: [10.180.168.240] X-ClientProxiedBy: SATLEXMB03.amd.com (10.181.40.144) To SATLEXMB04.amd.com (10.181.40.145) X-EOPAttributedMessage: 0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: DM6NAM11FT008:EE_|BL3PR12MB6620:EE_ X-MS-Office365-Filtering-Correlation-Id: dd58bef4-3fbc-44e3-a05e-08dab1413e0f X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: 5Mqbaa68bmx95jJ6R5/MRGrWgs1fbQHDj9HeJqeGWQWnluy25uyH0qwPENR6PotU/f1elSnrY7mxQQBpq2D66UuJnL14azBcAKWQFIpnLmt7GUiQ6EJO+txhY7kQUv0/83uJa2DEWA5lF5zxTE8FLLZw1H/wzPVQkHzwHPZg3ykonDDqhXFgO66zPAqZ4qE1OgBTKEZT0MZ2/UfqTgfVm7td8f/w5ZfNSi7KFYUOR1v5Cfl9JuEHsom4x0lmEmqrUOFWgt84Y/0M6qCmqWm+YNpIybHhn01RcefhZqnHWNCEvZUj/vAHLsV9sibJzwvuvthgaqaO6tNH9e76BZC8kfOKsg8hS3UdoGVThW7MsSoMQ2izQRNYMX+UTzYssqhMG4SP7ftW8FoilLjelXSkF2r7yCwH8j7Rc3NZBvTZ6duLLs01z3y/Qcen4ZCEdRJVPxyjBNwHkOTU9Q3YEMTh+56eJl1x5PkyJKYtCTsHVFHM1MFc5jr5JMsiWlSXY/0HJsEF1OfkHbj4RGirVrQCSes+Y1J9eNvYjpnETQsRnv7pCDre5/M4gtYhMNdAvGqv411caFPusxq8eSE361uTR4mI7v6OGCFDrLNLD7d2ZVZDMlhlI6cJkAxJU4ElFIDHQZj7k0J0UQRKYqYdh0bErDJF84MUx9eOPXlRK+yze1cZgnVMxoEzYVXpduIWQw+DzBD2Re9sXzPd2WqEtcd47jg2XnPn/QSg4S5iyrA0aVr/J+LIrAMZ/+Lyc6OYP2zwxhQ4yzZVSOWXSjNsFIUiE2z7d/wVTdOPpiyO+7jnOi0XT9tQprkNlES3sGdMpAUJ X-Forefront-Antispam-Report: CIP:165.204.84.17; CTRY:US; LANG:en; SCL:1; SRV:; IPV:CAL; SFV:NSPM; H:SATLEXMB04.amd.com; PTR:InfoDomainNonexistent; CAT:NONE; SFS:(13230022)(4636009)(136003)(376002)(346002)(396003)(39860400002)(451199015)(36840700001)(40470700004)(46966006)(16526019)(2906002)(2616005)(83380400001)(1076003)(336012)(186003)(426003)(40460700003)(26005)(4326008)(8676002)(41300700001)(82740400003)(47076005)(40480700001)(86362001)(81166007)(82310400005)(356005)(316002)(36860700001)(5660300002)(36756003)(44832011)(8936002)(70206006)(6916009)(70586007)(6666004)(478600001)(36900700001); DIR:OUT; SFP:1101; X-OriginatorOrg: amd.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 18 Oct 2022 19:44:59.7767 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: dd58bef4-3fbc-44e3-a05e-08dab1413e0f X-MS-Exchange-CrossTenant-Id: 3dd8961f-e488-4e60-8e11-a82d994e183d X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=3dd8961f-e488-4e60-8e11-a82d994e183d; Ip=[165.204.84.17]; Helo=[SATLEXMB04.amd.com] X-MS-Exchange-CrossTenant-AuthSource: DM6NAM11FT008.eop-nam11.prod.protection.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: BL3PR12MB6620 X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Enable the interrupt if the platform & device support it. This prevents spurious interrupts on virtual platforms. Signed-off-by: Andrew Boyer --- drivers/net/ionic/ionic_lif.c | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/drivers/net/ionic/ionic_lif.c b/drivers/net/ionic/ionic_lif.c index 637473cca5..ccd7ea68bb 100644 --- a/drivers/net/ionic/ionic_lif.c +++ b/drivers/net/ionic/ionic_lif.c @@ -1350,6 +1350,7 @@ ionic_lif_notifyq_init(struct ionic_lif *lif) struct ionic_dev *idev = &lif->adapter->idev; struct ionic_notify_qcq *nqcq = lif->notifyqcq; struct ionic_queue *q = &nqcq->qcq.q; + uint16_t flags = IONIC_QINIT_F_ENA; int err; struct ionic_admin_ctx ctx = { @@ -1359,14 +1360,19 @@ ionic_lif_notifyq_init(struct ionic_lif *lif) .type = q->type, .ver = lif->qtype_info[q->type].version, .index = rte_cpu_to_le_32(q->index), - .intr_index = rte_cpu_to_le_16(nqcq->intr.index), - .flags = rte_cpu_to_le_16(IONIC_QINIT_F_IRQ | - IONIC_QINIT_F_ENA), + .intr_index = rte_cpu_to_le_16(IONIC_INTR_NONE), .ring_size = rte_log2_u32(q->num_descs), .ring_base = rte_cpu_to_le_64(q->base_pa), } }; + /* Only enable an interrupt if the device supports them */ + if (lif->adapter->intf->configure_intr != NULL) { + flags |= IONIC_QINIT_F_IRQ; + ctx.cmd.q_init.intr_index = rte_cpu_to_le_16(nqcq->intr.index); + } + ctx.cmd.q_init.flags = rte_cpu_to_le_16(flags); + IONIC_PRINT(DEBUG, "notifyq_init.index %d", q->index); IONIC_PRINT(DEBUG, "notifyq_init.ring_base 0x%" PRIx64 "", q->base_pa); IONIC_PRINT(DEBUG, "notifyq_init.ring_size %d", -- 2.17.1