]> git.ipfire.org Git - thirdparty/kernel/linux.git/commit
net: ethtool: pass genl_info to the ethnl parse_request operation
authorMaxime Chevallier <maxime.chevallier@bootlin.com>
Mon, 23 Mar 2026 09:58:32 +0000 (10:58 +0100)
committerJakub Kicinski <kuba@kernel.org>
Wed, 25 Mar 2026 03:14:29 +0000 (20:14 -0700)
commit10171b938330f6e625e7dc8dd24a15cc96218172
treeb078bdeb3917a5964f0df0e0fccbb87d83bb9b07
parentb1c803d5c8167026791abfaed96fd3e6a1fcd750
net: ethtool: pass genl_info to the ethnl parse_request operation

The .parse_request() ethnl operation extracts the relevant attributes
from the netlink request to populate the private req_info.

By passing genl_info as a parameter to this callback, we can use
the GENL_REQ_ATTR_CHECK() macro to check for missing mandatory
parameters.

This macro has the advantage of returning a better error explanation
through the netlink_ext_ack struct.

Convert the eeprom ethnl code to this macro, as it's the only command
yet that has mandatory request parameters.

Suggested-by: Jakub Kicinski <kuba@kernel.org>
Signed-off-by: Maxime Chevallier <maxime.chevallier@bootlin.com>
Link: https://patch.msgid.link/20260323095833.136266-1-maxime.chevallier@bootlin.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
net/ethtool/eeprom.c
net/ethtool/netlink.c
net/ethtool/netlink.h
net/ethtool/pause.c
net/ethtool/rss.c
net/ethtool/stats.c
net/ethtool/strset.c
net/ethtool/tsinfo.c