Received: by 2002:a05:6358:3188:b0:123:57c1:9b43 with SMTP id q8csp4976813rwd; Tue, 30 May 2023 12:40:52 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ7RHQkwB9L8KAGVPUUIAC2HbUg98RXX84iMWZtmLvZc+NpXKIHxaXzEbY1ekK2U+Ir5qW1a X-Received: by 2002:a17:903:1251:b0:1ae:8892:7d27 with SMTP id u17-20020a170903125100b001ae88927d27mr3750878plh.42.1685475652449; Tue, 30 May 2023 12:40:52 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1685475652; cv=pass; d=google.com; s=arc-20160816; b=Wv0XQOcJ40jgpN7z3rW5L5F+oAv0xuUFQ1w+48Igek/4WhGE+kTIfg4gMdvx8Ie55N 5N3uJm/CSAKQbXlfmQL6CzwQwR+LBS0DnUzePjjMCw7Z9Jiaa2XyvLFzae022/NZ7rsX kTId+uc2sO1tp2FQn2+saN9IjPDpYpkMXV8Koe6pCqyITV1Z8GRB9uAPB67EIEgGdh+B RSteBvJqpk6fwiwayMVzJWh+AlGk5XQHqppTykLqcn/hWE/quLqMddrV1YGPEKt4i1LJ 5fzuYQBQbw2FHv6Y2dDGEYIJ6feNBJp79oOg8xXCPaHTCofWDOIPLkZIGbZUFX4XW8Dr p6RQ== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:in-reply-to:content-disposition :references:message-id:subject:cc:to:from:date:dkim-signature; bh=bywrRULDtWMXbD9q8bK7DujeGHhWUdiLd4bVDtxJ7yw=; b=m6m4MDuhZJacOQftHGGlQHBVbB4WMl7y98LboQWWO1PltsAT2Dar2TO0Z76RalaNfQ z147ii8m5aEnfp4ia4GxWJdBOYgiRGVcfRGZIljJ+NCqUkGr5IdMlQFzsosQ/foJnkGd RjAPhdUQa2UsLdMwbW1dU593Fj8jtu+tVdXiPqfa+EG01LKHp91NummMJN5UiGB1Ndpc jWQLM67rIjgjKzHeDnU9dn4mckze9wBVN+FnGzpt9vBoEx7rTgx9Ls2DcufjOV22AHr5 uYiTYT0oLLogV1SIQU+1L0dftBhg/0nRSC6tRNHoRoO2M0aOb1+ZaVgaRf5DLWPgiOB9 1spQ== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@corigine.onmicrosoft.com header.s=selector2-corigine-onmicrosoft-com header.b=QXKJCOqV; arc=pass (i=1 spf=pass spfdomain=corigine.com dkim=pass dkdomain=corigine.com dmarc=pass fromdomain=corigine.com); spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=corigine.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id n9-20020a170902d2c900b001a979141a25si5085486plc.243.2023.05.30.12.40.37; Tue, 30 May 2023 12:40:52 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@corigine.onmicrosoft.com header.s=selector2-corigine-onmicrosoft-com header.b=QXKJCOqV; arc=pass (i=1 spf=pass spfdomain=corigine.com dkim=pass dkdomain=corigine.com dmarc=pass fromdomain=corigine.com); spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=corigine.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229893AbjE3TgA (ORCPT + 99 others); Tue, 30 May 2023 15:36:00 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:57704 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230219AbjE3Tf7 (ORCPT ); Tue, 30 May 2023 15:35:59 -0400 Received: from NAM10-MW2-obe.outbound.protection.outlook.com (mail-mw2nam10on2104.outbound.protection.outlook.com [40.107.94.104]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 8FD7611A; Tue, 30 May 2023 12:35:49 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=FMbHtbq+jVzoZamDzGUoiqgReZXtsvXUftAksKBSO+UmvksJfsRRSMAgFlkKTC7oSHCyWm6smvruqr9t3tVvSEMdnEDDw6FNEZIDeY/kbENG0/lf4cUXCW+qPcV4WCldsGL8MOYggld6WPN5031jCElhKc1rSkRvytQjbvExbmnyfKSo3ZGu5gTq5VqdhCj/FlmsojLDflVzQirzlRLM5exv0mIRsMSTgOj3KZJKeNbFeNj/uYinpFbkoEsYhCIuaHMCGcdVyZ+qLsGnreHIBzNTjW9QkfupsQD4aF1XHFlISTnRcvNQVTRxgCDmXAehbKX1ZPgOUZjV1yZzEKGiYA== 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=bywrRULDtWMXbD9q8bK7DujeGHhWUdiLd4bVDtxJ7yw=; b=oSxJn1+Q5lJ12BsbNXkh1yjiEBiTYm9mFk+7fp0LJlu4S/r7TmYxtVqPYpn4Gf3357elREnzQrwr1YVzveciC8RULGREOLUga1naqXg/35nkgZlBrvfGGNCYKLkY3D2vIQkt0+1zaHUpC9lwDzSUMCT1fAgzP9BE6Mf16a5Z5gzs4heywKmXWWBGi/r/sjUg2j0k0GFgqNFTrC6IIPMYBHCbhczVKXK5qTEOdcUrHGd2sovBphgeuYETVEsgB30qcHpMo13xs0bEC4vTUFP3tfcfPo489lC+4Au6r5lLnYPh7FRtMVovyM3ne6RWkla2u8U8joXPcK/mKNPc3hOesg== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=corigine.com; dmarc=pass action=none header.from=corigine.com; dkim=pass header.d=corigine.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=corigine.onmicrosoft.com; s=selector2-corigine-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=bywrRULDtWMXbD9q8bK7DujeGHhWUdiLd4bVDtxJ7yw=; b=QXKJCOqVH/3PRPOqUQv2Tco+AWyaacwMilxrs2BNDFCIqSYFhxhtxglVL5vSahK0EkN89nAXqhLt+cHnj6TZr0itTJv4wgCnvqAGQXHZa3ro/54mv4aAE7KwzDpifoLBmGw5qcUz9DHYepUVHeTceXBkZ6uc/OZfvaSJEQP06lI= Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=corigine.com; Received: from PH0PR13MB4842.namprd13.prod.outlook.com (2603:10b6:510:78::6) by LV8PR13MB6352.namprd13.prod.outlook.com (2603:10b6:408:18e::22) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6455.21; Tue, 30 May 2023 19:35:46 +0000 Received: from PH0PR13MB4842.namprd13.prod.outlook.com ([fe80::5e55:9a39:751f:55f6]) by PH0PR13MB4842.namprd13.prod.outlook.com ([fe80::5e55:9a39:751f:55f6%3]) with mapi id 15.20.6433.022; Tue, 30 May 2023 19:35:46 +0000 Date: Tue, 30 May 2023 21:35:39 +0200 From: Simon Horman To: Niklas Schnelle Cc: Shay Drory , Saeed Mahameed , Eli Cohen , Leon Romanovsky , "David S. Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni , netdev@vger.kernel.org, linux-kernel@vger.kernel.org, linux-s390@vger.kernel.org, linux-rdma@vger.kernel.org Subject: Re: [PATCH net] net/mlx5: Fix setting of irq->map.index for static IRQ case Message-ID: References: <20230530141304.1850195-1-schnelle@linux.ibm.com> Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20230530141304.1850195-1-schnelle@linux.ibm.com> X-ClientProxiedBy: AM0PR08CA0005.eurprd08.prod.outlook.com (2603:10a6:208:d2::18) To PH0PR13MB4842.namprd13.prod.outlook.com (2603:10b6:510:78::6) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: PH0PR13MB4842:EE_|LV8PR13MB6352:EE_ X-MS-Office365-Filtering-Correlation-Id: b1d38d4d-f3f4-41db-2645-08db614510d4 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: 2tPz+IfVRGL6U7ZOw6vLr+9LexUhg7WJbF0AV2k53lvPaeoX9rSixm2sSiiq36YYRHO4CZ5g9qbdrhB3y6hD5UNt7vXpKWgHjoIqhFeru4h8Plo+QFQ8Hrj9hL/cnnMvEAo13eyvNBq4Rpk/9voY2Z3rJzMo+gfvVo8vb/0Jh8xxnrSiwlFBdCl2ro3MZr/0TJVe1YQcD9fGPlVMXkyVruHOLRQB6ZFHPQ4v3Q/uqeEc5CvXM42Boweap5GrOrWRy0vR8drIfmcHi71J1teCvmqkSxiHKJCeBOrjB4lZgdgGHLlwwPno9UHy3XXqLYd7PTWlYD/jtIHnxQBGruUaoCTusRwhm39AsimLM6CerjQuNlk0tq0vmGUY49SWZ1HAYcIleUIoPvSR0lWS9ZDSF0SgFpifFWJDprly2YDRtuDPRquj0HNuh4IwpmGt5ckiZCYRcwWAyP8qs/zc2BxZJ6AI34J8f6ClhZWShKqbMyv7857wnF3neL9MeXnOAfAGv4wGX7+3kKxEOhHZV4mJONzwALbyjtb7hYEfN3VcGr/APp4USPJZDL/l9dBtph4TDe49JTs8j1A2cuw0geXoa+pyo5HgWouFtiSknX2fVBs= X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:PH0PR13MB4842.namprd13.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230028)(4636009)(346002)(396003)(39840400004)(136003)(376002)(366004)(451199021)(83380400001)(6666004)(66476007)(5660300002)(36756003)(316002)(66946007)(66556008)(7416002)(4326008)(6916009)(38100700002)(41300700001)(8936002)(8676002)(6486002)(86362001)(6506007)(186003)(2616005)(6512007)(54906003)(44832011)(478600001)(66899021)(2906002)(4744005)(67856001);DIR:OUT;SFP:1102; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?us-ascii?Q?XLaOfH1jIsbJI9tdGYIPkbeWhFp9tmrkibMoRypZs8UZIHwhe+w8rDRLuXzm?= =?us-ascii?Q?ISGxRBV3fK1GcORCVDfme4iuC4ICuCOf1uVRfLnJD2xhRJ53GGS4xUugh4Z9?= =?us-ascii?Q?yj1S9V1MmuceLy36MfbpcU22bQb/S5M9AEPv4Bkuy+d4a1f2wrCwFsVVKt6h?= =?us-ascii?Q?Hx0wJ6nTKcu05dDZGQqcxmivmxegINvjF+VZyrdqJ6Hy02iDStDQ2P6+U9up?= =?us-ascii?Q?5AlDrF2JscBd27eRDI4rfWFxyeLW0kId9zrLZSLMiRRElKbPNg5VpFIjr+uZ?= =?us-ascii?Q?ztMC7SLt5nGVp/t2lazVICvcR5627wVUIZuo/DtrduqjwQUHwe6+BtX9eRUD?= =?us-ascii?Q?uiR9OvML+slprQKzIOZ4fAu44t3m+lrKwhcW7XyEOVvaSFl6dpDS09ZB0jt3?= =?us-ascii?Q?ZNQWke+qhqmdxAqZIJ9sZbAUjYGcUbYsS8rPzJMPcP0SCQwKmdW3IQkiQ0EA?= =?us-ascii?Q?s9jL9m1D013FFxiq/P1ILcvrAMyRjH09zuC3YTtQ6dQkHPW5gVYPj3vuoahi?= =?us-ascii?Q?kCLUiWgqXhSxkz0zt0Agz6SaxjtLLNVlQC/j/tQ3K4yJ5WjSOJuUyKTsfpzV?= =?us-ascii?Q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y5p4?= =?us-ascii?Q?ngDG8iV7q8UuRhJm41yATaGcsf84ww/YdBcBWVDVeVeg9FAJNSBnzG5YmX4g?= =?us-ascii?Q?ddxTo68slQyuBI5j5ZFe7uYKbn1lhjmkebY+21UJVvU3iClz8KvkNyTPOb3A?= =?us-ascii?Q?CGoL7/RaDGOb76bWZZZphmuyQeyQxHyZP3o/NADPYaKSBD0JMhaIlU8xVS/8?= =?us-ascii?Q?nzMoYg=3D=3D?= X-OriginatorOrg: corigine.com X-MS-Exchange-CrossTenant-Network-Message-Id: b1d38d4d-f3f4-41db-2645-08db614510d4 X-MS-Exchange-CrossTenant-AuthSource: PH0PR13MB4842.namprd13.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 30 May 2023 19:35:46.7420 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: fe128f2c-073b-4c20-818e-7246a585940c X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: Mgr5AAktap9n3Gb3Uz8jy7CArOnbysXSAcvS+AO5gXpYeGSRyNpI7eje+iveAJPKGiTp02yP2zGh7cLKfBn8uFHsJE/3hI/fcZZ92T042X8= X-MS-Exchange-Transport-CrossTenantHeadersStamped: LV8PR13MB6352 X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,RCVD_IN_DNSWL_NONE,RCVD_IN_MSPIKE_H2,SPF_HELO_PASS,SPF_PASS, T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, May 30, 2023 at 04:13:04PM +0200, Niklas Schnelle wrote: > When dynamic IRQ allocation is not supported all IRQs are allocated up > front in mlx5_irq_table_create() instead of dynamically as part of > mlx5_irq_alloc(). In the latter dynamic case irq->map.index is set > via the mapping returned by pci_msix_alloc_irq_at(). In the static case > and prior to commit 1da438c0ae02 ("net/mlx5: Fix indexing of mlx5_irq") > irq->map.index was set in mlx4_irq_alloc() twice once initially to 0 and > then to the requested index before storing in the xarray. After this > commit it is only set to 0 which breaks all other IRQ mappins. > > Fix this by setting irq->map.index to the requested index together with > irq->map.virq and improve the related comment to make it clearer which > cases it deals with. > > Fixes: 1da438c0ae02 ("net/mlx5: Fix indexing of mlx5_irq") > Signed-off-by: Niklas Schnelle Reviewed-by: Simon Horman