Fix MANA RX with bounce buffering
Status from this message: This series was applied to netdev/net.git (main)
Get series with b4
b4 am [email protected]Versions newest first · linked by author and title
- v3 Latest2 patches 2 repliesApplied 2/2
- v22 patches 2 repliesSuperseded
- v11 patch 3 repliesSuperseded
Patches in v3 All 2 applied
| # | Subject and files | Size | Replies | Applied |
|---|---|---|---|---|
| 1/2 | net: mana: Validate the packet length reported by the NICdrivers/ | +18 | 2 replies | Applied |
| 2/2 | net: mana: Sync page pool RX frags for CPUdrivers/ include/ | +41 | 0 replies | Applied |
Reviews trailers per patch
All 2 patches have a Reviewed-by or Acked-by.
| Patch | Haiyang Zhang |
|---|---|
| 1/2 | R-b |
| 2/2 | R-b |
Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.
Cover letter [PATCH net v3 0/2] Fix MANA RX with bounce buffering
With swiotlb=force, the MANA NIC fails to work properly due to commit 730ff06d3f5c ("net: mana: Use page pool fragments for RX buffers instead of full pages to improve memory efficiency.").
This happens because, with the standard MTU=1500, the aforementioned commit uses page pool frags with PP_FLAG_DMA_MAP, but fails to call page_pool_dma_sync_for_cpu() to sync the received packet for CPU acces before handing the RX buffer to the stack.
Here patch #2 adds the required page_pool_dma_sync_for_cpu().
Patch #1 validates the packet length reported by the NIC. With patch #2, page_pool_dma_sync_for_cpu() uses the packet length, so we don't want to blindly trust the packet length, just in case.
There is no change between v2 and v3.
v3 just swaps the order of the 2 patches in v2, as suggested by Simon [3].
Please review.
Thanks,
Dexuan
References:
[1] v1: https://lore.kernel.org/netdev/[email protected]/
[2] v2: https://lore.kernel.org/netdev/[email protected]/
[3] https://lore.kernel.org/netdev/[email protected]/
Dexuan Cui (2):
net: mana: Validate the packet length reported by the NIC
net: mana: Sync page pool RX frags for CPU
drivers/net/ethernet/microsoft/mana/mana_en.c | 61 +++++++++++++++---- include/net/mana/mana.h | 8 +++ 2 files changed, 58 insertions(+), 11 deletions(-)
Signature · 1 line
2.34.1