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 4DEBA33D512; Mon, 16 Mar 2026 23:20:15 +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=1773703215; cv=none; b=A1DDoN7n3MZX8kWMHgWU4C2EeKz1ZN65i8X5H7S3k48Wap8okT3ch215I9ZTB3FToRRXtAHIzeu2chtttoztiR9eC1wvY/fzcO+YJgOsUN0+zDH3lTC4oyoKvxiUcMwOOQmXKWIDE3VJr5OPRaeA+ThKRCaCsqndysfKQz8/XRA= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1773703215; c=relaxed/simple; bh=ngLPlTpHcItC/FgmPRd4XsiSQ26Qg1Kt1lDDC99DPLk=; h=Date:From:To:Cc:Subject:Message-ID:In-Reply-To:References: MIME-Version:Content-Type; b=BBjZytpqkXhUDeMPe4NlrTiDQPnhUlQFmZY0Jyq4rZB4XBS5cFY4yQjY9aH5tw6TL3MeQpdDVwKbWi2TlVDayQs9IfNIqEJlxDaJlm2Lo7q1XQs5vSClNqFQufiqkogRy4OwABvJjUuhadVaAhwOG4JVqqh8fHY0fIEoFOdh9hE= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=bUysy7PT; 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="bUysy7PT" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 4B8D6C19421; Mon, 16 Mar 2026 23:20:14 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1773703214; bh=ngLPlTpHcItC/FgmPRd4XsiSQ26Qg1Kt1lDDC99DPLk=; h=Date:From:To:Cc:Subject:In-Reply-To:References:From; b=bUysy7PT/3AwxiBgsmJQsM8P+szwf4MJUbGgBwnD+L2inQ9rS5Egl36F8/xfz09TV Zf0CnaewxsL/aOMknM4ABAU9n14owOkYVRpLXa+NW7x4KymSZDSE0VUOMCvgDKDPOF ntQmyKQp3z5DlzPS22fNJ+D5UFIITnaDjrzj0Qccs4/dc1j/e8B8taXfEY9JCr9QmT NajowZyMStNoU4pqFijnMdeJpRPryOLpXmNWvQzjV6P7em9q6JKg3ZBKWnsA3oiCaJ sPTzEUvmyWVI1ljtNcoM6vtLszBoqP1f9qFqBJV9/5rGy8HLTp3XPMySO3JKTimVap wXpUf0Yt+VVTw== Date: Mon, 16 Mar 2026 16:20:13 -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: <20260316162013.5f8aa0c1@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> <20260314075427.034097b2@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 Mon, 16 Mar 2026 17:24:28 +0100 Th=C3=A9o Lebrun wrote: > > 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.. =20 >=20 > Actually, the IOCTL path also does the check (see below). So the > `count =3D=3D old_count` check shall be dropped from the driver > .set_channels() callback because it is redundant. Agreed? Oh, even better! Some of the ioctl paths don't validate the equivalence of the config but clearly I don't remember which.