2024-05-13 20:30:16

by Haiyang Zhang

[permalink] [raw]
Subject: [PATCH net-next] net: mana: Enable MANA driver on ARM64 with 4K page size

Change the Kconfig dependency, so this driver can be built and run on ARM64
with 4K page size.
16/64K page sizes are not supported yet.

Signed-off-by: Haiyang Zhang <[email protected]>
---
drivers/net/ethernet/microsoft/Kconfig | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/drivers/net/ethernet/microsoft/Kconfig b/drivers/net/ethernet/microsoft/Kconfig
index 01eb7445ead9..286f0d5697a1 100644
--- a/drivers/net/ethernet/microsoft/Kconfig
+++ b/drivers/net/ethernet/microsoft/Kconfig
@@ -17,7 +17,8 @@ if NET_VENDOR_MICROSOFT

config MICROSOFT_MANA
tristate "Microsoft Azure Network Adapter (MANA) support"
- depends on PCI_MSI && X86_64
+ depends on PCI_MSI
+ depends on X86_64 || (ARM64 && !CPU_BIG_ENDIAN && ARM64_4K_PAGES)
depends on PCI_HYPERV
select AUXILIARY_BUS
select PAGE_POOL
--
2.34.1



2024-05-13 20:42:21

by Jakub Kicinski

[permalink] [raw]
Subject: Re: [PATCH net-next] net: mana: Enable MANA driver on ARM64 with 4K page size

On Mon, 13 May 2024 13:29:01 -0700 Haiyang Zhang wrote:
> - depends on PCI_MSI && X86_64
> + depends on PCI_MSI
> + depends on X86_64 || (ARM64 && !CPU_BIG_ENDIAN && ARM64_4K_PAGES)

Can ARM64 be big endian?

2024-05-13 20:50:59

by Haiyang Zhang

[permalink] [raw]
Subject: RE: [PATCH net-next] net: mana: Enable MANA driver on ARM64 with 4K page size



> -----Original Message-----
> From: Jakub Kicinski <[email protected]>
> Sent: Monday, May 13, 2024 4:42 PM
> To: Haiyang Zhang <[email protected]>
> Cc: [email protected]; [email protected]; Dexuan Cui
> <[email protected]>; [email protected]; KY Srinivasan
> <[email protected]>; Paul Rosswurm <[email protected]>;
> [email protected]; vkuznets <[email protected]>; [email protected];
> [email protected]; [email protected]; [email protected];
> [email protected]; Long Li <[email protected]>;
> [email protected]; [email protected];
> [email protected]; [email protected]; [email protected];
> [email protected]; [email protected]; [email protected];
> [email protected]; [email protected]
> Subject: Re: [PATCH net-next] net: mana: Enable MANA driver on ARM64 with
> 4K page size
>
> On Mon, 13 May 2024 13:29:01 -0700 Haiyang Zhang wrote:
> > - depends on PCI_MSI && X86_64
> > + depends on PCI_MSI
> > + depends on X86_64 || (ARM64 && !CPU_BIG_ENDIAN && ARM64_4K_PAGES)
>
> Can ARM64 be big endian?

From the document, it can be:
"ARM cores support both modes, but are most commonly used in, and typically default to little-endian mode. Most Linux distributions for ARM tend to be little-endian only."
https://developer.arm.com/documentation/den0042/a/Coding-for-Cortex-R-Processors/Endianness

MANA driver doesn't support big endian.

Thanks,
- Haiyang


2024-05-14 00:51:11

by Jakub Kicinski

[permalink] [raw]
Subject: Re: [PATCH net-next] net: mana: Enable MANA driver on ARM64 with 4K page size

On Mon, 13 May 2024 20:50:37 +0000 Haiyang Zhang wrote:
> From the document, it can be:
> "ARM cores support both modes, but are most commonly used in, and typically default to little-endian mode. Most Linux distributions for ARM tend to be little-endian only."
> https://developer.arm.com/documentation/den0042/a/Coding-for-Cortex-R-Processors/Endianness
>
> MANA driver doesn't support big endian.

Alright, but please prioritize at least adding the 64k page support.
Linux drivers are supposed to be as platform independent as possible.
If you use the right APIs you shouldn't have to worry about the endian
or the page size.

2024-05-14 01:00:58

by patchwork-bot+netdevbpf

[permalink] [raw]
Subject: Re: [PATCH net-next] net: mana: Enable MANA driver on ARM64 with 4K page size

Hello:

This patch was applied to netdev/net-next.git (main)
by Jakub Kicinski <[email protected]>:

On Mon, 13 May 2024 13:29:01 -0700 you wrote:
> Change the Kconfig dependency, so this driver can be built and run on ARM64
> with 4K page size.
> 16/64K page sizes are not supported yet.
>
> Signed-off-by: Haiyang Zhang <[email protected]>
> ---
> drivers/net/ethernet/microsoft/Kconfig | 3 ++-
> 1 file changed, 2 insertions(+), 1 deletion(-)

Here is the summary with links:
- [net-next] net: mana: Enable MANA driver on ARM64 with 4K page size
https://git.kernel.org/netdev/net-next/c/40a1d11fc670

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