From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 101958 invoked by alias); 18 Jun 2018 17:11:39 -0000 Mailing-List: contact libc-alpha-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: libc-alpha-owner@sourceware.org Received: (qmail 101943 invoked by uid 89); 18 Jun 2018 17:11:39 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-1.0 required=5.0 tests=AWL,BAYES_00,KAM_LAZY_DOMAIN_SECURITY,RCVD_IN_DNSWL_NONE autolearn=no version=3.3.2 spammy=H*r:4.89 X-HELO: albireo.enyo.de From: Florian Weimer To: Adhemerval Zanella Cc: libc-alpha@sourceware.org Subject: Re: [PATCH] Linux: Implement opensock using Netlink sockets References: <20180618105015.5E8B340292859@oldenburg.str.redhat.com> <4e69cf5f-309f-007b-bc11-397e831566bd@linaro.org> Date: Mon, 18 Jun 2018 17:11:00 -0000 In-Reply-To: <4e69cf5f-309f-007b-bc11-397e831566bd@linaro.org> (Adhemerval Zanella's message of "Mon, 18 Jun 2018 14:09:00 -0300") Message-ID: <87a7rsuim7.fsf@mid.deneb.enyo.de> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: quoted-printable X-SW-Source: 2018-06/txt/msg00503.txt.bz2 * Adhemerval Zanella: >> Ahh, it's been fixed since then.=A0 Netlink sockets were one of the >> few which did not perform ENOIOCTLCMD fallback.=A0 This was changed in >> kernel 4.6: >>=20 >> commit 025c68186e07afaededa84143f1a22f273cd3f67 >> Author: David Decotigny >> Date:=A0=A0 Mon Mar 21 10:15:35 2016 -0700 >>=20 >> =A0=A0=A0 netlink: add support for NIC driver ioctls >>=20 >> =A0=A0=A0 By returning -ENOIOCTLCMD, sock_do_ioctl() falls back to calli= ng >> =A0=A0=A0 dev_ioctl(), which provides support for NIC driver ioctls, whi= ch >> =A0=A0=A0 includes ethtool support. This is similar to the way ioctls are >> =A0=A0=A0 handled in udp.c or tcp.c. >>=20 >> =A0=A0=A0 This removes the requirement that ethtool for example be tied = to the >> =A0=A0=A0 support of a specific L3 protocol (ethtool uses an AF_INET soc= ket >> =A0=A0=A0 today). >>=20 >> It's unfortunate that it took that long to make this change. >>=20 >> Thanks, >> Florian > > Indeed, so I think we will need the fallback options (maybe we can restri= ct > to some options). The real question is whether it is important to avoid module loading. If we could just try AF_NETLINK AF_UNIX AF_INET AF_INET6 in this order, irrespective of the module load status, the code would already be much, much simpler.