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 66097A0560; Tue, 18 Oct 2022 21:45:02 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 36AB342684; Tue, 18 Oct 2022 21:45:01 +0200 (CEST) Received: from NAM12-DM6-obe.outbound.protection.outlook.com (mail-dm6nam12on2056.outbound.protection.outlook.com [40.107.243.56]) by mails.dpdk.org (Postfix) with ESMTP id DBB8A40395 for ; Tue, 18 Oct 2022 21:44:57 +0200 (CEST) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=fWXQXkE8JRlQfGcLQxUao+VQLsA9wgEpt+PZD+nET5PIghsvJDDRc+fFqkA64Y+UG1VFnwjqt862Pm5vWTTs4s6qtl8xV/Ooqrx3itJeeHVKn0uD2+recuGco0ehL1ZWOiV+YMvjY8bPqp8BwPDWoDIok/bIkFpnRtzotDFH75TpKa7xc6xhJBuWqxq6GO7B9ni0RfUm66c8HGDHBE0/8DNWtqtkbC8whHjasESIGb3AqnRe7jyZ8J4J7q1xhRc2reEIHG4zcTv4dSHrHZYwqNLFQvS/vLo1f6EuEVQSGMJx749KIifOQBkklbwTbF3LOmLmsIXIJlNnIss33EjcsA== 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=P5r2Zo5/EOc6agdlPho3L07P4h5cPltgEdvhcUgNAZQ=; b=KBzvvGkGdKzm8Nqel+gHLJjxa3i6yvdnWTHTBu2RgHsjzXmjYmF+TUhCPWXDYmW4JlJcPrkclT0kI7wrvkp+ml+BWCY4JLiAbbRufRCyJzHvdgVTmNz97dKPlMM6utYOP7XtNAIrXIGvvbCxtjrMem19RLcw4hVTPJS3FEEYEjhuw8K/BKUb/DFVt54ywLrJCDiuNnEgHKl+Lmf3vMnsD0art6ivqbHWnoTC6jbjTHkDu46SZTDcUSpJdZtaOj0mQwjyiOy8OAK62+YbkTJymgAutcmnDQIHXMO8H06ZVEOd1vL5Jo64jgYXWoYyNF1jClKk0WvWh6Z1hrTKi2Nvjw== 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=P5r2Zo5/EOc6agdlPho3L07P4h5cPltgEdvhcUgNAZQ=; b=y38onFDBcIaYkKKrWhhiZN8fpP1O+H+Sk3E+sU8Kzd9c6wzcS6gfNIQl05R1i9B9/u1oSMquGbbtOPP5WX+53zDE9L8Pu2h/aQS0jwaawUhszOIBiHDk2FuiznLemQSrs+6HIPeQVrUM37RngQfZIfd5y6sl04TtUpGMHsNMA14= Received: from BN9PR03CA0783.namprd03.prod.outlook.com (2603:10b6:408:13f::8) by LV2PR12MB5728.namprd12.prod.outlook.com (2603:10b6:408:17c::7) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5723.33; Tue, 18 Oct 2022 19:44:54 +0000 Received: from BN8NAM11FT020.eop-nam11.prod.protection.outlook.com (2603:10b6:408:13f:cafe::de) by BN9PR03CA0783.outlook.office365.com (2603:10b6:408:13f::8) 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:54 +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 BN8NAM11FT020.mail.protection.outlook.com (10.13.176.223) 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:53 +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:38 -0500 From: Andrew Boyer To: CC: Andrew Boyer Subject: [PATCH v2 12/36] net/ionic: only allocate interrupts if required Date: Tue, 18 Oct 2022 12:41:07 -0700 Message-ID: <20221018194131.23006-13-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: BN8NAM11FT020:EE_|LV2PR12MB5728:EE_ X-MS-Office365-Filtering-Correlation-Id: b806c325-242e-4469-eed6-08dab1413a96 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: z/cdRUetZgWIB9U4OPJGxA7Ee2IREBOr1wdDzrLVQRX9Yb1wazZZLRgSzEiUxcWr3UDnbodofsZJREcunS5C4grvho2lWNthEtuXir1VU6zFdLiWI8NXmra4hFyJAivfsQMa0fFg5d+YrD3CetpGUIh1oE1XQE1MBd9ULI++fwR6ujB/Cj5mmRvqsduvHIdAs1VvQfeMdfy+MFHVVMFDFyYOu/qb10KVyvcVgcFAT5tFVATCK4cIX5Qw/YKTYHO7p99u9gbLojG8gvBR6WWiqTxxC/P/5QVPpf/cv3FG5e3RKLztchrBrm0opXZpt3DS7XJz9/HFo3QXb5//ZndO85bCDf1XjsFdbBD/FcTlc5lCDRdZ2vUwzwOUleiQakCPlbTsaNCHhtsRSxHZnTtyvzrtd4f1xkt+LgTNdvqu9G8x4vzLXKZ8srnNdMa8OkbBjvXygWRYUGxbKfhi8WAk2JkMX13nK+hbf9KHbwyZKlKQzZzqLQ+c+34DwMJZSpAJUC1AGu+n1ko8uefjK3U54KPQ/Q+2LRmRWujD2KQfyLfL+flvg1w7AiGuBZ72oiizRV4Q6K//BkUTloMpPiTw/BfQBAzfCsEVm5eizy7OnX8vkPXM1Owwuib0Jht8CpKqXQti6SozCNEpNXGURQ3Mj+g3wlM2JcFfFUAJ8Xv57R7o54neF7d/oybNb6T8axloiHIqqKO9bprQIsPmrNDgdN/jWLwBIt7rQyvGEq28zMdXDqcAMqz+X1AQ1YmFEjY8Uo58FTzfX4dw40lVYJ1EI+82pbfYXjBCJz9pCGlWjbIPveVxiOtQyUhxEKskPZZF 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)(39860400002)(396003)(136003)(376002)(451199015)(46966006)(36840700001)(40470700004)(83380400001)(36756003)(2906002)(8936002)(86362001)(5660300002)(4326008)(82310400005)(186003)(26005)(41300700001)(1076003)(6666004)(40460700003)(44832011)(2616005)(16526019)(336012)(478600001)(356005)(8676002)(47076005)(70206006)(70586007)(81166007)(426003)(6916009)(40480700001)(316002)(82740400003)(36860700001)(36900700001); DIR:OUT; SFP:1101; X-OriginatorOrg: amd.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 18 Oct 2022 19:44:53.9994 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: b806c325-242e-4469-eed6-08dab1413a96 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: BN8NAM11FT020.eop-nam11.prod.protection.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: LV2PR12MB5728 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 637553716d..cabdfa1f21 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