Linux v7.1 added two new coalesce parameters,
ETHTOOL_A_COALESCE_RX_CQE_FRAMES and
ETHTOOL_A_COALESCE_RX_CQE_NSECS (kernel commit dc3d720e12f6). These
attributes are only exposed via netlink, not the legacy ioctl. This
series lets them be configured from .link files via
RxMaxCoalescedCQEFrames= and RxCoalesceCQENSec=.
Ethtool netlink uses different cmd ids for user to kernel and kernel to
user, which complicates kernel to user message parsing. Support for such
families was dropped in commit 9270ec60bc ("sd-netlink: drop genl type
system indexed by command"). ETHTOOL_MSG_COALESCE_SET does not have this
problem since the kernel only sends an ACK. Thus, we only add support
for ETHTOOL_MSG_COALESCE_SET in this series, and drop
replies/notifications for families that have this command id asymmetry.
The existing coalesce settings continue to go through ioctl.
## Testing
Ran unit tests locally `meson test -C build`
And tested with a fbnic device on a 7.3.0-rc4 kernel. The test was as
follows.
```
mkdir -p /run/systemd/network/1-fb_networkd-eth0.link.d
cat > /run/systemd/network/1-fb_networkd-eth0.link.d/99-cqe-test.conf <<'EOF'
[Link]
RxCoalesceCQENSec=4us
EOF
# Check the drop-in is picked up (test mode skips applying ethtool settings)
/tmp/sd/udevadm test-builtin net_setup_link /sys/class/net/eth0
# ID_NET_LINK_FILE_DROPINS=...90-hostagent.conf:/run/.../99-cqe-test.conf
# Run the new udevd in place of the stock one and replay the add uevent
systemctl stop systemd-udevd-control.socket systemd-udevd-kernel.socket \
systemd-udevd-varlink.socket systemd-udevd.service
SYSTEMD_INVOKED_AS=systemd-udevd /tmp/sd/udevadm --debug >/tmp/udevd.log 2>&1 &
sleep 2
udevadm trigger --verbose --settle --action add /sys/class/net/eth0
sleep 2
kill $!; wait
systemctl start systemd-udevd-control.socket systemd-udevd-kernel.socket \
systemd-udevd-varlink.socket systemd-udevd.service
```
I read the setting back netlink to verify RxCoalesceCQENSec was applied
to the device.
System and Service Manager
Details
Most documentation is available on systemd's website.
Assorted, older, general information about systemd can be found in the systemd Wiki.
Information about build requirements is provided in the README file.
Consult our NEWS file for information about what's new in the most recent systemd versions.
Please see the Code Map for information about this repository's layout and content.
Please see the Hacking guide for information on how to hack on systemd and test your modifications.
Please see our Contribution Guidelines for more information about filing GitHub Issues and posting GitHub Pull Requests.
When preparing patches for systemd, please follow our Coding Style Guidelines.
If you are looking for support, please contact our mailing list, join our IRC channel #systemd on libera.chat or Matrix channel
Stable branches with backported patches are available in the stable repo.
We have a security bug bounty program sponsored by the Sovereign Tech Fund hosted on YesWeHack
Repositories with distribution packages built from git main are available on OBS, and also repositories with packages built from the latest stable release
