Received: by 2002:a05:6a10:16a7:0:0:0:0 with SMTP id gp39csp3227762pxb; Mon, 9 Nov 2020 06:06:01 -0800 (PST) X-Google-Smtp-Source: ABdhPJyvIDyyJp8V8FA9QDhA2BxFq2EOs15OSo4/voTldgpkwV+yPEsbXFZJe/9fKXpIVQqJlnXv X-Received: by 2002:a17:906:a988:: with SMTP id jr8mr14878109ejb.508.1604930761435; Mon, 09 Nov 2020 06:06:01 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1604930761; cv=none; d=google.com; s=arc-20160816; b=ogQJH12D9ggmZbDjFJ732skY8pYnPo5Jbb2JVhJzoTUqvE8sBnB4CHat1SvLjRiA5s gcO9T3p05nqkDJL63KyfxRICLRTcp6iNmVAP5Zlg+PmDR3BzFP5RVoXEq79vPJuCeOwf hQxGYUGtO+EyLjJgLK7pOP8bstMkNOTiChBMjchEOLdPhB9QjqdDd3tHy8shaKENinqd zZbGx5WpaDdRdNzYsRqQX8ktD4jqIcL4Fiisfk0i2ANBh23O7ZDEmCiZ6Ajl9aZy/IaR bMmqggtyDBgwVGKjAe3ZScZJ1FqIdsU2BfcNKXiyVN0SvlJbiGUe1hGqKBc/jgcyQRIO Tslg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date; bh=HEtv2PyHnyFRFhYzcsY1SvQAcU/Us0lM9ajEup492FM=; b=S0wYwgx4hRsu9ykAtk9QOhkvBiEga3VaaLzSkvy9ew6Ig4Zwp1l6cMOnfLXpFQa2ap y2avtOVbxo1iKjYRIpF1EkX55VdH1KEgACjLks0q3EDtGux7yPhS/uuhCbwiFx7GBdJ+ Mcdes9CaqkI4TuPOsHeoyC2iZkRGC9f+PXoVIv6VN7wnNEMpZUHrmUnbbBL2mPbRNmX5 W4MtSBzUxft/pafBPfMSC3nOFXHo6l1gSunQc0Dty7tpNxjmBhqkAgwedkLEzFl6WO1W XV3onAFyfNmxM6d6S5jJit70wTa/3bbT2tX69Yhz39bhwxYPI9a9l6erIH2uZPRho8ZI AvHw== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id y19si6697670ejd.730.2020.11.09.06.05.34; Mon, 09 Nov 2020 06:06:01 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1731332AbgKIOAF (ORCPT + 99 others); Mon, 9 Nov 2020 09:00:05 -0500 Received: from mx2.suse.de ([195.135.220.15]:43816 "EHLO mx2.suse.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1730072AbgKIOAE (ORCPT ); Mon, 9 Nov 2020 09:00:04 -0500 X-Virus-Scanned: by amavisd-new at test-mx.suse.de Received: from relay2.suse.de (unknown [195.135.221.27]) by mx2.suse.de (Postfix) with ESMTP id B53A0AD4F; Mon, 9 Nov 2020 14:00:02 +0000 (UTC) Received: by lion.mk-sys.cz (Postfix, from userid 1000) id 3F7BD60344; Mon, 9 Nov 2020 15:00:02 +0100 (CET) Date: Mon, 9 Nov 2020 15:00:02 +0100 From: Michal Kubecek To: Alexander Lobakin Cc: "David S. Miller" , Jakub Kicinski , Maxim Mikityanskiy , netdev@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH v2 net] ethtool: netlink: add missing netdev_features_change() call Message-ID: <20201109140002.g45cbbroshyjotdh@lion.mk-sys.cz> References: MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="kabiacxtqtoc2zqu" Content-Disposition: inline In-Reply-To: Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org --kabiacxtqtoc2zqu Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Sun, Nov 08, 2020 at 12:46:15AM +0000, Alexander Lobakin wrote: > After updating userspace Ethtool from 5.7 to 5.9, I noticed that > NETDEV_FEAT_CHANGE is no more raised when changing netdev features > through Ethtool. > That's because the old Ethtool ioctl interface always calls > netdev_features_change() at the end of user request processing to > inform the kernel that our netdevice has some features changed, but > the new Netlink interface does not. Instead, it just notifies itself > with ETHTOOL_MSG_FEATURES_NTF. > Replace this ethtool_notify() call with netdev_features_change(), so > the kernel will be aware of any features changes, just like in case > with the ioctl interface. This does not omit Ethtool notifications, > as Ethtool itself listens to NETDEV_FEAT_CHANGE and drops > ETHTOOL_MSG_FEATURES_NTF on it > (net/ethtool/netlink.c:ethnl_netdev_event()). >=20 > From v1 [1]: > - dropped extra new line as advised by Jakub; > - no functional changes. >=20 > [1] https://lore.kernel.org/netdev/AlZXQ2o5uuTVHCfNGOiGgJ8vJ3KgO5YIWAnQjH= 0cDE@cp3-web-009.plabs.ch >=20 > Fixes: 0980bfcd6954 ("ethtool: set netdev features with FEATURES_SET requ= est") > Signed-off-by: Alexander Lobakin Reviewed-by: Michal Kubecek > --- > net/ethtool/features.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) >=20 > diff --git a/net/ethtool/features.c b/net/ethtool/features.c > index 8ee4cdbd6b82..1c9f4df273bd 100644 > --- a/net/ethtool/features.c > +++ b/net/ethtool/features.c > @@ -280,7 +280,7 @@ int ethnl_set_features(struct sk_buff *skb, struct ge= nl_info *info) > active_diff_mask, compact); > } > if (mod) > - ethtool_notify(dev, ETHTOOL_MSG_FEATURES_NTF, NULL); > + netdev_features_change(dev); > =20 > out_rtnl: > rtnl_unlock(); > --=20 > 2.29.2 >=20 >=20 --kabiacxtqtoc2zqu Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQEzBAABCAAdFiEEWN3j3bieVmp26mKO538sG/LRdpUFAl+pS1sACgkQ538sG/LR dpVc/wgAhPzbYoT4cIBpAgOork4F228kOK5CTAXW39iq0ms5xYC44R3ThegOMlpc e+OZxcL8BsALZ8WN/fOA29tEIAFKPuAVSPH6EdsddYtP7Rc90DCrBBB3kl7XpK7j ZcE5TbDf+KPbFaeJWxjya4ERA7tzzSgO+0dblfNLW6b7P8RERmtkpauGv+/tvrs6 3oz0/OnX8Uli+nX2sLttl/QLMKywYbLFSNBbA5MffjXR5MOOh/G79uMLmblu5L9Z VU8HfQDlJSuZAJW1++DgPWaqHCoNVqWD1LzEfNfQ1Bw9UowgvCK2cbbYiYE+FUyr 3pLBXPm4qp3p95006yWKzRj7HpfLhw== =zqEO -----END PGP SIGNATURE----- --kabiacxtqtoc2zqu--