[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <a433a0b0-bf5e-ad90-8373-4f88e2ef991d@gmail.com>
Date: Wed, 10 Jun 2020 12:50:30 +0200
From: Heiner Kallweit <hkallweit1@...il.com>
To: Michal Kubecek <mkubecek@...e.cz>
Cc: "netdev@...r.kernel.org" <netdev@...r.kernel.org>
Subject: Re: ethtool 5.7: netlink ENOENT error when setting WOL
On 10.06.2020 11:13, Michal Kubecek wrote:
> 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
No, because I have PHYLIB=m.
Not sure what it would take to allow building ethtool netlink support
as a module. But that's just on a side note.
> - the command actually succeeds (i.e. changes the WoL modes)
Yes, it does.
> - 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
>
That's the exact output I get.
> 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
>
Thanks, Heiner
> 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;
>
Powered by blists - more mailing lists