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 75728A0544; Tue, 11 Oct 2022 02:52:25 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id B5FEB42BD0; Tue, 11 Oct 2022 02:51:56 +0200 (CEST) Received: from NAM02-SN1-obe.outbound.protection.outlook.com (mail-sn1anam02on2066.outbound.protection.outlook.com [40.107.96.66]) by mails.dpdk.org (Postfix) with ESMTP id CE45542BD8 for ; Tue, 11 Oct 2022 02:51:54 +0200 (CEST) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=L3YYsdDjeeXyzrD87KfVfSVtt/x3tMkwTmDj7YGSM9yDZxoRCpfY21421p1IB2EBmQDTaOQ0fJRNUmzAAwM65xTlnsoQu12m37QnTjJCRHdYnDykKd0u2hJgTR2UGGiCPBrB3Xexo3ygX1niEbF7U3fmu5wvn4FljYIh+48BInanLvDeAbVCmUlzaPWbL3cgzUWQ1nLteBYYvyxFc9D/KER6LlTvB5LexcU1MQ6B8ahMSm0WqMvvX2qSdaHyb1vzngYzxzNWG2hNMBhl8G1vyr9geGq65rNKh/ckN1lCv950i19SRFsGtjExSrWPCRGA5/C9jKdq3dqQRhWxx/TG8A== 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=RLe6yyZeOH698h+zMAsLn/wA0AHFzOS542/Bfa7PLqk=; b=bax+vEXZ1kh4Nu8WCWrxwU0fAnfhGi+7evV8Y+kQ20EgZ5diyfynQyB9aJpWrJ/XYpDFEtF0df9X1iMXrw/ina6GIYdiLCBU2p+7ospFBYDMqc1GKeEEcg43/gz2nAIxrRFzcRNlc1vn8uGxeFqIUty3NJw2z499KmJbU8WU9QtC0FaXw6fi+2YYfDb/KdklzTLUBbnW4atfDBad8OTbIzYw2XcrSjKh4ta/Nq1jEF1FbyRJ0X6SvPh4PsfSvulaqr1M8nZaS1UfU/ULWgyXALjn/tCdhEHxzGb/cYQXauuTfFAlO3iOeNMCnPS19veZ/JzSRtj2DkINnXim4wtIFQ== 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=RLe6yyZeOH698h+zMAsLn/wA0AHFzOS542/Bfa7PLqk=; b=Uat3zCAnvO5bMiw/1SC20sYiSIPOaU3ViVQjHLx/pjUxQfIYusUYJoUja2f1jqHG8BWP5Xy+ngpYt2vDH0SDpyU+Aj8uXLCC5Vso5KYsAVLLLxneQozr3yOyYzChwSoL+gH1Ymqhg77sB9kCY/bhkZdcvTigxfpInxbA78QtTgQ= Received: from BN0PR04CA0179.namprd04.prod.outlook.com (2603:10b6:408:eb::34) by DM6PR12MB4467.namprd12.prod.outlook.com (2603:10b6:5:2a8::14) 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:53 +0000 Received: from BN8NAM11FT009.eop-nam11.prod.protection.outlook.com (2603:10b6:408:eb:cafe::21) by BN0PR04CA0179.outlook.office365.com (2603:10b6:408:eb::34) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5709.15 via Frontend Transport; Tue, 11 Oct 2022 00:51:52 +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 BN8NAM11FT009.mail.protection.outlook.com (10.13.176.65) 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:52 +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:52 -0500 From: Andrew Boyer To: CC: Andrew Boyer Subject: [PATCH v1 11/35] net/ionic: only allocate interrupts if required Date: Mon, 10 Oct 2022 17:50:08 -0700 Message-ID: <20221011005032.47584-12-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: BN8NAM11FT009:EE_|DM6PR12MB4467:EE_ X-MS-Office365-Filtering-Correlation-Id: 15467a9c-90bb-40a4-4b92-08daab22c9b4 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: KlJgi1Oo8v87D92j32hMlt1PnK5m1hTqYR0qQJKMkdZmYiD1Pj32fpFoIYwId/TipLBKNedjRpx7HvTX+C/n3260CBw3UyJ9NPkUAwD8ozL3fP+epw8fwjZrlHNZAsj52zDCPXpV4yKlifjM8vpXh7SAQaRKkFmhSx9/G/Qlb7IyyBEjaEqhVaO9Dcw6pbcGy1i7ccEF8iAtBSQVrEC5YHMGrOKFppHdpZtAkjF8dz86gz9DL0SyYVTOOF+HUy3e6gvWz5S1O+2wUiH9O7VF4RaOlYAhofR1C2TtMdmnN5gM3wsuaFqeTczZUBBN8C5KfWcMLiMCp++DkSO8iAI8o0ITqGzKqRz+vxqi+kCFI8wlYlC9cv4+XT/WYdkQJJ5dfxLekuPjYQQpA186bQvhRufWW4JIcFji+cRSAbu2z06rFS6fUfrGCmIlFJghIXf/3lWl4Yr7c4wS+NyHEjivZx6zKR59GAL8TBFa7xvDUoWURIL5oMKTAO0TSVDfg42OsT2Sv/YpoMiutoKelRojICWzilxF+tz0Us7w1kjv+GpFDQGRpxITdG9MHQBq7cB7VAvphMaCpQelnIsYSd+/pSYF5kzPRgzDjYNZWXm2/5rfNIoi0NiG6KERX2S0wwE6vCnprpDSXxsUdShNIJ9QCTwEiMczwgHEEcO5HfkXtyhmWAZhKVUom4Imb1anKKhwkR6G9ohoy9P3HBYVUxVh6Y6LFJiShc1mJTBLhoOR15yCtfI9riVC8yespJDRF6x48EQEq2IQWxSVb9NWJGN0EdzNWH1n1e8qFznczAOMDBLfaFx34UhluiuOPK0g3bYC 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)(346002)(376002)(136003)(396003)(39860400002)(451199015)(40470700004)(36840700001)(46966006)(83380400001)(82740400003)(86362001)(81166007)(36756003)(2906002)(41300700001)(8676002)(44832011)(356005)(70206006)(8936002)(4326008)(40460700003)(5660300002)(36860700001)(70586007)(316002)(2616005)(426003)(47076005)(336012)(26005)(16526019)(6916009)(186003)(1076003)(6666004)(40480700001)(478600001)(82310400005)(36900700001); DIR:OUT; SFP:1101; X-OriginatorOrg: amd.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 11 Oct 2022 00:51:52.7151 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 15467a9c-90bb-40a4-4b92-08daab22c9b4 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: BN8NAM11FT009.eop-nam11.prod.protection.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: DM6PR12MB4467 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 There is no need to allocate the interrupt vector list if datapath packet interrupts are not enabled. This conserves resources. Signed-off-by: Andrew Boyer --- drivers/net/ionic/ionic_ethdev.c | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/drivers/net/ionic/ionic_ethdev.c b/drivers/net/ionic/ionic_ethdev.c index 815b7e3c9e..efea691b8f 100644 --- a/drivers/net/ionic/ionic_ethdev.c +++ b/drivers/net/ionic/ionic_ethdev.c @@ -1082,14 +1082,16 @@ ionic_configure_intr(struct ionic_adapter *adapter) return -1; } - if (rte_intr_dp_is_en(intr_handle)) + if (rte_intr_dp_is_en(intr_handle)) { IONIC_PRINT(DEBUG, "Packet I/O interrupt on datapath is enabled"); - if (rte_intr_vec_list_alloc(intr_handle, "intr_vec", adapter->nintrs)) { - IONIC_PRINT(ERR, "Failed to allocate %u vectors", - adapter->nintrs); - return -ENOMEM; + if (rte_intr_vec_list_alloc(intr_handle, "intr_vec", + adapter->nintrs)) { + IONIC_PRINT(ERR, "Failed to allocate %u vectors", + adapter->nintrs); + return -ENOMEM; + } } err = rte_intr_callback_register(intr_handle, -- 2.17.1