linux-stable/Documentation
David Arinzon f7d625adeb net: ena: Add dynamic recycling mechanism for rx buffers
The current implementation allocates page-sized rx buffers.
As traffic may consist of different types and sizes of packets,
in various cases, buffers are not fully used.

This change (Dynamic RX Buffers - DRB) uses part of the allocated rx
page needed for the incoming packet, and returns the rest of the
unused page to be used again as an rx buffer for future packets.
A threshold of 2K for unused space has been set in order to declare
whether the remainder of the page can be reused again as an rx buffer.

As a page may be reused, dma_sync_single_for_cpu() is added in order
to sync the memory to the CPU side after it was owned by the HW.
In addition, when the rx page can no longer be reused, it is being
unmapped using dma_page_unmap(), which implicitly syncs and then
unmaps the entire page. In case the kernel still handles the skbs
pointing to the previous buffers from that rx page, it may access
garbage pointers, caused by the implicit sync overwriting them.
The implicit dma sync is removed by replacing dma_page_unmap() with
dma_unmap_page_attrs() with DMA_ATTR_SKIP_CPU_SYNC flag.

The functionality is disabled for XDP traffic to avoid handling
several descriptors per packet.

Signed-off-by: Arthur Kiyanovski <akiyano@amazon.com>
Signed-off-by: Shay Agroskin <shayagr@amazon.com>
Signed-off-by: David Arinzon <darinzon@amazon.com>
Link: https://lore.kernel.org/r/20230612121448.28829-1-darinzon@amazon.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
2023-06-15 22:45:47 -07:00
..
ABI dmaengine updates for v6.4 2023-05-03 11:11:56 -07:00
PCI
RCU
accel
accounting Scheduler changes for v6.4: 2023-04-28 14:53:30 -07:00
admin-guide Merge git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net 2023-06-15 22:19:41 -07:00
arch A handful of late-arriving documentation fixes, plus one Spanish 2023-05-05 13:16:42 -07:00
arm ARM: SoC devicetree changes for 6.4 2023-04-25 12:11:54 -07:00
arm64 irqchip/gic-v3: Add Rockchip 3588001 erratum workaround 2023-04-18 17:31:17 +01:00
block Documentation/block: drop the request.rst file 2023-05-12 11:04:58 -06:00
bpf bpf, docs: Shift operations are defined to use a mask 2023-05-17 16:18:33 +02:00
cdrom Documentation: use capitalization for chapters and acronyms 2023-05-16 12:49:31 -06:00
core-api - Nick Piggin's "shoot lazy tlbs" series, to improve the peformance of 2023-04-27 19:42:02 -07:00
cpu-freq
crypto
dev-tools Mainly singleton patches all over the place. Series of note are: 2023-04-27 19:57:00 -07:00
devicetree Merge git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net 2023-06-15 22:19:41 -07:00
doc-guide
driver-api pwm: Changes for v6.4-rc1 2023-05-03 11:25:01 -07:00
fault-injection block: null_blk: make fault-injection dynamically configurable per device 2023-04-13 07:38:55 -06:00
fb
features
filesystems smb3: move Documentation/filesystems/cifs to Documentation/filesystems/smb 2023-05-24 16:29:21 -05:00
firmware-guide
firmware_class
fpga Documentation: use capitalization for chapters and acronyms 2023-05-16 12:49:31 -06:00
gpu
hid
hwmon hwmon: (aquacomputer_d5next) Add support for Aquacomputer Aquastream XT 2023-04-21 07:27:23 -07:00
i2c
iio
images
infiniband
input
isdn
kbuild parisc: update kbuild doc. aliases for parisc64 2023-05-03 17:43:10 +02:00
kernel-hacking
leds Documentation: leds: leds-class: Document new Hardware driven LEDs APIs 2023-05-31 09:42:08 +01:00
litmus-tests LKMM scripting updates for v6.4 2023-04-24 12:02:25 -07:00
livepatch Objtool changes for v6.4: 2023-04-28 14:02:54 -07:00
locking Documentation: use capitalization for chapters and acronyms 2023-05-16 12:49:31 -06:00
loongarch
maintainer
mhi
mips
misc-devices
mm mm: page_table_check: Make it dependent on EXCLUSIVE_SYSTEM_RAM 2023-05-29 16:14:28 +01:00
netlabel
netlink netlink: specs: ethtool: mark pads as pads 2023-06-12 11:01:03 +01:00
networking net: ena: Add dynamic recycling mechanism for rx buffers 2023-06-15 22:45:47 -07:00
nvdimm
nvme
pcmcia Documentation: use capitalization for chapters and acronyms 2023-05-16 12:49:31 -06:00
peci
power regulator: consumer.rst: fix 'regulator_enable' typo. 2023-04-27 21:55:38 +01:00
powerpc
process docs: netdev: document the existence of the mail bot 2023-05-23 21:11:54 -07:00
riscv RISC-V Patches for the 6.4 Merge Window, Part 1 2023-04-28 16:55:39 -07:00
rust
s390 s390/iommu: get rid of S390_CCW_IOMMU and S390_AP_IOMMU 2023-05-17 15:20:18 +02:00
scheduler sh updates for v6.4 2023-04-27 17:41:23 -07:00
scsi
security lsm: move hook comments docs to security/security.c 2023-04-28 11:58:34 -04:00
sound ALSA: docs: Fix code block indentation in ALSA driver example 2023-05-03 08:08:25 +02:00
sphinx
sphinx-static
spi
staging Documentation: use capitalization for chapters and acronyms 2023-05-16 12:49:31 -06:00
target
timers Documentation: use capitalization for chapters and acronyms 2023-05-16 12:49:31 -06:00
tools rtla/timerlat: Add auto-analysis only option 2023-04-25 19:26:17 -04:00
trace tracing: Rename stacktrace field to common_stacktrace 2023-05-23 23:38:23 -04:00
translations docs: zh_CN/devicetree: sync usage-model fix 2023-06-08 07:31:59 -06:00
usb
userspace-api tools: ynl: user space helpers 2023-06-06 12:31:31 -07:00
virt VFIO updates for v6.4-rc1 2023-05-02 11:56:43 -07:00
w1
watchdog
.gitignore
Changes
CodingStyle
Kconfig
Makefile
SubmittingPatches
atomic_bitops.txt
atomic_t.txt
conf.py docs: turn off "smart quotes" in the HTML build 2023-04-20 17:53:18 -06:00
docutils.conf
dontdiff
index.rst
memory-barriers.txt
subsystem-apis.rst