linux/Documentation
Jakub Kicinski 00d0f31a1e net: ethtool: coalesce: try to make user settings stick twice
SET_COALESCE may change operation mode and parameters in one call.
Changing operation mode may cause the driver to reset the parameter
values to what is a reasonable default for new operation mode.

Since driver does not know which parameters come from user and which
are echoed back from ->get, driver may ignore the parameters when
switching operation modes.

This used to be inevitable for ioctl() but in netlink we know which
parameters are actually specified by the user.

We could inform which parameters were set by the user but this would
lead to a lot of code duplication in the drivers. Instead try to call
the drivers twice if both mode and params are changed. The set method
already checks if any params need updating so in case the driver did
the right thing the first time around - there will be no second call
to it's ->set method (only an extra call to ->get()).

For mlx5 for example before this patch we'd see:

 # ethtool -C eth0 adaptive-rx on  adaptive-tx on
 # ethtool -C eth0 adaptive-rx off adaptive-tx off \
		   tx-usecs 123 rx-usecs 123
 Adaptive RX: off  TX: off
 rx-usecs: 3
 rx-frames: 32
 tx-usecs: 16
 tx-frames: 32
 [...]

After the change:

 # ethtool -C eth0 adaptive-rx on  adaptive-tx on
 # ethtool -C eth0 adaptive-rx off adaptive-tx off \
		   tx-usecs 123 rx-usecs 123
 Adaptive RX: off  TX: off
 rx-usecs: 123
 rx-frames: 32
 tx-usecs: 123
 tx-frames: 32
 [...]

This only works for netlink, so it's a small discrepancy between
netlink and ioctl(). Since we anticipate most users to move to
netlink I believe it's worth making their lives easier.

Link: https://lore.kernel.org/r/20230420233302.944382-1-kuba@kernel.org
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
2023-04-24 18:09:49 -07:00
..
ABI docs: sysfs-block: document hidden sysfs entry 2023-03-07 16:40:52 -07:00
accel Documentation: accel: escape wildcard in special file path 2023-01-26 11:52:14 +02:00
accounting
admin-guide LoongArch: Make WriteCombine configurable for ioremap() 2023-04-18 19:38:58 +08:00
arc
arm
arm64 arm64 updates for 6.3: 2023-02-21 15:27:48 -08:00
block block: stub out and deprecated the capability attribute on the gendisk 2023-02-06 08:44:55 -07:00
bpf bpf,docs: Remove KF_KPTR_GET from documentation 2023-04-16 08:51:24 -07:00
cdrom
core-api - Daniel Verkamp has contributed a memfd series ("mm/memfd: add 2023-02-23 17:09:35 -08:00
cpu-freq Docs/subsystem-apis: Remove '[The ]Linux' prefixes from titles of listed documents 2023-01-24 15:27:08 -07:00
crypto Docs/subsystem-apis: Remove '[The ]Linux' prefixes from titles of listed documents 2023-01-24 15:27:08 -07:00
dev-tools - Daniel Verkamp has contributed a memfd series ("mm/memfd: add 2023-02-23 17:09:35 -08:00
devicetree dt-bindings: net: Add WCN6855 Bluetooth 2023-04-23 21:57:14 -07:00
doc-guide
driver-api docs: vfio: fix header path 2023-03-14 11:31:57 -06:00
fault-injection docs: fault-injection: add requirements of error injectable functions 2023-02-02 22:50:00 -08:00
fb
features m68k: Add kernel seccomp support 2023-01-30 16:40:15 +01:00
filesystems A handful of fixes and minor documentation updates. 2023-03-14 11:08:28 -07:00
firmware_class
firmware-guide ACPI: docs: enumeration: Correct reference to the I²C device data type 2023-03-07 14:09:49 +01:00
fpga
gpu drm next for 6.3-rc1 2023-02-22 18:28:03 -08:00
hid It has been a moderately calm cycle for documentation; the significant 2023-02-22 12:00:20 -08:00
hwmon hwmon: constify pointers to hwmon_channel_info 2023-04-07 08:45:17 -07:00
i2c Documentation: i2c: correct spelling 2023-02-15 20:59:44 +01:00
ia64
iio
images
infiniband
input Docs/subsystem-apis: Remove '[The ]Linux' prefixes from titles of listed documents 2023-01-24 15:27:08 -07:00
isdn Documentation: isdn: correct spelling 2023-02-10 16:28:13 -08:00
kbuild Documentation/llvm: Add a note about prebuilt kernel.org toolchains 2023-04-08 22:48:15 +09:00
kernel-hacking
leds Documentation: LEDs: Describe good names for network LEDs 2023-04-19 12:59:16 +01:00
litmus-tests
livepatch Documentation: livepatch: module-elf-format: Remove local klp_modinfo definition 2023-02-06 08:45:55 -08:00
locking docs: locking: refer to the actual existing config names 2023-02-23 12:26:00 -07:00
loongarch
m68k
maintainer docs: rebasing-and-merging: Drop wrong statement about git 2023-03-07 10:26:22 -07:00
mhi
mips
misc-devices
mm zsmalloc: document freeable stats 2023-04-05 18:06:23 -07:00
netlabel
netlink net/handshake: Add a kernel API for requesting a TLSv1.3 handshake 2023-04-19 18:48:48 -07:00
networking net: ethtool: coalesce: try to make user settings stick twice 2023-04-24 18:09:49 -07:00
nios2
nvdimm
nvme
openrisc
parisc
PCI ixgb: Remove ixgb driver 2023-03-19 10:51:07 +00:00
pcmcia
peci Docs/subsystem-apis: Remove '[The ]Linux' prefixes from titles of listed documents 2023-01-24 15:27:08 -07:00
power Power management updates for 6.3-rc1 2023-02-21 12:13:58 -08:00
powerpc
process Merge git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net 2023-04-06 12:01:20 -07:00
RCU
riscv riscv: Move early dtb mapping into the fixmap region 2023-04-13 18:14:26 -07:00
rust rust: sort uml documentation arch support table 2023-04-06 23:11:04 +02:00
s390 VFIO updates for v6.3-rc1 2023-02-25 11:52:57 -08:00
scheduler sched/doc: supplement CPU capacity with RISC-V 2023-03-07 10:19:04 -07:00
scsi SCSI misc on 20230222 2023-02-22 13:41:41 -08:00
security
sh
sound ALSA: hda/sigmatel: add pin overrides for Intel DP45SG motherboard 2023-04-06 08:10:18 +02:00
sparc Documentation: sparc: correct spelling 2023-02-02 11:07:02 -07:00
sphinx docs: Use HTML comments for the kernel-toc SPDX line 2023-02-16 16:06:44 -07:00
sphinx-static docs: Add more information to the HTML sidebar 2023-02-08 13:28:27 -07:00
spi spi: correct spelling 2023-01-27 12:14:17 +00:00
staging
target scsi: target: Documentation: Correct spelling 2023-02-08 18:49:48 -05:00
timers
tools Documentation/rtla: Add hwnoise man page 2023-02-13 23:56:46 -05:00
trace Char/Misc and other driver subsystem changes for 6.3-rc1 2023-02-24 12:47:33 -08:00
translations Driver core fixes for 6.3-rc5 2023-04-02 10:10:16 -07:00
usb docs: usb: Add documentation for the UVC Gadget 2023-03-09 15:18:33 +01:00
userspace-api docs: netlink: document the sub-type attribute property 2023-03-28 23:54:43 -07:00
virt docs: kvm: x86: Fix broken field list 2023-04-04 13:22:05 -04:00
w1
watchdog Documentation/watchdog/hpwdt: Fix Format 2023-02-16 17:31:29 -07:00
x86 It has been a moderately calm cycle for documentation; the significant 2023-02-22 12:00:20 -08:00
xtensa
.gitignore
arch.rst
atomic_bitops.txt
atomic_t.txt
Changes
CodingStyle
conf.py It has been a moderately calm cycle for documentation; the significant 2023-02-22 12:00:20 -08:00
docutils.conf
dontdiff scripts: remove bin2c 2023-01-26 12:43:33 +09:00
index.rst Documentation: front page: use recommended heading adornments 2023-02-23 12:44:51 -07:00
Kconfig
Makefile
memory-barriers.txt
SubmittingPatches
subsystem-apis.rst