Received: by 2002:a05:6a10:16a7:0:0:0:0 with SMTP id gp39csp612305pxb; Thu, 5 Nov 2020 08:29:09 -0800 (PST) X-Google-Smtp-Source: ABdhPJymC+n/6SreHbF7ccw4YUCWus4DiCLOEuQ013HkDlYTYBjQ1/bBH+Uj7nvYIx6zfu3JQRM+ X-Received: by 2002:aa7:db82:: with SMTP id u2mr3453984edt.262.1604593749418; Thu, 05 Nov 2020 08:29:09 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1604593749; cv=none; d=google.com; s=arc-20160816; b=X2Q6b5gy1raBKx8u5wVKu6ZqdGnSqDilPObtdANip01XhMvFec4S+Y3q44UaYWCODR r+5iGHzdXs23Tcq0wk9Ln0Y2KCAX0TlPXz9xcLTs5riqVIZ9uZXM2++ANQkj1tXoHjcs vHeYLRPAEU4aOP+Jylu1+lFdcseXc6tc8nCqya5GK6bXah1E96MxjEdLzWl9hvgRgz/4 Tr4GfZwdovG4klLiqNY/8Ii+Q3pMLLpUB1DE802c2kKpZT/ISNMMu3eB0PZAwoEqHb1F l0WIBGWhOafJKj73L6ATrneMRQ6leZx1unGAVFtZlSoBfsEZaHIZVYuyLRlvElw7Tm0C nP4A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :message-id:subject:reply-to:cc:from:to:dkim-signature:date; bh=wWkNAI1Z1OaM+ZJ+K4dO4VThjwMCnYu1qVLQHIn0wWs=; b=c+LNaxPlA77N3vZgtiman5LwawueTPAlTCOX6TaJIJrIpWdLZbtgt8KM3VsZkzr6Kw FGxYoCJI3W+aOOl9U70hK3N4k1gbzXQ7/0rd98reSi2NvCZdjXF+5yYZ9mKbuU4T7tFF RN2rALgGOI1rbWpkxQVDXhnhnjsKvRYkEhr3fI08iTM7j3Tx0Ri/Ld2yLU/jGy8+f4yQ sanF302T9PMoJXtHgWYwo54pXkYQnI9J8Yj0CZhnqES336ig2KWaAVIMqvezhXTvjtb0 6RsOBmcVAnp1So1Hwr6XbNtwthdkfl4wNW9veDLPyPFTZN+sE7aE6x30dfLmkAH6TWvU 0zxA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@pm.me header.s=protonmail header.b=Jwb1FMO4; 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; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=pm.me Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id a11si1387116ejc.351.2020.11.05.08.28.46; Thu, 05 Nov 2020 08:29:09 -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; dkim=pass header.i=@pm.me header.s=protonmail header.b=Jwb1FMO4; 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; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=pm.me Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1731558AbgKEQ1I (ORCPT + 99 others); Thu, 5 Nov 2020 11:27:08 -0500 Received: from mail-40134.protonmail.ch ([185.70.40.134]:42163 "EHLO mail-40134.protonmail.ch" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725998AbgKEQ1H (ORCPT ); Thu, 5 Nov 2020 11:27:07 -0500 Date: Thu, 05 Nov 2020 16:26:58 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=pm.me; s=protonmail; t=1604593625; bh=wWkNAI1Z1OaM+ZJ+K4dO4VThjwMCnYu1qVLQHIn0wWs=; h=Date:To:From:Cc:Reply-To:Subject:From; b=Jwb1FMO45jI45B5GrPFDa6vMScyppgwnPJuMnMEqeMYkgjZRzsZSb5cpP9R/uOJmJ HsYcwAnoToosWY1mxiouNhegBJPsjxAeAsxN5a/T50Zg/H3a5Ozk7xiTLVgVx2n4cg fPMfu4lwX5faxcSQ14c287tyxxdERNZ/zG8C/CK898ktA+ePzamVJTVllTO401Hqxc SM75mEAEU8DwLFLw2XsNTEi8sTTsVRC72+AAl6vGoQ5kfpW3Vd2pUkelimmryWfZ1+ ba0cozxn6I9O8/UrAx6LFBl1gIh9czUeHqMg1CAM0iHe/yzsFUOPmqpp5wR6RhZKho Ddh62QLj8EsfQ== To: "David S. Miller" , Jakub Kicinski From: Alexander Lobakin Cc: Michal Kubecek , Maxim Mikityanskiy , Alexander Lobakin , netdev@vger.kernel.org, linux-kernel@vger.kernel.org Reply-To: Alexander Lobakin Subject: [PATCH net] ethtool: netlink: add missing netdev_features_change() call Message-ID: MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Spam-Status: No, score=-1.2 required=10.0 tests=ALL_TRUSTED,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF shortcircuit=no autolearn=disabled version=3.4.4 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on mailout.protonmail.ch Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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()). Fixes: 0980bfcd6954 ("ethtool: set netdev features with FEATURES_SET reques= t") Signed-off-by: Alexander Lobakin --- net/ethtool/features.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/net/ethtool/features.c b/net/ethtool/features.c index 8ee4cdbd6b82..38f526f2125d 100644 --- a/net/ethtool/features.c +++ b/net/ethtool/features.c @@ -279,8 +279,9 @@ int ethnl_set_features(struct sk_buff *skb, struct genl= _info *info) =09=09=09=09=09 wanted_diff_mask, new_active, =09=09=09=09=09 active_diff_mask, compact); =09} + =09if (mod) -=09=09ethtool_notify(dev, ETHTOOL_MSG_FEATURES_NTF, NULL); +=09=09netdev_features_change(dev); =20 out_rtnl: =09rtnl_unlock(); --=20 2.29.2