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 30F5AA0544; Tue, 11 Oct 2022 02:52:39 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 4164342BE7; Tue, 11 Oct 2022 02:51:59 +0200 (CEST) Received: from NAM02-BN1-obe.outbound.protection.outlook.com (mail-bn1nam07on2056.outbound.protection.outlook.com [40.107.212.56]) by mails.dpdk.org (Postfix) with ESMTP id 0D8E842BE4 for ; Tue, 11 Oct 2022 02:51:58 +0200 (CEST) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=N92sbrcaX8ortuMWP4DRL33rORPKcM7driXZ6qQNCSE82fSAsYIU90phkXO1JVhkdm21VoHvE/a27CK9HFpUmFe0INtwNDNSTPWVl+4GZPNV94XQwV7QULDiiC7FNQzynRHHGf+jAQCUk389QX/Fxn1x0uEQKJ+MnsI1VJSulRq0pLEyoeI7mAnXxOizcp/t56nDVtnO1rhUF7tpKtldbFhpqheUWVX0wKGLe5sjS3wKwi1rqA6mm0R9QysA1X7NDDgFosH06FFYe88WLClhaQja7T1JFYa/Nmvxo+22XdtVN/F9/DxfUpJ2vxgZFRLtN0S4/PNIQjNeJLSJ05o/SA== 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=AHUVFmyX1exniapbwQ+S9eFz1qsjq+kZz31gPp92TQ8=; b=Npfn1jA+HR52w3KZir+HaVKE4pwKTYxvQ/weRU6QMTfnNMlYA++57/7LyZlR3quiiqFcySYTggoshM5j9i7hBintCt5gmzlxKu20ZUWQZrmR4l19Pvjz3Ldk/dZF3aMfG4+N8HjY9o1PsxVqY2Sgn+ROlwKla6kaInyvK9Yn4Kj3jHHVYwd2JFC110k/VdL+5WHXGil2qJxyEvXlxGKyrKVwaVQnlrl6V6AgeHdppwCJPJar9tMCTjJ3v9LRrVtI7LOIng41YYrZ0khn4JWsLfOGPHT4IOkSqLIgoZ3NJpuN+T7mVgJFhIAbU6GCG7URpRnW6QpS8fYZr3qSGJpD9Q== 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=AHUVFmyX1exniapbwQ+S9eFz1qsjq+kZz31gPp92TQ8=; b=CZPnYa17Lxl+orq9ZWku1XdWktXYUorT/cTqjwD2Dj8/c/5t8ejlj86BDn57FT5gZ2JtcZm1MtDBZL/y4LgJSK45sC9cPxnWGvYA9lxGSWO/7IsPyT+fWLI6t0gHkyv5lEXdqP3NPV7OF9x8vfJ4WMKWcJxyMTBiVygmNGwq4e4= Received: from BN8PR07CA0026.namprd07.prod.outlook.com (2603:10b6:408:ac::39) by MW5PR12MB5681.namprd12.prod.outlook.com (2603:10b6:303:19e::20) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5709.15; Tue, 11 Oct 2022 00:51:56 +0000 Received: from BN8NAM11FT075.eop-nam11.prod.protection.outlook.com (2603:10b6:408:ac:cafe::b2) by BN8PR07CA0026.outlook.office365.com (2603:10b6:408:ac::39) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5709.20 via Frontend Transport; Tue, 11 Oct 2022 00:51:56 +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 BN8NAM11FT075.mail.protection.outlook.com (10.13.176.208) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.20.5709.10 via Frontend Transport; Tue, 11 Oct 2022 00:51:55 +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.28; Mon, 10 Oct 2022 19:51:55 -0500 From: Andrew Boyer To: CC: Andrew Boyer Subject: [PATCH v1 13/35] net/ionic: only request notifyq interrupt if supported Date: Mon, 10 Oct 2022 17:50:10 -0700 Message-ID: <20221011005032.47584-14-andrew.boyer@amd.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20221007174336.54354-1-andrew.boyer@amd.com> References: <20221007174336.54354-1-andrew.boyer@amd.com> MIME-Version: 1.0 Content-Type: text/plain X-Originating-IP: [10.180.168.240] X-ClientProxiedBy: SATLEXMB04.amd.com (10.181.40.145) To SATLEXMB04.amd.com (10.181.40.145) X-EOPAttributedMessage: 0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: BN8NAM11FT075:EE_|MW5PR12MB5681:EE_ X-MS-Office365-Filtering-Correlation-Id: a1852971-62c3-4775-aaf1-08daab22cb95 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: QhLSmppop8TJoFAofMFTTe8bfDFOyVUCE3wlBRe6K5rtqIrGhxud4j2RXt8nNHDbGSdIYokJ5uqCZPX0uP7pNSgOXpmDjRpOz1/igNmBGcTPV7vNx05YWGdgCn6sKqyI2f/In9JPj5pU1Rre4/uuVcYxHlrqvFDFsMhv3zV9wqq6rYC/W4chcoy/lcEO5OCo229AQYcedFmiA79NdakvEcFxpUnYtQ009ZlFi0HauSUmEZjLkeZUp+nZMPbBDTWosj6HaNFKs8LmIynYb9bi/wX14zfKxvl6hrVtTztYAR6sQoRMHZ09nO780lPpJiFpeO0SlWKjlXvbuSoXtHmB9kwH9/9TgXNffjWn3y8UYfiLt8Kp2PsHMYMnj9bdlcpjn9pOn+MzckvcaugMuCTO4Ednki5SFWwIkMyzfg3IB2VjZYLfc9FelV+/W63dfBS5ugYv2vuqBccRuG42WARjnAEUvRKmy4rpp74mxkP3VF0YeENeqPofhNLkxThuvQDMdlcowieQ8n5UH8kfKfGeKcesKTQr0vVSPAHbzeTAizoK+A1U0jJuX1DsAZRtVLO+TPClcI8/m5MUdXJwOf3QPpQofjdRZbe5tAVNp8trXk3qCH9PKUdUa7GvgvosYXnFdF7sHIyVONW6GpW1HbklM3hI1PW75CwNoIKOz4xYyn+JGYcNx3FP5ISi7dpzg5pQRBNl/SWjoO4K4tLSnLyfbtlZWfDjKV51OKR+eDgiyP+68V751SChBaWidTEKx4IHV1tpeMadbAhWpDlwYy0XHkB78U8bHOS/nhRjoOmmbvR9yQU14VhAAc658F65SIMI 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)(39860400002)(136003)(346002)(396003)(376002)(451199015)(46966006)(36840700001)(40470700004)(6666004)(83380400001)(82310400005)(40460700003)(8676002)(8936002)(47076005)(70586007)(70206006)(26005)(4326008)(6916009)(426003)(478600001)(41300700001)(36860700001)(81166007)(36756003)(44832011)(356005)(86362001)(82740400003)(2616005)(40480700001)(2906002)(1076003)(316002)(16526019)(336012)(186003)(5660300002)(36900700001); DIR:OUT; SFP:1101; X-OriginatorOrg: amd.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 11 Oct 2022 00:51:55.8698 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: a1852971-62c3-4775-aaf1-08daab22cb95 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: BN8NAM11FT075.eop-nam11.prod.protection.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: MW5PR12MB5681 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 4cc44a6a2f..220a4fdacb 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