From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from linux.microsoft.com (linux.microsoft.com [13.77.154.182]) by smtp.subspace.kernel.org (Postfix) with ESMTP id A337C1FC7E7; Fri, 25 Apr 2025 10:53:40 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=13.77.154.182 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1745578422; cv=none; b=ZbwLZO6He1D+PMz7vqUNb8dzGszA0VNdnS2z1nLeqhe+iS8qsaUAPoJzVESMSU9bcVG8Rt7pmlTQaAjV99qk1Jmag3QZ3tY6iLbbAH1jVchjkFuVt9Ql47iP9nNFobtCEu08GtEgi7wSPd3/lZvx/Fmtx+aGkXzdQ8i1GCBnbkc= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1745578422; c=relaxed/simple; bh=NRp1Wwb8++Zq8JCpLVO0QHfPKJCp21x2gI1rE46sM0I=; h=From:To:Cc:Subject:Date:Message-Id; b=Ury0Rs0Xcc08kUE7fKMsO7CpPXBBRqQnY2HymUv3T2lc5hlPZvtdI9RCjzXFKxmSJTK3XQ4P3VpFltYs7w3tgmThdTRmggKiggOYmYnG7eKviO1d219rGfhlEEIHQD4+Cg9PGjgNwePX0Gq94tODe/AgfykpWWM81W4PKdc1ibs= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linux.microsoft.com; spf=pass smtp.mailfrom=linux.microsoft.com; dkim=pass (1024-bit key) header.d=linux.microsoft.com header.i=@linux.microsoft.com header.b=LZ4v2MaN; arc=none smtp.client-ip=13.77.154.182 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linux.microsoft.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=linux.microsoft.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linux.microsoft.com header.i=@linux.microsoft.com header.b="LZ4v2MaN" Received: by linux.microsoft.com (Postfix, from userid 1134) id 11BE22020955; Fri, 25 Apr 2025 03:53:40 -0700 (PDT) DKIM-Filter: OpenDKIM Filter v2.11.0 linux.microsoft.com 11BE22020955 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux.microsoft.com; s=default; t=1745578420; bh=6MdeNB2xGOsgrbx2ovicJ6zNGUSw10EtPHw5GeW5Lsk=; h=From:To:Cc:Subject:Date:From; b=LZ4v2MaNTzQlvPC0J/PMDUUfiBJR3CROViWfTn2K9zUP7M0PPdWYET2GJQRHCnNLc juqpVT5pN5fHJYrLA35YdL9vWHOuBI8IMrVztSz0FkgDbSFvxNXahsd1Abq0kPz+hd j3p1zDyKpJqj9ilzo+FpLUNr/5W4x9YsXa/o9KnA= From: Shradha Gupta To: linux-hyperv@vger.kernel.org, linux-pci@vger.kernel.org, linux-kernel@vger.kernel.org, Nipun Gupta , Yury Norov , Jason Gunthorpe , Jonathan Cameron , Anna-Maria Behnsen , Shradha Gupta , Kevin Tian , Long Li , Thomas Gleixner , Bjorn Helgaas , Rob Herring , Manivannan Sadhasivam , =?UTF-8?q?Krzysztof=20Wilczy=C5=84ski?= , Lorenzo Pieralisi , Dexuan Cui , Wei Liu , Haiyang Zhang , "K. Y. Srinivasan" , Andrew Lunn , "David S. Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni , Konstantin Taranov , Simon Horman , Leon Romanovsky , Maxim Levitsky , Erni Sri Satya Vennela , Peter Zijlstra , netdev@vger.kernel.org, linux-rdma@vger.kernel.org, Paul Rosswurm Cc: Shradha Gupta Subject: [PATCH v2 0/3] Allow dyn MSI-X vector allocation of MANA Date: Fri, 25 Apr 2025 03:53:27 -0700 Message-Id: <1745578407-14689-1-git-send-email-shradhagupta@linux.microsoft.com> X-Mailer: git-send-email 1.8.3.1 Precedence: bulk X-Mailing-List: netdev@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: In this patchset we want to enable the MANA driver to be able to allocate MSI-X vectors in PCI dynamically The first patch exports pci_msix_prepare_desc() in PCI to be able to correctly prepare descriptors for dynamically added MSI-X vectors The second patch adds the support of dynamic vector allocation in pci-hyperv PCI controller by enabling the MSI_FLAG_PCI_MSIX_ALLOC_DYN flag and using the pci_msix_prepare_desc() exported in first patch. The third patch has the changes in MANA driver to be able to allocate MSI-X vectors dynamically if it is supported by the infra. If the support does not exist it defaults to older behavior. --- Changes in v2 * split the first patch into two(exporting the preapre_desc func and using the function and flag in pci-hyperv) * replace 'pci vectors' by 'MSI-X vectors' * Change the cover letter description to align with changes made --- Shradha Gupta (3): PCI: Export pci_msix_prepare_desc() for dynamic MSI-X alloc PCI: hv: Allow dynamic MSI-X vector allocation net: mana: Allocate MSI-X vectors dynamically as required .../net/ethernet/microsoft/mana/gdma_main.c | 323 ++++++++++++++---- drivers/pci/controller/pci-hyperv.c | 7 +- drivers/pci/msi/irqdomain.c | 5 +- include/linux/msi.h | 2 + include/net/mana/gdma.h | 11 +- 5 files changed, 279 insertions(+), 69 deletions(-) -- 2.34.1