netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH net-next] ionic: advertise 52-bit addressing limitation for MSI-X
@ 2024-05-30 21:40 David Christensen
  2024-05-30 22:34 ` Nelson, Shannon
  2024-06-03 21:27 ` [PATCH net-next v2] " David Christensen
  0 siblings, 2 replies; 5+ messages in thread
From: David Christensen @ 2024-05-30 21:40 UTC (permalink / raw)
  To: Shannon Nelson, Brett Creeley,
	supporter:PENSANDO ETHERNET DRIVERS, David S. Miller,
	Eric Dumazet, Jakub Kicinski, Paolo Abeni, David Christensen,
	open list:PENSANDO ETHERNET DRIVERS, open list

Current ionic devices only support 52 internal physical address
lines. This is sufficient for x86_64 systems which have similar
limitations but does not apply to all other architectures,
notably IBM POWER (ppc64). To ensure that MSI/MSI-X vectors are
not set outside the physical address limits of the NIC, set the
recently added no_64bit_msi value of the pci_dev structure
during device probe.

Signed-off-by: David Christensen <drc@linux.ibm.com>
---
 drivers/net/ethernet/pensando/ionic/ionic_bus_pci.c | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/drivers/net/ethernet/pensando/ionic/ionic_bus_pci.c b/drivers/net/ethernet/pensando/ionic/ionic_bus_pci.c
index 6ba8d4aca0a0..1e7f507f461f 100644
--- a/drivers/net/ethernet/pensando/ionic/ionic_bus_pci.c
+++ b/drivers/net/ethernet/pensando/ionic/ionic_bus_pci.c
@@ -326,6 +326,10 @@ static int ionic_probe(struct pci_dev *pdev, const struct pci_device_id *ent)
 		goto err_out;
 	}
 
+	/* Ensure MSI/MSI-X interrupts lie within addressable physical memory */
+	if (IONIC_ADDR_LEN < 64)
+		pdev->no_64bit_msi = 1;
+
 	err = ionic_setup_one(ionic);
 	if (err)
 		goto err_out;
-- 
2.43.0


^ permalink raw reply related	[flat|nested] 5+ messages in thread

* Re: [PATCH net-next] ionic: advertise 52-bit addressing limitation for MSI-X
  2024-05-30 21:40 [PATCH net-next] ionic: advertise 52-bit addressing limitation for MSI-X David Christensen
@ 2024-05-30 22:34 ` Nelson, Shannon
  2024-06-03 21:27 ` [PATCH net-next v2] " David Christensen
  1 sibling, 0 replies; 5+ messages in thread
From: Nelson, Shannon @ 2024-05-30 22:34 UTC (permalink / raw)
  To: David Christensen, Brett Creeley,
	supporter:PENSANDO ETHERNET DRIVERS, David S. Miller,
	Eric Dumazet, Jakub Kicinski, Paolo Abeni,
	open list:PENSANDO ETHERNET DRIVERS, open list

On 5/30/2024 2:40 PM, David Christensen wrote:
> 
> Current ionic devices only support 52 internal physical address
> lines. This is sufficient for x86_64 systems which have similar
> limitations but does not apply to all other architectures,
> notably IBM POWER (ppc64). To ensure that MSI/MSI-X vectors are
> not set outside the physical address limits of the NIC, set the
> recently added no_64bit_msi value of the pci_dev structure
> during device probe.
> 
> Signed-off-by: David Christensen <drc@linux.ibm.com>
> ---
>   drivers/net/ethernet/pensando/ionic/ionic_bus_pci.c | 4 ++++
>   1 file changed, 4 insertions(+)
> 
> diff --git a/drivers/net/ethernet/pensando/ionic/ionic_bus_pci.c b/drivers/net/ethernet/pensando/ionic/ionic_bus_pci.c
> index 6ba8d4aca0a0..1e7f507f461f 100644
> --- a/drivers/net/ethernet/pensando/ionic/ionic_bus_pci.c
> +++ b/drivers/net/ethernet/pensando/ionic/ionic_bus_pci.c
> @@ -326,6 +326,10 @@ static int ionic_probe(struct pci_dev *pdev, const struct pci_device_id *ent)
>                  goto err_out;
>          }
> 
> +       /* Ensure MSI/MSI-X interrupts lie within addressable physical memory */
> +       if (IONIC_ADDR_LEN < 64)
> +               pdev->no_64bit_msi = 1;
> +

Thanks, David, for the reminder that we have something like this in our 
out-of-tree driver.  I'm far from being a DMA expert, but this seems 
limiting for those architectures that don't need it, and I would have 
thought that setting the dma mask would already be the way of telling 
the system what our limitation was so there wouldn't be this problem. 
(I'm sure someone will point out the error in my thinking...)

Perhaps to solve your problem with less limitation on others we could do 
something like:

#ifdef CONFIG_PPC64
        pdev->no_64bit_msi = 1;
#endif

Thanks,
sln

>          err = ionic_setup_one(ionic);
>          if (err)
>                  goto err_out;
> --
> 2.43.0
> 

^ permalink raw reply	[flat|nested] 5+ messages in thread

* [PATCH net-next v2] ionic: advertise 52-bit addressing limitation for MSI-X
  2024-05-30 21:40 [PATCH net-next] ionic: advertise 52-bit addressing limitation for MSI-X David Christensen
  2024-05-30 22:34 ` Nelson, Shannon
@ 2024-06-03 21:27 ` David Christensen
  2024-06-03 22:16   ` Nelson, Shannon
  2024-06-05 23:00   ` patchwork-bot+netdevbpf
  1 sibling, 2 replies; 5+ messages in thread
From: David Christensen @ 2024-06-03 21:27 UTC (permalink / raw)
  To: Shannon Nelson, Brett Creeley,
	supporter:PENSANDO ETHERNET DRIVERS, David S. Miller,
	Eric Dumazet, Jakub Kicinski, Paolo Abeni, David Christensen,
	open list:PENSANDO ETHERNET DRIVERS, open list

Current ionic devices only support 52 internal physical address
lines. This is sufficient for x86_64 systems which have similar
limitations but does not apply to all other architectures,
notably IBM POWER (ppc64). To ensure that MSI/MSI-X vectors are
not set outside the physical address limits of the NIC, set the
no_64bit_msi value of the pci_dev structure during device probe.

Signed-off-by: David Christensen <drc@linux.ibm.com>
---
v2: Limit change to ppc64 systems as suggested
---
 drivers/net/ethernet/pensando/ionic/ionic_bus_pci.c | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/drivers/net/ethernet/pensando/ionic/ionic_bus_pci.c b/drivers/net/ethernet/pensando/ionic/ionic_bus_pci.c
index 6ba8d4aca0a0..a7146d50f814 100644
--- a/drivers/net/ethernet/pensando/ionic/ionic_bus_pci.c
+++ b/drivers/net/ethernet/pensando/ionic/ionic_bus_pci.c
@@ -326,6 +326,11 @@ static int ionic_probe(struct pci_dev *pdev, const struct pci_device_id *ent)
 		goto err_out;
 	}
 
+#ifdef CONFIG_PPC64
+	/* Ensure MSI/MSI-X interrupts lie within addressable physical memory */
+	pdev->no_64bit_msi = 1;
+#endif
+
 	err = ionic_setup_one(ionic);
 	if (err)
 		goto err_out;
-- 
2.43.0


^ permalink raw reply related	[flat|nested] 5+ messages in thread

* Re: [PATCH net-next v2] ionic: advertise 52-bit addressing limitation for MSI-X
  2024-06-03 21:27 ` [PATCH net-next v2] " David Christensen
@ 2024-06-03 22:16   ` Nelson, Shannon
  2024-06-05 23:00   ` patchwork-bot+netdevbpf
  1 sibling, 0 replies; 5+ messages in thread
From: Nelson, Shannon @ 2024-06-03 22:16 UTC (permalink / raw)
  To: David Christensen, Brett Creeley,
	supporter:PENSANDO ETHERNET DRIVERS, David S. Miller,
	Eric Dumazet, Jakub Kicinski, Paolo Abeni,
	open list:PENSANDO ETHERNET DRIVERS, open list

On 6/3/2024 2:27 PM, David Christensen wrote:
> 
> Current ionic devices only support 52 internal physical address
> lines. This is sufficient for x86_64 systems which have similar
> limitations but does not apply to all other architectures,
> notably IBM POWER (ppc64). To ensure that MSI/MSI-X vectors are
> not set outside the physical address limits of the NIC, set the
> no_64bit_msi value of the pci_dev structure during device probe.
> 
> Signed-off-by: David Christensen <drc@linux.ibm.com>
> ---
> v2: Limit change to ppc64 systems as suggested
> ---

Works for me, thanks!
Reviewed-by: Shannon Nelson <shannon.nelson@amd.com>

>   drivers/net/ethernet/pensando/ionic/ionic_bus_pci.c | 5 +++++
>   1 file changed, 5 insertions(+)
> 
> diff --git a/drivers/net/ethernet/pensando/ionic/ionic_bus_pci.c b/drivers/net/ethernet/pensando/ionic/ionic_bus_pci.c
> index 6ba8d4aca0a0..a7146d50f814 100644
> --- a/drivers/net/ethernet/pensando/ionic/ionic_bus_pci.c
> +++ b/drivers/net/ethernet/pensando/ionic/ionic_bus_pci.c
> @@ -326,6 +326,11 @@ static int ionic_probe(struct pci_dev *pdev, const struct pci_device_id *ent)
>                  goto err_out;
>          }
> 
> +#ifdef CONFIG_PPC64
> +       /* Ensure MSI/MSI-X interrupts lie within addressable physical memory */
> +       pdev->no_64bit_msi = 1;
> +#endif
> +
>          err = ionic_setup_one(ionic);
>          if (err)
>                  goto err_out;
> --
> 2.43.0
> 

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH net-next v2] ionic: advertise 52-bit addressing limitation for MSI-X
  2024-06-03 21:27 ` [PATCH net-next v2] " David Christensen
  2024-06-03 22:16   ` Nelson, Shannon
@ 2024-06-05 23:00   ` patchwork-bot+netdevbpf
  1 sibling, 0 replies; 5+ messages in thread
From: patchwork-bot+netdevbpf @ 2024-06-05 23:00 UTC (permalink / raw)
  To: David Christensen
  Cc: shannon.nelson, brett.creeley, drivers, davem, edumazet, kuba,
	pabeni, netdev, linux-kernel

Hello:

This patch was applied to netdev/net-next.git (main)
by Jakub Kicinski <kuba@kernel.org>:

On Mon,  3 Jun 2024 17:27:41 -0400 you wrote:
> Current ionic devices only support 52 internal physical address
> lines. This is sufficient for x86_64 systems which have similar
> limitations but does not apply to all other architectures,
> notably IBM POWER (ppc64). To ensure that MSI/MSI-X vectors are
> not set outside the physical address limits of the NIC, set the
> no_64bit_msi value of the pci_dev structure during device probe.
> 
> [...]

Here is the summary with links:
  - [net-next,v2] ionic: advertise 52-bit addressing limitation for MSI-X
    https://git.kernel.org/netdev/net-next/c/1467713eb224

You are awesome, thank you!
-- 
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/patchwork/pwbot.html



^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2024-06-05 23:00 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-05-30 21:40 [PATCH net-next] ionic: advertise 52-bit addressing limitation for MSI-X David Christensen
2024-05-30 22:34 ` Nelson, Shannon
2024-06-03 21:27 ` [PATCH net-next v2] " David Christensen
2024-06-03 22:16   ` Nelson, Shannon
2024-06-05 23:00   ` patchwork-bot+netdevbpf

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).