Skip to contentSkip to conversation

Add aarch64 support for FBNIC

PATCH Applied Dimitri Daskalakis 3 participants 6 messages Oct 13, 2025 – Oct 16, 2025

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

cover Add aarch64 support for FBNIC

We need to support aarch64 with 64K PAGE_SIZE, and I uncovered an issue during testing.

Dimitri Daskalakis (2):
net: fbnic: Fix page chunking logic when PAGE_SIZE > 4K
net: fbnic: Allow builds for all 64 bit architectures

 drivers/net/ethernet/meta/Kconfig            | 2 +-
 drivers/net/ethernet/meta/fbnic/fbnic_txrx.c | 1 +
 2 files changed, 2 insertions(+), 1 deletion(-)
Signature · 1 line
2.47.3
#1 lore raw

PATCH 1/2 net: fbnic: Fix page chunking logic when PAGE_SIZE > 4K

The HW always works on a 4K page size. When the OS supports larger pages, we fragment them across multiple BDQ descriptors.
We were not properly incrementing the descriptor, which resulted in us specifying the last chunks id/addr and then 15 zero descriptors. This would cause packet loss and driver crashes. This is not a fix since the Kconfig prevents use outside of x86.

---
 drivers/net/ethernet/meta/fbnic/fbnic_txrx.c | 1 +
 1 file changed, 1 insertion(+)
drivers/net/ethernet/meta/fbnic/fbnic_txrx.c +1 -0
index b1e8ce89870f..57e18a68f5d2 100644
@@ -887,6 +887,7 @@ static void fbnic_bd_prep(struct fbnic_ring *bdq, u16 id, netmem_ref netmem)
 		*bdq_desc = cpu_to_le64(bd);
 		bd += FIELD_PREP(FBNIC_BD_DESC_ADDR_MASK, 1) |
 		      FIELD_PREP(FBNIC_BD_DESC_ID_MASK, 1);
+		bdq_desc++;
 	} while (--i);
 }
 
Signature · 1 line
2.47.3
reviewer Reviewed-by on v1 1/2
#2 lore raw

Re: [PATCH net-next 1/2] net: fbnic: Fix page chunking logic when PAGE_SIZE > 4K

Quoted 9 lines · Dimitri Daskalakis

The HW always works on a 4K page size. When the OS supports larger pages, we fragment them across multiple BDQ descriptors.
We were not properly incrementing the descriptor, which resulted in us specifying the last chunks id/addr and then 15 zero descriptors. This would cause packet loss and driver crashes. This is not a fix since the Kconfig prevents use outside of x86.

#3 lore raw

PATCH 2/2 net: fbnic: Allow builds for all 64 bit architectures

In reply to Dimitri Daskalakis

This enables aarch64 testing, but there's no reason we cannot support other architectures.

---
 drivers/net/ethernet/meta/Kconfig | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/net/ethernet/meta/Kconfig +1 -1
index 3ba527514f1e..dff51f23d295 100644
@@ -19,7 +19,7 @@ if NET_VENDOR_META
 
 config FBNIC
 	tristate "Meta Platforms Host Network Interface"
-	depends on X86_64 || COMPILE_TEST
+	depends on 64BIT || COMPILE_TEST
 	depends on !S390
 	depends on MAX_SKB_FRAGS < 22
 	depends on PCI_MSI
Signature · 1 line
2.47.3
#5 lore raw
In reply to Dimitri Daskalakis
This series was applied to netdev/net-next.git (main) by Paolo Abeni <[email protected]>:

Hello:

This series was applied to netdev/net-next.git (main) by Paolo Abeni <[email protected]>:

Quoted 8 lines · On Mon, 13 Oct 2025 14:14:47 -0700 you wrote:

We need to support aarch64 with 64K PAGE_SIZE, and I uncovered an issue during testing.

Dimitri Daskalakis (2):
net: fbnic: Fix page chunking logic when PAGE_SIZE > 4K
net: fbnic: Allow builds for all 64 bit architectures

[...]

Here is the summary with links:
- [net-next,1/2] net: fbnic: Fix page chunking logic when PAGE_SIZE > 4K

    https://git.kernel.org/netdev/net-next/c/4bd451f4c285
  - [net-next,2/2] net: fbnic: Allow builds for all 64 bit architectures
    https://git.kernel.org/netdev/net-next/c/75b350839b9e

You are awesome, thank you!

Signature · 2 lines
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/patchwork/pwbot.html