On Wed, Jun 10, 2020 at 10:52:26AM +0200, Heiner Kallweit wrote: > On 10.06.2020 10:26, Heiner Kallweit wrote: > > Since ethtool 5.7 following happens (kernel is latest linux-next): > > > > ethtool -s enp3s0 wol g > > netlink error: No such file or directory > > > > With ethtool 5.6 this doesn't happen. I also checked the latest ethtool > > git version (5.7 + some fixes), error still occurs. > > > > Heiner > > > Bisecting points to: > netlink: show netlink error even without extack
Just to make sure you are hitting the same problem I'm just looking at, please check if - your kernel is built with ETHTOOL_NETLINK=n - the command actually succeeds (i.e. changes the WoL modes) - output with of "ethtool --debug 0x12 -s enp3s0 wol g" looks like sending genetlink packet (32 bytes): msg length 32 genl-ctrl CTRL_CMD_GETFAMILY CTRL_ATTR_FAMILY_NAME = "ethtool" received genetlink packet (52 bytes): msg length 52 error errno=-2 netlink error: No such file or directory offending message: ETHTOOL_MSG_LINKINFO_SET ETHTOOL_A_LINKINFO_PORT = 101 If this is the case, than the commit found by bisect only revealed an issue which was introduced earlier by commit 76bdf9372824 ("netlink: use pretty printing for ethtool netlink messages"). The patch below should suppress the message as intended. Michal diff --git a/netlink/nlsock.c b/netlink/nlsock.c index 2c760b770ec5..c3f09b6ee9ab 100644 --- a/netlink/nlsock.c +++ b/netlink/nlsock.c @@ -255,12 +255,12 @@ int nlsock_process_reply(struct nl_socket *nlsk, mnl_cb_t reply_cb, void *data) nlhdr = (struct nlmsghdr *)buff; if (nlhdr->nlmsg_type == NLMSG_ERROR) { - bool silent = nlsk->nlctx->suppress_nlerr; + unsigned int suppress = nlsk->nlctx->suppress_nlerr; bool pretty; pretty = debug_on(nlsk->nlctx->ctx->debug, DEBUG_NL_PRETTY_MSG); - return nlsock_process_ack(nlhdr, len, silent, pretty); + return nlsock_process_ack(nlhdr, len, suppress, pretty); } msgbuff->nlhdr = nlhdr;