Documentation/networking/phy-port.rst
Source file repositories/reference/linux-study-clean/Documentation/networking/phy-port.rst
File Facts
- System
- Linux kernel
- Corpus path
Documentation/networking/phy-port.rst- Extension
.rst- Size
- 3799 bytes
- Lines
- 112
- Domain
- Support Tooling And Documentation
- Bucket
- Documentation
- Inferred role
- Support Tooling And Documentation: documentation
- Status
- atlas-only
Why This File Exists
Repository support layer: documentation, build tooling, samples, user-space helper tools, generated initramfs support, licenses, and validation utilities.
- Repository support layer: documentation, build tooling, samples, user-space helper tools, generated initramfs support, licenses, and validation utilities.
- Defines or uses C structs; map object ownership, embedded links, reference counts, and lock ownership.
Dependency Surface
- No C-style include directives detected by the generator.
Detected Declarations
- No top-level syscall, struct, function, initcall, or export declaration detected by the generator.
Annotated Snippet
.. SPDX-License-Identifier: GPL-2.0
.. _phy_port:
=================
Ethernet ports
=================
This document is a basic description of the phy_port infrastructure,
introduced to represent physical interfaces of Ethernet devices.
Without phy_port, we already have quite a lot of information about what the
media-facing interface of a NIC can do and looks like, through the
:c:type:`struct ethtool_link_ksettings <ethtool_link_ksettings>` attributes,
which includes :
- What the NIC can do through the :c:member:`supported` field
- What the Link Partner advertises through :c:member:`lp_advertising`
- Which features we're advertising through :c:member:`advertising`
We also have info about the number of pairs and the PORT type. These settings
are built by aggregating together information reported by various devices that
are sitting on the link :
- The NIC itself, through the :c:member:`get_link_ksettings` callback
- Precise information from the MAC and PCS by using phylink in the MAC driver
- Information reported by the PHY device
- Information reported by an SFP module (which can itself include a PHY)
This model however starts showing its limitations when we consider devices that
have more than one media interface. In such a case, only information about the
actively used interface is reported, and it's not possible to know what the
other interfaces can do. In fact, we have very little information about whether
or not there are any other media interfaces.
The goal of the phy_port representation is to provide a way of representing a
physical interface of a NIC, regardless of what is driving the port (NIC through
a firmware, SFP module, Ethernet PHY).
Multi-port interfaces examples
==============================
Several cases of multi-interface NICs have been observed so far :
Internal MII Mux::
+------------------+
| SoC |
| +-----+ | +-----+
| +-----+ | |-------------| PHY |
| | MAC |--| Mux | | +-----+ +-----+
| +-----+ | |-----| SFP |
| +-----+ | +-----+
+------------------+
Internal Mux with internal PHY::
+------------------------+
| SoC |
| +-----+ +-----+
| +-----+ | |-| PHY |
| | MAC |--| Mux | +-----+ +-----+
| +-----+ | |-----------| SFP |
| +-----+ | +-----+
+------------------------+
External Mux::
+---------+
| SoC | +-----+ +-----+
| | | |--| PHY |
Annotation
- Atlas domain: Support Tooling And Documentation / Documentation.
- Implementation status: atlas-only.
Implementation Notes
- This generated page is the file-by-file coverage layer; curated subsystem chapters should link here when they synthesize a multi-file control flow.
- Core OS pages should be promoted from atlas-only to deep-reviewed when they explain data structures, invariants, locking, lifecycle, and C implementation snippets.
- Driver-family pages are intentionally pattern-oriented unless they are part of the selected PCIe/NVMe representative device path.