diff mbox series

[net-next,v2,2/3] net: ethtool: Add impedance mismatch result code to cable test

Message ID 20240327162918.2426792-2-paweldembicki@gmail.com (mailing list archive)
State Superseded
Delegated to: Netdev Maintainers
Headers show
Series [net-next,v2,1/3] net: phy: marvell: add basic support of 88E308X/88E609X family | expand

Checks

Context Check Description
netdev/series_format warning Series does not have a cover letter
netdev/tree_selection success Clearly marked for net-next
netdev/ynl success Generated files up to date; no warnings/errors; no diff in generated;
netdev/fixes_present success Fixes tag not required for -next series
netdev/header_inline success No static functions without inline keyword in header files
netdev/build_32bit success Errors and warnings before: 950 this patch: 950
netdev/build_tools success Errors and warnings before: 0 this patch: 0
netdev/cc_maintainers success CCed 3 of 3 maintainers
netdev/build_clang success Errors and warnings before: 959 this patch: 959
netdev/verify_signedoff success Signed-off-by tag matches author and committer
netdev/deprecated_api success None detected
netdev/check_selftest success No net selftest shell script
netdev/verify_fixes success No Fixes tag
netdev/build_allmodconfig_warn success Errors and warnings before: 962 this patch: 962
netdev/checkpatch success total: 0 errors, 0 warnings, 0 checks, 7 lines checked
netdev/build_clang_rust success No Rust files in patch. Skipping build
netdev/kdoc success Errors and warnings before: 0 this patch: 0
netdev/source_inline success Was 0 now: 0
netdev/contest success net-next-2024-03-29--06-00 (tests: 951)

Commit Message

Pawel Dembicki March 27, 2024, 4:29 p.m. UTC
Some PHYs can recognize during a cable test if the impedance in the cable
is okay.

This commit introduces a new result code:
ETHTOOL_A_CABLE_RESULT_CODE_IMPEDANCE_MISMATCH
which represents the results of a cable test indicating abnormal impedance.

Signed-off-by: Pawel Dembicki <paweldembicki@gmail.com>
---
v2:
  - introduce patch

 include/uapi/linux/ethtool_netlink.h | 1 +
 1 file changed, 1 insertion(+)

Comments

Jakub Kicinski March 29, 2024, 2:02 a.m. UTC | #1
On Wed, 27 Mar 2024 17:29:13 +0100 Pawel Dembicki wrote:
> This commit introduces a new result code:
> ETHTOOL_A_CABLE_RESULT_CODE_IMPEDANCE_MISMATCH
> which represents the results of a cable test indicating abnormal impedance.

I'm not a cable expert but going purely by the language
abnormal != mismatch. Mismatch indicates there are two
values we are comparing.
Pawel Dembicki March 29, 2024, 9:31 a.m. UTC | #2
pt., 29 mar 2024 o 03:02 Jakub Kicinski <kuba@kernel.org> napisał(a):
>
> On Wed, 27 Mar 2024 17:29:13 +0100 Pawel Dembicki wrote:
> > This commit introduces a new result code:
> > ETHTOOL_A_CABLE_RESULT_CODE_IMPEDANCE_MISMATCH
> > which represents the results of a cable test indicating abnormal impedance.
>
> I'm not a cable expert but going purely by the language
> abnormal != mismatch. Mismatch indicates there are two
> values we are comparing.

Impedance mismatch can be detected because some parts of the cable may
have different (abnormal) impedance, causing reflections at those
points. Ethernet cables should have a characteristic impedance of 100
Ohms, so any mismatch from this value is considered abnormal. I can
provide a rephrased version if the commit description was not detailed
enough.
Jakub Kicinski March 29, 2024, 3:10 p.m. UTC | #3
On Fri, 29 Mar 2024 10:31:10 +0100 Paweł Dembicki wrote:
> > I'm not a cable expert but going purely by the language
> > abnormal != mismatch. Mismatch indicates there are two
> > values we are comparing.  
> 
> Impedance mismatch can be detected because some parts of the cable may
> have different (abnormal) impedance, causing reflections at those
> points. Ethernet cables should have a characteristic impedance of 100
> Ohms, so any mismatch from this value is considered abnormal.

I see, makes sense.

> I can provide a rephrased version if the commit description was not
> detailed enough.

That'd be great. Or maybe even better a short comment above the enum
entry?
diff mbox series

Patch

diff --git a/include/uapi/linux/ethtool_netlink.h b/include/uapi/linux/ethtool_netlink.h
index 3f89074aa06c..ecc020bd47d1 100644
--- a/include/uapi/linux/ethtool_netlink.h
+++ b/include/uapi/linux/ethtool_netlink.h
@@ -515,6 +515,7 @@  enum {
 	ETHTOOL_A_CABLE_RESULT_CODE_OPEN,
 	ETHTOOL_A_CABLE_RESULT_CODE_SAME_SHORT,
 	ETHTOOL_A_CABLE_RESULT_CODE_CROSS_SHORT,
+	ETHTOOL_A_CABLE_RESULT_CODE_IMPEDANCE_MISMATCH,
 };
 
 enum {