Thread (10 messages) flat view 10 messages, 4 authors, 4d ago

RE: Ethtool : PRBS feature

From: Das, Shubham <hidden>
Date: 2026-07-30 17:45:23

Possibly related (same subject, not in this thread)

quoted
How does this deal with lanes or cases where you have multiple PHYs in
parallel such as the DSA setups?
We already have a lane parameter for selecting parallel lanes within a given
block.

Could you elaborate on the DSA/multiple PHYs in parallel case you're referring to?
My understanding is that (netdev, block, lane) should uniquely identify a test
point.
If there are topologies where a single netdev can expose multiple instances of the
same block, then we would likely need an additional instance parameter to
uniquely identify the target block instance.
We have added an instance field to handle this case.  Instance distinguishes
Multiple hardware entities of the same component type within a single netdev.

For a simple NIC: only instance 0 exists (internal PHY)
For NIC + external PHY: instance 0 = internal, instance 1 = external PHY
For NIC + external PHY + retimer: instance 0, 1, 2

+----------------------------------------------------------------------------------------------------------------------------------------+
|Block   Component   Instance   Sublayer   Depth         Name                         Description                                  |
------------------------------------------------------------------------------------------------------------------------------------------+
| 1               MAC               0                RS            0          host-mac                     MAC reconciliation                       |
| 2               PHY                0               PCS           0          host-phy-pcs               Host PHY PCS                                 |
| 3               PHY                0               PMA         0          host-phy-pma             Host PHY SerDes                           |
| 4               PHY                0               PMD         0          host-phy-pmd             Host PHY output                           |
| 5               PHY                1               PCS           0          ext-phy-pcs-host        External PHY host PCS                  |  
| 6               PHY                1               PMA         0          ext-phy-pma-host      External PHY/retimer host PMA |
| 7               PHY                1               PCS           1          ext-phy-pcs-line         External PHY line PCS                   |
| 8               PHY                1               PMA         1          ext-phy-pma-line       External PHY/retimer line PMA  |
| 9          MODULE            0               PMA         0          module-pma-host     Module host-side                          |
| 10        MODULE            0               PMA         1          module-pma-line      Module line-side                           |
+----------------------------------------------------------------------------------------------------------------------------------------+

Block layout is reported via --interface-capabilities. The block-id
from this output is then used as the block parameter in --phy-test
and --set-loopback command.

+        name: instance
+        type: u32
+        doc: |
+          Identifies the hardware entity when multiple instances of
+          the same component exist in the interface. The driver
+          assigns instance numbers sequentially based on position in
+          the physical path. Defaults to 0 when only one instance of
+          a given component exists.
+          For PHY: instance 0 is the internal/host-side PHY,
+          instance 1 is an external PHY further along the path
+          toward the line side.
+          For MAC: instance 0 is the host-facing MAC, instance 1 is
+          a secondary MAC further along the data path (e.g., behind
+          an embedded switch).
+      -
+        name: name
+        type: string
+        doc: |
+          Driver-chosen label for this block. Naming convention:
+          <instance>-<component>-<sublayer>[-<depth>]
+          where depth qualifier (host/line) is included when multiple
+          depths exist for the same (component, instance, sublayer).
+          Examples: "host-mac", "host-phy-pcs", "host-phy-pma",
+          "host-phy-pmd", "ext-phy-pma-host", "ext-phy-pma-line",
+          "retimer-pma", "module-pma-host", "module-pma-line".

root@setup:~# ./ethtool --interface-capabilities eth15
Interface capabilities for eth15:

  Block 3: host-pma
    component: PHY
    instance: 0
    sublayer: PMA
    depth: 0
    lanes: 4
    Supported loopback: local remote
    Supported TX patterns: prbs7, prbs9, prbs11, prbs13, prbs15, prbs23, prbs31, ssprq
    Supported RX patterns: prbs7, prbs9, prbs11, prbs13, prbs15, prbs23, prbs31
    Supported tests: bert error-inject

Single lane on host PHY (instance=0, block 3):
          ethtool --phy-test eth0 block 3 lane 0 tx-pattern prbs31

External PHY or retimer (instance=1, e.g. block 6):
          ethtool --phy-test eth0 block 6 lane 0 tx-pattern prbs31
          ethtool --show-phy-test eth0 block 6 lane 0

- Shubham 
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help