Received: by 2002:a05:6a10:16a7:0:0:0:0 with SMTP id gp39csp2286348pxb; Sat, 7 Nov 2020 16:51:15 -0800 (PST) X-Google-Smtp-Source: ABdhPJz7tl68GfNhokCRY60W2rpBQ9T84M5/eIh/XCO9Xf0d4Dp2RQeyHs3WuNlqdgG4ubwdB+oj X-Received: by 2002:a17:906:4748:: with SMTP id j8mr8361754ejs.22.1604796675373; Sat, 07 Nov 2020 16:51:15 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1604796675; cv=none; d=google.com; s=arc-20160816; b=LMeH69vU0CdQYO05G72oVLIB0iX3PAtlpQ/cCF6hLwCwQK+Pfi57btvYmg+CbmwVAi VaDHRo0dbe9NSWJXwEg2Lk4suEcjA/gf70oLzWcBm0t9kGhK+ZOIBLV7eejdAj+CRA8W i1kO6Req9zOAT4r6LDIifq3WRGqNssUTF8juBTBm09bSMGBBIV7HfPmRzhsOEgOkdzyc cLaCzwPZXnwxoUMQH1bxespXkPj5JweDju4UG3l8AinHzHZZevxlMEy3jUloesK0IQzP KpL8vcQ9nVQnJMJn9Z9uQ59egQBk4mu+fImB/fJIrx5Ha9dp+tLRKBNbEh0AvgxvQlkW OciA== 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=LOZ/q4BZZQQmIvWoLo/yfk47gGQwkc69xB7RkRHk/ec=; b=dbxSXCL+82gPFoa1s2Yxk06f6VsMUWKgPEPW/Rr9XvsFKJJgfhgdEivyPuZnZrqhbD cIP53Y8670D1t30ppXklRD8bEhzPEUKmApmdgXjyew+gJ1444QAAsC0C7ZrTLnQ4R8R/ tw/CrJylJbFcmclgDJxFcNgoKKxsyEK9YABEP4BfqiYzs5isoEDRmgA1Cm8Ot/W+9qnk QOM4aKDcAUzLfktiKtJtiaNgOmUOuzWiEnP9HyVfIjz4zjZSdwBfQgs8tpdh3J9B1JpU sI9TNmoUAq4p9aE/ysACb6a7ZxYvHDUyKVvRAum3doz7PMawoWAaV5StWSqlkmF//Kkz 8LGw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@pm.me header.s=protonmail header.b="S/4EhYGc"; 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 lz21si4118196ejb.16.2020.11.07.16.50.51; Sat, 07 Nov 2020 16:51:15 -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="S/4EhYGc"; 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 S1726470AbgKHAqa (ORCPT + 99 others); Sat, 7 Nov 2020 19:46:30 -0500 Received: from mail-40133.protonmail.ch ([185.70.40.133]:60593 "EHLO mail-40133.protonmail.ch" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726053AbgKHAqa (ORCPT ); Sat, 7 Nov 2020 19:46:30 -0500 Date: Sun, 08 Nov 2020 00:46:15 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=pm.me; s=protonmail; t=1604796387; bh=LOZ/q4BZZQQmIvWoLo/yfk47gGQwkc69xB7RkRHk/ec=; h=Date:To:From:Cc:Reply-To:Subject:From; b=S/4EhYGcNNYt2yG69lFK6vHdOBSC+NOFAY591UUI35bXN1bd+ObM2YWGtnhVWci1w d/SrVoBqm2nyFK7Eglixioax8rehkINydYq/tpBT/0vpvGBjMvM5zlOOh69VV2s+Lh NCa5Shm9CbzIks5qNN8CbLNQHw6R76hiZA0ploy7GTRga9Ud2d1C+6eQouwdtOfC9m jB1karvaB0DPBnm4/OT0ZW99V15w3Vlv/lUa5suc9BqedsnqRUnvLtoTOUok7iolSe Y9yefGqIwcRfizC9Cvz796byD1E0o8YMGplw+jBPr4YdWO4fwc7DR2XPYQCV/j6wG7 t7wHEHcWTXu2w== 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 v2 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()). From v1 [1]: - dropped extra new line as advised by Jakub; - no functional changes. [1] https://lore.kernel.org/netdev/AlZXQ2o5uuTVHCfNGOiGgJ8vJ3KgO5YIWAnQjH0c= DE@cp3-web-009.plabs.ch Fixes: 0980bfcd6954 ("ethtool: set netdev features with FEATURES_SET reques= t") Signed-off-by: Alexander Lobakin --- net/ethtool/features.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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 genl= _info *info) =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