Re: Query regarding Phy loopback support
From: Andrew Lunn <andrew@lunn.ch>
Date: 2025-09-16 16:43:25
Also in:
lkml
On Tue, Sep 16, 2025 at 04:48:56PM +0530, Hariprasad Kelam wrote:
We're looking for a standard way to configure PHY loopback on a network interface using common Linux tools like ethtool, ip, or devlink. Currently, ethtool -k eth0 loopback on enables a generic loopback, but it doesn't specify if it's an internal, external, or PHY loopback. Need suggestions to implement this feature in a standard way.
What actually do you mean by PHY loopback? 88e1118R supports two different loopbacks. It can do the loop at the PCS, looping packets from the MAC back to the MAC. Or it can do the loop at the PCS, looping packets from the media back to the media and also deliver them to the MAC. The 88e1510 has a slight different loopback. When used with copper, it can loopback frames from the MAC back to the MAC in the copper PCS. When used with Fibre is can loopback frames from the MAC to the MAC in the fibre PCS. Additionally, it can loop back frames from the MAC in the SERDES layer. And it can loopback frames from the media back out the media. From what a know of the aquantia PHY, it can loopback frames from the MAC at the PCS or the PMA. And frames from the media can be looped back at the PMA or the PCS. I expect other vendors have a similar set of different places they can do loopback, probably with variations. Or do you simply mean as defined in 802.3, c22.2.4.1.2? And c45.2.1.1.4, C45.2.1.1.5, taking into account c45.2.1.7.15 and c45.2.1.12.1? And c45.2.1.18.1, c45.2.1.21.1, c45.2.1.22.1, c45.2.1.231.6, c45.2.1.232.1, c45.2.1.234.5, c45.2.1.235.1, ... Andrew