Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

Merge branch 'fix-page-fragment-handling-when-page_size-4k'

Dimitri Daskalakis says:

====================
Fix page fragment handling when PAGE_SIZE > 4K

FBNIC operates on fixed size descriptors (4K). When the OS supports pages
larger than 4K, we fragment the page across multiple descriptors.

While performance testing, I found several issues with our page fragment
handling, resulting in low throughput and potential RX stalls.
====================

Link: https://patch.msgid.link/20260324195123.3486219-1-dimitri.daskalakis1@gmail.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>

+4 -4
+1 -1
drivers/net/ethernet/meta/fbnic/fbnic_debugfs.c
··· 197 197 return 0; 198 198 } 199 199 200 - for (i = 0; i <= ring->size_mask; i++) { 200 + for (i = 0; i < (ring->size_mask + 1) * FBNIC_BD_FRAG_COUNT; i++) { 201 201 u64 bd = le64_to_cpu(ring->desc[i]); 202 202 203 203 seq_printf(s, "%04x %#04llx %#014llx\n", i,
+3 -3
drivers/net/ethernet/meta/fbnic/fbnic_txrx.c
··· 927 927 /* Force DMA writes to flush before writing to tail */ 928 928 dma_wmb(); 929 929 930 - writel(i, bdq->doorbell); 930 + writel(i * FBNIC_BD_FRAG_COUNT, bdq->doorbell); 931 931 } 932 932 } 933 933 ··· 2564 2564 hpq->tail = 0; 2565 2565 hpq->head = 0; 2566 2566 2567 - log_size = fls(hpq->size_mask); 2567 + log_size = fls(hpq->size_mask) + ilog2(FBNIC_BD_FRAG_COUNT); 2568 2568 2569 2569 /* Store descriptor ring address and size */ 2570 2570 fbnic_ring_wr32(hpq, FBNIC_QUEUE_BDQ_HPQ_BAL, lower_32_bits(hpq->dma)); ··· 2576 2576 if (!ppq->size_mask) 2577 2577 goto write_ctl; 2578 2578 2579 - log_size = fls(ppq->size_mask); 2579 + log_size = fls(ppq->size_mask) + ilog2(FBNIC_BD_FRAG_COUNT); 2580 2580 2581 2581 /* Add enabling of PPQ to BDQ control */ 2582 2582 bdq_ctl |= FBNIC_QUEUE_BDQ_CTL_PPQ_ENABLE;