Netdev List
 help / color / mirror / Atom feed
From: Fidelio LAWSON <lawson.fidelio@gmail.com>
To: Jakub Kicinski <kuba@kernel.org>, Marek Vasut <marex@nabladev.com>
Cc: Paolo Abeni <pabeni@redhat.com>,
	woojung.huh@microchip.com, UNGLinuxDriver@microchip.com,
	andrew@lunn.ch, olteanv@gmail.com, davem@davemloft.net,
	edumazet@google.com, maxime.chevallier@bootlin.com,
	horms@kernel.org, hkallweit1@gmail.com, linux@armlinux.org.uk,
	Tristram.Ha@microchip.com, netdev@vger.kernel.org,
	linux-kernel@vger.kernel.org, nb@tipi-net.de,
	fidelio.lawson@exotec.com
Subject: Re: [PATCH net-next v9 2/3] net: ethtool: add KSZ87xx low-loss cable PHY tunables
Date: Tue, 9 Jun 2026 17:03:21 +0200	[thread overview]
Message-ID: <49c78c6e-5ccd-4789-ae53-359d4e5794c8@gmail.com> (raw)
In-Reply-To: <20260605163142.4bbcf502@kernel.org>

On 6/6/26 01:31, Jakub Kicinski wrote:
> On Fri, 5 Jun 2026 05:16:54 +0200 Marek Vasut wrote:
>> On 6/5/26 4:35 AM, Jakub Kicinski wrote:
>>> On Thu,  4 Jun 2026 13:41:19 +0200 Paolo Abeni wrote:
>>>> [Severity: High]
>>>> Is it intentional to enforce an 8-bit type constraint for bandwidth and DSP
>>>> equalizer tunables?
>>>>
>>>> This heavily couples the global API to the 8-bit register layout of the
>>>> KSZ87xx hardware without defining generic units like Hz for bandwidth.
>>>
>>> AFAIK this is the one comment from AI that survives scrutiny.
>>> Seems unlikely we'd need more bits, but then again - why not.
>>> u32 should be our default for integer values, u8 is more for
>>> booleans.
>>
>> Why waste memory space if we are already sure the space would not be used.
> 
> Waste what memory? We are talking about a syscall argument effectively.
> 
> My point is that this is adding the arguments as u8 in
> net/ethtool/ioctl.c, so as part of the global uAPI.
> 
> The driver can still store these as u8, since any value outside of that
> range is invalid for ksz87xx, and the input is properly validated.
> But we shouldn't constrain the value "in transit", at the uAPI level.
> Another driver may need a larger range (however unlikely that is).

Thanks for the clarification.

I will update the series to use u32 for the PHY tunables in the next 
revision, while keeping the driver-side representation constrained to 
the supported range.

Thanks,
Fidelio


  reply	other threads:[~2026-06-09 15:03 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-06-01 15:19 [PATCH net-next v9 0/3] ksz87xx: add support for low-loss cable equalizer errata Fidelio Lawson
2026-06-01 15:19 ` [PATCH net-next v9 1/3] net: dsa: microchip: implement KSZ87xx Module 3 low-loss cable errata Fidelio Lawson
2026-06-01 15:19 ` [PATCH net-next v9 2/3] net: ethtool: add KSZ87xx low-loss cable PHY tunables Fidelio Lawson
2026-06-04 11:41   ` Paolo Abeni
2026-06-04 12:11     ` Andrew Lunn
2026-06-05  2:35     ` Jakub Kicinski
2026-06-05  3:16       ` Marek Vasut
2026-06-05 23:31         ` Jakub Kicinski
2026-06-09 15:03           ` Fidelio LAWSON [this message]
2026-06-01 15:19 ` [PATCH net-next v9 3/3] net: phy: micrel: expose KSZ87xx low-loss cable tunables Fidelio Lawson
2026-06-04 11:41   ` Paolo Abeni
2026-06-04 12:15     ` Andrew Lunn
2026-06-01 15:43 ` [PATCH net-next v9 0/3] ksz87xx: add support for low-loss cable equalizer errata Nicolai Buchwitz

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=49c78c6e-5ccd-4789-ae53-359d4e5794c8@gmail.com \
    --to=lawson.fidelio@gmail.com \
    --cc=Tristram.Ha@microchip.com \
    --cc=UNGLinuxDriver@microchip.com \
    --cc=andrew@lunn.ch \
    --cc=davem@davemloft.net \
    --cc=edumazet@google.com \
    --cc=fidelio.lawson@exotec.com \
    --cc=hkallweit1@gmail.com \
    --cc=horms@kernel.org \
    --cc=kuba@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux@armlinux.org.uk \
    --cc=marex@nabladev.com \
    --cc=maxime.chevallier@bootlin.com \
    --cc=nb@tipi-net.de \
    --cc=netdev@vger.kernel.org \
    --cc=olteanv@gmail.com \
    --cc=pabeni@redhat.com \
    --cc=woojung.huh@microchip.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox