Message ID | 20250122174252.82730-2-maxime.chevallier@bootlin.com (mailing list archive) |
---|---|
State | RFC |
Delegated to: | Netdev Maintainers |
Headers | show |
Series | net: phy: Introduce a port representation | expand |
On Wed, Jan 22, 2025 at 06:42:46PM +0100, Maxime Chevallier wrote: > When referring to BaseT ethernet, we are most of the time thinking of > BaseT4 ethernet on Cat5/6/7 cables. This is therefore BaseT4, although > BaseT4 is also possible for 100BaseTX. This is even more true now that > we have a special __LINK_MODE_LANES_T1 mode especially for Single Pair > ethernet. > > Mark BaseT as being a 4-lanes mode. This is a problem: 1.4.50 10BASE-T: IEEE 802.3 Physical Layer specification for a 10 Mb/s CSMA/CD local area network over two pairs of twisted-pair telephone wire. (See IEEE Std 802.3, Clause 14.) Then we have the 100BASE-T* family, which can be T1, T2, T4 or TX. T1 is over a single balanced twisted pair. T2 is over two pairs of Cat 3 or better. T4 is over four pairs of Cat3/4/5. The common 100BASE-T* type is TX, which is over two pairs of Cat5. This is sadly what the ethtool 100baseT link modes are used to refer to. We do have a separate link mode for 100baseT1, but not 100baseT4. So, these ethtool modes that are of the form baseT so far are describing generally two pairs, one pair in each direction. (T1 is a single pair that is bidirectional.) It's only once we get to 1000BASE-T (1000baseT) that we get to an ethtool link mode that has four lanes in a bidirectional fashion. So, simply redefining this ends up changing 10baseT and 100baseT from a single lane in each direction to four lanes (and is a "lane" here defined as the total number of pairs used for communication in both directions, or the total number of lanes used in either direction. Hence, I'm not sure this makes sense.
On Wed, Jan 22, 2025 at 06:55:17PM +0000, Russell King (Oracle) wrote: > On Wed, Jan 22, 2025 at 06:42:46PM +0100, Maxime Chevallier wrote: > > When referring to BaseT ethernet, we are most of the time thinking of > > BaseT4 ethernet on Cat5/6/7 cables. This is therefore BaseT4, although > > BaseT4 is also possible for 100BaseTX. This is even more true now that > > we have a special __LINK_MODE_LANES_T1 mode especially for Single Pair > > ethernet. > > > > Mark BaseT as being a 4-lanes mode. > > This is a problem: > > 1.4.50 10BASE-T: IEEE 802.3 Physical Layer specification for a 10 Mb/s > CSMA/CD local area network over two pairs of twisted-pair telephone > wire. (See IEEE Std 802.3, Clause 14.) > > Then we have the 100BASE-T* family, which can be T1, T2, T4 or TX. > T1 is over a single balanced twisted pair. T2 is over two pairs of > Cat 3 or better. T4 is over four pairs of Cat3/4/5. > > The common 100BASE-T* type is TX, which is over two pairs of Cat5. > This is sadly what the ethtool 100baseT link modes are used to refer > to. > > We do have a separate link mode for 100baseT1, but not 100baseT4. > > So, these ethtool modes that are of the form baseT so far are > describing generally two pairs, one pair in each direction. (T1 is > a single pair that is bidirectional.) > > It's only once we get to 1000BASE-T (1000baseT) that we get to an > ethtool link mode that has four lanes in a bidirectional fashion. > > So, simply redefining this ends up changing 10baseT and 100baseT from > a single lane in each direction to four lanes (and is a "lane" here > defined as the total number of pairs used for communication in both > directions, or the total number of lanes used in either direction. > > Hence, I'm not sure this makes sense. Looking at patch 2, I don't see why you need patch 1. It's not really improving the situation. Before the patch, the number of lanes for some BASE-T is wrong. After the patch, the number of lanes for some BASE-T is also wrong - just a different subset. I think you should drop this patch and just have patch 2.
Hello Russell, On Wed, 22 Jan 2025 18:55:17 +0000 "Russell King (Oracle)" <linux@armlinux.org.uk> wrote: > On Wed, Jan 22, 2025 at 06:42:46PM +0100, Maxime Chevallier wrote: > > When referring to BaseT ethernet, we are most of the time thinking of > > BaseT4 ethernet on Cat5/6/7 cables. This is therefore BaseT4, although > > BaseT4 is also possible for 100BaseTX. This is even more true now that > > we have a special __LINK_MODE_LANES_T1 mode especially for Single Pair > > ethernet. > > > > Mark BaseT as being a 4-lanes mode. > > This is a problem: > > 1.4.50 10BASE-T: IEEE 802.3 Physical Layer specification for a 10 Mb/s > CSMA/CD local area network over two pairs of twisted-pair telephone > wire. (See IEEE Std 802.3, Clause 14.) > > Then we have the 100BASE-T* family, which can be T1, T2, T4 or TX. > T1 is over a single balanced twisted pair. T2 is over two pairs of > Cat 3 or better. T4 is over four pairs of Cat3/4/5. > > The common 100BASE-T* type is TX, which is over two pairs of Cat5. > This is sadly what the ethtool 100baseT link modes are used to refer > to. > > We do have a separate link mode for 100baseT1, but not 100baseT4. > > So, these ethtool modes that are of the form baseT so far are > describing generally two pairs, one pair in each direction. (T1 is > a single pair that is bidirectional.) > > It's only once we get to 1000BASE-T (1000baseT) that we get to an > ethtool link mode that has four lanes in a bidirectional fashion. > > So, simply redefining this ends up changing 10baseT and 100baseT from > a single lane in each direction to four lanes (and is a "lane" here > defined as the total number of pairs used for communication in both > directions, or the total number of lanes used in either direction. > > Hence, I'm not sure this makes sense. > I'm fine with your justification, so let's simplify and drop that patch then. That should also avoid the lanes/pairs confusion as well. Thanks for the feedback ! Maxime
diff --git a/net/ethtool/common.c b/net/ethtool/common.c index 2bd77c94f9f1..8452d3216bce 100644 --- a/net/ethtool/common.c +++ b/net/ethtool/common.c @@ -244,7 +244,7 @@ static_assert(ARRAY_SIZE(link_mode_names) == __ETHTOOL_LINK_MODE_MASK_NBITS); #define __LINK_MODE_LANES_LR8_ER8_FR8 8 #define __LINK_MODE_LANES_LRM 1 #define __LINK_MODE_LANES_MLD2 2 -#define __LINK_MODE_LANES_T 1 +#define __LINK_MODE_LANES_T 4 #define __LINK_MODE_LANES_T1 1 #define __LINK_MODE_LANES_X 1 #define __LINK_MODE_LANES_FX 1
When referring to BaseT ethernet, we are most of the time thinking of BaseT4 ethernet on Cat5/6/7 cables. This is therefore BaseT4, although BaseT4 is also possible for 100BaseTX. This is even more true now that we have a special __LINK_MODE_LANES_T1 mode especially for Single Pair ethernet. Mark BaseT as being a 4-lanes mode. Signed-off-by: Maxime Chevallier <maxime.chevallier@bootlin.com> --- RFC V2: No changes net/ethtool/common.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)