From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id CDBEB37A496; Sat, 14 Mar 2026 14:54:29 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1773500069; cv=none; b=p2z+BbTA/RZ9uhvoh/Ovo/gotEESCjtUdZn83Kc6vxElhEBMVSGbKZkBYc4H+jcX4IVyksE2izUahaXYfgR21Fr51EtPvTiqx5QVMa2vXo81pN0el0jH3YEyxzFPPYQu8plxId051Uef6npPElUDhq2QTUAu178aO1IURNG8sE0= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1773500069; c=relaxed/simple; bh=n/MAAqP1dF+2l52/HtTuluFsqwaDChdXW23orPwVa58=; h=Date:From:To:Cc:Subject:Message-ID:In-Reply-To:References: MIME-Version:Content-Type; b=XoJnnZ3K7qSd9X6AmBMW9F8BNC2/VE9ZzH4AG9za7GzUdqdQb700PI+rfGKWOb5lx6Xjm+TFZJbYjG5a42Pwb8TncT6fs0YtKAk9GASnH/uwEC/E8u21AJRjEyqSUAQVxwvqPoPLe+Kfd8tSnsMt8HvdoclXW2a6vl9nDnxdU7s= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=ZAiVPEmR; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="ZAiVPEmR" Received: by smtp.kernel.org (Postfix) with ESMTPSA id C82CBC116C6; Sat, 14 Mar 2026 14:54:28 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1773500069; bh=n/MAAqP1dF+2l52/HtTuluFsqwaDChdXW23orPwVa58=; h=Date:From:To:Cc:Subject:In-Reply-To:References:From; b=ZAiVPEmRXtnKh6Xw1DrND0U0kKrh5mwv28vBax4PTyDlS8BQ+RY2xw+FtM7Y6ahvN poZWPhzITK7CI7JXflsof+D2oJYb6neJ1KlNQnYmFDh4Mo2nJbzuoeq8GiDwG4IPJI FWLVkbaB6deUznBC046EfYITh5h0WAezejLza4cdgDscuElPaeaBGBe7aUIxTpxxNq z6LYQ+xqiGiGyZF1e4zNoF3UyppbSbqYsWfGZPV2jJgZRacp0I7ftsbaMIOWMyq8BV bWxNEeLgyM1dPjgpLGSmZ4KULyKZnpwzzqKJxPVmqglEt7omi6tYMPQ61+7Xv+cG7K jCOiO5K1iJKTg== Date: Sat, 14 Mar 2026 07:54:27 -0700 From: Jakub Kicinski To: =?UTF-8?B?VGjDqW8=?= Lebrun Cc: "Nicolas Ferre" , "Claudiu Beznea" , "Andrew Lunn" , "David S. Miller" , "Eric Dumazet" , "Paolo Abeni" , , , "Vladimir Kondratiev" , "Gregory CLEMENT" , =?UTF-8?B?QmVub8OudA==?= Monin , "Tawfik Bayouk" , "Thomas Petazzoni" , "Paolo Valerio" Subject: Re: [PATCH net-next v2 1/2] net: macb: implement ethtool_ops.get|set_channels() Message-ID: <20260314075427.034097b2@kernel.org> In-Reply-To: References: <20260311-macb-set-channels-v2-0-982693a1f5fc@bootlin.com> <20260311-macb-set-channels-v2-1-982693a1f5fc@bootlin.com> <20260312182624.35ab61c8@kernel.org> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable On Fri, 13 Mar 2026 16:14:23 +0100 Th=C3=A9o Lebrun wrote: > > should we reorder this with the running() check? =20 >=20 > I don't agree. For example when an operation is not supported, we start > by checking that and returning EOPNOTSUPP. Then we validate the input > data. Then we act. >=20 > Here it is the same. When netif_running(), we never reply to any > request even if it happens to be a no-op. >=20 > I'll go ahead and send V3. Seeing how this was only a question I'll make > the guess you don't care much about it and are fine either way. > Same for me. Sorry for the delay. This code can only be reached from the IOCTL path. The Netlink path will check that params haven't changed in ethnl_set_channels() (look at the @mod variable) and return 0 directly. So you're basically adding a discrepancy between ioctl and Netlink. Not a huge deal but I don't envy any user having to debug this..