summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDimitri Daskalakis <dimitri.daskalakis1@gmail.com>2025-10-13 14:14:48 -0700
committerPaolo Abeni <pabeni@redhat.com>2025-10-16 11:36:29 +0200
commit4bd451f4c2851eee7b6e17bb6fd6c9caaadbdc18 (patch)
treea772b6f67c17da04297f95d4f0c7e35b0f34f5d6
parentcb85ca4c0a349e246cd35161088aa3689ae5c580 (diff)
downloadlinux-4bd451f4c2851eee7b6e17bb6fd6c9caaadbdc18.tar.gz
linux-4bd451f4c2851eee7b6e17bb6fd6c9caaadbdc18.zip
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. Signed-off-by: Dimitri Daskalakis <dimitri.daskalakis1@gmail.com> Signed-off-by: Jakub Kicinski <kuba@kernel.org> Reviewed-by: Simon Horman <horms@kernel.org> Link: https://patch.msgid.link/20251013211449.1377054-2-dimitri.daskalakis1@gmail.com Signed-off-by: Paolo Abeni <pabeni@redhat.com>
-rw-r--r--drivers/net/ethernet/meta/fbnic/fbnic_txrx.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/net/ethernet/meta/fbnic/fbnic_txrx.c b/drivers/net/ethernet/meta/fbnic/fbnic_txrx.c
index b1e8ce89870f..57e18a68f5d2 100644
--- a/drivers/net/ethernet/meta/fbnic/fbnic_txrx.c
+++ b/drivers/net/ethernet/meta/fbnic/fbnic_txrx.c
@@ -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);
}