Received: by 2002:a05:6a10:16a7:0:0:0:0 with SMTP id gp39csp2256856pxb; Sat, 7 Nov 2020 15:32:05 -0800 (PST) X-Google-Smtp-Source: ABdhPJw2XI71oTFPoSOFNYsdfeiCHUdrfsgqrguNXSrnpL52FG6DSY/GOdwgSZFLNAbPzolDy1vd X-Received: by 2002:a17:906:5017:: with SMTP id s23mr8859783ejj.359.1604791925112; Sat, 07 Nov 2020 15:32:05 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1604791925; cv=none; d=google.com; s=arc-20160816; b=So+Bsvfi3G7uxt7srO0fJHSPqsA7wzEt1EAO4MjI2f41M2x5u/Rx43PMJk7HiBrC4j R0rFxRtYJ+Gcg981CmvhlR/UAhCn/SFm9fRoY+lC4wM3gqVlSG3U5UQ3aLKVGWncc8DG gDiYCIXIMSjcyvW4K3JFKEjbD7OIPul+TOboTpqXawGSTGsQ6c54ET14vvJHjnLhdqrn tNKIZ+I95bigQF29riBcKj7PeJW8oL/92h0FL0q8dJEaDS1B6vljJt+aR8iKiTDNHCcx IZuPuIHYQJ3tDePcoOpGzF8ef9B0wrVvVgB33HaqCOVssyEzIIcBDsH910UK++wP5y4I xnZQ== 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 :references:in-reply-to:message-id:subject:cc:to:from:date :dkim-signature; bh=7Vh0nvK7qjhtdcOPwTOYjh4etCOjaRMK0v/6ZBzV4pc=; b=qc+8K0mvIF0AisqGlKQUxjpouAOt+lGIBZ62uDHUif2v5swrhOvBAGMIKjF+lOOrHI BT/Id6CsJwYzjnC0Qro7Kzg4aP0Ly/d5oIR9mKWUJyIgzFVniLHKIiD6MctV6JXnpGrS KZLIggmtOnJi40754FoWfp9HVEeB/nH+ZS5zwlGMWLKErZlJXQ7Tw5Ph51Y+GrU/IXXP zKBIjZzKU6SmS9U++J1Xh2WvhET1LYGC9ufXG7sB5JAPnmZ87/JglErvmpdNle2ybdMm eNxt2LoPzpqx6WbCm1o4HKxwrGbXmUACU/A5KP92REFr1D4LQHnhhyP2lOh4l8G2BQba 3x3A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b="AUMxBxh/"; 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=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id a7si3765449ejv.659.2020.11.07.15.31.07; Sat, 07 Nov 2020 15:32:05 -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=@kernel.org header.s=default header.b="AUMxBxh/"; 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=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726455AbgKGXXO (ORCPT + 99 others); Sat, 7 Nov 2020 18:23:14 -0500 Received: from mail.kernel.org ([198.145.29.99]:59356 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725838AbgKGXXO (ORCPT ); Sat, 7 Nov 2020 18:23:14 -0500 Received: from kicinski-fedora-pc1c0hjn.dhcp.thefacebook.com (unknown [163.114.132.4]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 484DB2087E; Sat, 7 Nov 2020 23:23:13 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1604791393; bh=e3OLEr/83DVpjBpXHhs04dOi3JUgCsyFLMKa47cxGMo=; h=Date:From:To:Cc:Subject:In-Reply-To:References:From; b=AUMxBxh/0pXz9OrnoNkiE/15RIAW7cCo0KvLIb4DlCAtp9V0if+i4EIv44UG2Bc3M inWnBtCFvFoaAmF3ViLMh9tczD7Q6a92eCTPkDKiRToOcgnuFHirsj72vJYvmzTNZy t7LSnkFGmOhwASnE9OtzQFSOdBcReEf8h+RSuZ4g= Date: Sat, 7 Nov 2020 15:23:12 -0800 From: Jakub Kicinski To: Alexander Lobakin Cc: "David S. Miller" , Michal Kubecek , Maxim Mikityanskiy , netdev@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH net] ethtool: netlink: add missing netdev_features_change() call Message-ID: <20201107152312.727b2e68@kicinski-fedora-pc1c0hjn.dhcp.thefacebook.com> In-Reply-To: References: MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, 05 Nov 2020 16:26:58 +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()). > > Fixes: 0980bfcd6954 ("ethtool: set netdev features with FEATURES_SET request") > Signed-off-by: Alexander Lobakin LGTM, one nit below > 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) > wanted_diff_mask, new_active, > active_diff_mask, compact); > } > + I think the reply and notification are purposefully grouped, please drop this extra new line. > if (mod) > - ethtool_notify(dev, ETHTOOL_MSG_FEATURES_NTF, NULL); > + netdev_features_change(dev); > > out_rtnl: > rtnl_unlock();