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 1E3CAA04FD; Fri, 7 Oct 2022 19:45:38 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id DD26542BA3; Fri, 7 Oct 2022 19:44:41 +0200 (CEST) Received: from NAM12-DM6-obe.outbound.protection.outlook.com (mail-dm6nam12on2040.outbound.protection.outlook.com [40.107.243.40]) by mails.dpdk.org (Postfix) with ESMTP id 20B3342B8F for ; Fri, 7 Oct 2022 19:44:40 +0200 (CEST) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=JAAGXOOSq+2OBKpMob2zsldHXwCL3vbu5BdsuEfGib9zORTvyvQTi7hdAFg7nHXmKYAc5bb7GmDayjHPKN9TdWGhPw/ohV4t6rF7fuDyPBK8El7KiL+n6YZ/Z+1S7/BNj2E4EIOEhNxrUGYc57PXKBPuoVrhmGiF2gr3+K4kn4/Qha+pMSN8kolrprHCEhs239s/4YFfeAgzkFDKVQpUHwWc/5k2YkVho/89ik1APqbAIoK1z2kPuR0Fxa3HA6qQ44RVOM6ici80rDXF/bl6z13o4TcyyAtwbSoitn7+Q5egKPlEwKqr/8QlquBZ4ahUQx3wT2CTIXR9djw1S4cA+w== 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=fL8mwSvjFIgV9Uy3wkB3O1B3PFe+GP8B5dmfM6IeOISXXraJLfS3fzjXmDT6vcp7o1uMygljfmk7Fsff3W1khtUqpBAU1jj85CFJmi94HU+kN3wfguGaPnkkHVxebKmpSi0URDwgAohDY3fBtVBkzCr+2Ar3/7mzrmtwPCGuEyv/n+5UcPCYrILSjyxeld0cTq/VOhBj60zGqsxI4FxP+GbQV9rEKBUQRTDNvsc4NccdXiL8TYIT/5CzjhmnCOd+ybliOpm17pppI1dWCmfyCoObT5/v+dadEAgcCTtcBwBbTbgmKlzW48FwPwLB0o7OpIHy9ANwhRFBxCt6sF7qOw== 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=mRidBh2/pD9k5TuQSXGXd69XheCoKq25wHw0eLUP/gV99m4DwtwBUiTPUKJqshitDG54R0Ownc/3UuhS6NTf0DBByIgPc8dyknoenkcaTNiPWW5VmhOfo+1gC+7svb4rHa4V17odOf5Y9SgcanRLuYDKEIu8CxRWeIBrLoxKZvM= Received: from MW4PR03CA0003.namprd03.prod.outlook.com (2603:10b6:303:8f::8) by MW4PR12MB6731.namprd12.prod.outlook.com (2603:10b6:303:1eb::11) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5676.30; Fri, 7 Oct 2022 17:44:36 +0000 Received: from CO1NAM11FT055.eop-nam11.prod.protection.outlook.com (2603:10b6:303:8f:cafe::e) by MW4PR03CA0003.outlook.office365.com (2603:10b6:303:8f::8) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5676.24 via Frontend Transport; Fri, 7 Oct 2022 17:44:36 +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 CO1NAM11FT055.mail.protection.outlook.com (10.13.175.129) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.20.5709.10 via Frontend Transport; Fri, 7 Oct 2022 17:44:36 +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; Fri, 7 Oct 2022 12:44:33 -0500 From: Andrew Boyer To: CC: Andrew Boyer Subject: [PATCH 11/35] net/ionic: only allocate interrupts if required Date: Fri, 7 Oct 2022 10:43:12 -0700 Message-ID: <20221007174336.54354-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: CO1NAM11FT055:EE_|MW4PR12MB6731:EE_ X-MS-Office365-Filtering-Correlation-Id: 058bcc63-f283-4791-114d-08daa88b9a14 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: KLYYukDSW1EsVR79t85fNtimaRbznyXBH/5jP+G56cCZ/hg9Er/Me3kebAKaonVR35jJtoCszjlUZ/S9xvicQ31MS+RhZkEHoLLVrmO3AolnLdDPJ9RfsjTX46v45F8FLxUS0gZ0vBCPdq7iKb2xOzx4yD0p6D4+GqRohwT0twt/IIs44uVn36kD+cKbLhRVh/vghY0CV1CMSn2v+Q88rJb8+pzojfvIAtlyHtWO21x/YUrkwTgpFw/3MoLZKeVj3QOXumhoeLdrgNy6UQoZjjn018XarMDJgT6L65lJvUNDXqzF6DQ3GgjexpIvBJh4oaHz52VnS0InsA41A9gUYVSc95d2QSBL18ZGwaOsjXlmLu7LOJLiL72k9/4W5ZQCx/xPgBb/sALojO0F9Bn3+8IUehb+M3gWJykDkL9U/4F1bzQJhrXYqkOOJt/UUFNDztR11ZGdpS6noA9HJyrzD8CxIwsPwdm9waFXpyg1vkI8UAe/TIRjdS6gD6USMgIQdh2QRxi9t1BE0ioPL8HrasbsBD6RI6O8nM1nx992slx5SrIM75Ic5T0+vruxyCUyKOGcp+9Ek3EizvaYwhp1toO5mTq2eWEgr4qfjLNfFzFmZQ5b9pG7shOCHpSpmBtASz3ZD4fz+4oNqrulThJMRHKh1CRrBvOxagdSShgiSVHF5PgtcWGzMsJO22DHM5vXJFWbvmEdPMq/NrBol16b2j63sTsS6UItTbK7mqjhDhCLB0tGIe4lcVGRVq3IGgAiDGoKRYklBvN8/OPQ9EzTf7/w9j96BLvZnRWL0HI3wQ/UhtgD4ZsK+B2dkHCffFGj 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)(39860400002)(396003)(376002)(346002)(451199015)(40470700004)(46966006)(36840700001)(40480700001)(426003)(6916009)(81166007)(82740400003)(316002)(8676002)(356005)(478600001)(82310400005)(1076003)(40460700003)(5660300002)(70206006)(70586007)(4326008)(186003)(41300700001)(26005)(44832011)(36860700001)(36756003)(8936002)(2906002)(336012)(2616005)(47076005)(16526019)(86362001)(6666004)(83380400001)(36900700001); DIR:OUT; SFP:1101; X-OriginatorOrg: amd.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 07 Oct 2022 17:44:36.3554 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 058bcc63-f283-4791-114d-08daa88b9a14 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: CO1NAM11FT055.eop-nam11.prod.protection.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: MW4PR12MB6731 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