[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <ZEesaPog588QIRfL@gvm01>
Date: Tue, 25 Apr 2023 12:33:12 +0200
From: Piergiorgio Beruto <piergiorgio.beruto@...il.com>
To: Jakub Kicinski <kuba@...nel.org>
Cc: mkubecek@...e.cz, netdev@...r.kernel.org
Subject: Re: [PATCH ethtool] netlink: settings: fix netlink support when PLCA
is not present
On Mon, Apr 24, 2023 at 05:07:42PM -0700, Jakub Kicinski wrote:
> PLCA support threw the PLCA commands as required into the initial
> support check at the start of nl_gset(). That's not correct.
> The initial check (AFAIU) queries for the base support in the kernel
> i.e. support for the commands which correspond to ioctls.
> If those are not available (presumably very old kernel or kernel
> without ethtool-netlink) we're better off using the ioctl.
>
> For new functionality, however, falling back to ioctl
> is counterproductive. New functionality (like PLCA) isn't
> supported via the ioctl, anyway, and we're losing all the other
> netlink-only functionality (I noticed that the link down statistics
> are gone).
>
> After much deliberation I decided to add a second check for
> command support in gset_request(). Seems cleanest and if any
> of the non-required commands narrows the capabilities (e.g.
> does not support dump) we should just skip it too. Falling
> back to ioctl would again be a regression.
Thanks Jackub, that makes sense to me (FWIW).
I'm trying this patch on my system and I can see it does not create an
issue on systems where PLCA is -not- supported.
However, as soon as I try this on a system where PLCA is enabled, I get
a segmentation fault of ethtool. I'm currently investigating the reason.
Thanks,
Piergiorgio
Powered by blists - more mailing lists