lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Date:   Sun, 4 Dec 2022 21:09:48 +0100
From:   Piergiorgio Beruto <piergiorgio.beruto@...il.com>
To:     Andrew Lunn <andrew@...n.ch>
Cc:     Heiner Kallweit <hkallweit1@...il.com>,
        Russell King <linux@...linux.org.uk>,
        "David S. Miller" <davem@...emloft.net>,
        Eric Dumazet <edumazet@...gle.com>,
        Jakub Kicinski <kuba@...nel.org>,
        Paolo Abeni <pabeni@...hat.com>, linux-kernel@...r.kernel.org,
        netdev@...r.kernel.org, Oleksij Rempel <o.rempel@...gutronix.de>
Subject: Re: [PATCH net-next 2/4] phylib: Add support for 10BASE-T1S link
 modes and PLCA config

On Sun, Dec 04, 2022 at 07:12:03PM +0100, Andrew Lunn wrote:
> On Sun, Dec 04, 2022 at 03:30:52AM +0100, Piergiorgio Beruto wrote:
> > This patch adds the required connection between netlink ethtool and
> > phylib to resolve PLCA get/set config and get status messages.
> > Additionally, it adds the link modes for the IEEE 802.3cg Clause 147
> > 10BASE-T1S Ethernet PHY.
> 
> Please break this patch up.
> 
> >  const char *phy_speed_to_str(int speed)
> >  {
> > -	BUILD_BUG_ON_MSG(__ETHTOOL_LINK_MODE_MASK_NBITS != 99,
> > +	BUILD_BUG_ON_MSG(__ETHTOOL_LINK_MODE_MASK_NBITS != 102,
> >  		"Enum ethtool_link_mode_bit_indices and phylib are out of sync. "
> >  		"If a speed or mode has been added please update phy_speed_to_str "
> >  		"and the PHY settings array.\n");
> 
> > --- a/include/uapi/linux/ethtool.h
> > +++ b/include/uapi/linux/ethtool.h
> > @@ -1741,6 +1741,9 @@ enum ethtool_link_mode_bit_indices {
> >  	ETHTOOL_LINK_MODE_800000baseDR8_2_Full_BIT	 = 96,
> >  	ETHTOOL_LINK_MODE_800000baseSR8_Full_BIT	 = 97,
> >  	ETHTOOL_LINK_MODE_800000baseVR8_Full_BIT	 = 98,
> > +	ETHTOOL_LINK_MODE_10baseT1S_Full_BIT		 = 99,
> > +	ETHTOOL_LINK_MODE_10baseT1S_Half_BIT		 = 100,
> > +	ETHTOOL_LINK_MODE_10baseT1S_P2MP_Half_BIT	 = 101,
> >  
> >  	/* must be last entry */
> >  	__ETHTOOL_LINK_MODE_MASK_NBITS
> > diff --git a/net/ethtool/common.c b/net/ethtool/common.c
> > index 21cfe8557205..c586db0c5e68 100644
> > --- a/net/ethtool/common.c
> > +++ b/net/ethtool/common.c
> > @@ -208,6 +208,9 @@ const char link_mode_names[][ETH_GSTRING_LEN] = {
> >  	__DEFINE_LINK_MODE_NAME(800000, DR8_2, Full),
> >  	__DEFINE_LINK_MODE_NAME(800000, SR8, Full),
> >  	__DEFINE_LINK_MODE_NAME(800000, VR8, Full),
> > +	__DEFINE_LINK_MODE_NAME(10, T1S, Full),
> > +	__DEFINE_LINK_MODE_NAME(10, T1S, Half),
> > +	__DEFINE_LINK_MODE_NAME(10, T1S_P2MP, Half),
> >  };
> >  static_assert(ARRAY_SIZE(link_mode_names) == __ETHTOOL_LINK_MODE_MASK_NBITS);
> >  
> > @@ -366,6 +371,9 @@ const struct link_mode_info link_mode_params[] = {
> >  	__DEFINE_LINK_MODE_PARAMS(800000, DR8_2, Full),
> >  	__DEFINE_LINK_MODE_PARAMS(800000, SR8, Full),
> >  	__DEFINE_LINK_MODE_PARAMS(800000, VR8, Full),
> > +	__DEFINE_LINK_MODE_PARAMS(10, T1S, Full),
> > +	__DEFINE_LINK_MODE_PARAMS(10, T1S, Half),
> > +	__DEFINE_LINK_MODE_PARAMS(10, T1S_P2MP, Half),
> >  };
> >  static_assert(ARRAY_SIZE(link_mode_params) == __ETHTOOL_LINK_MODE_MASK_NBITS);
> 
> This is one logical change, so makes one patch, for example.
> 
> You are aiming for lots of simple, easy to review, well described,
> obviously correct patches.
Alright, will do.

Thanks,
Piergiorgio

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ