netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Andrew Lunn <andrew@lunn.ch>
To: Petr Machata <petrm@mellanox.com>
Cc: "netdev@vger.kernel.org" <netdev@vger.kernel.org>,
	Jiri Pirko <jiri@mellanox.com>,
	Ido Schimmel <idosch@mellanox.com>,
	"davem@davemloft.net" <davem@davemloft.net>,
	Tariq Toukan <tariqt@mellanox.com>,
	"jakub.kicinski@netronome.com" <jakub.kicinski@netronome.com>,
	"stephen@networkplumber.org" <stephen@networkplumber.org>
Subject: Re: [RFC PATCH net-next 1/3] net: rtnetlink: Add link-down reason to RTNL messages
Date: Sat, 16 Mar 2019 03:26:58 +0100	[thread overview]
Message-ID: <20190316022658.GC29548@lunn.ch> (raw)
In-Reply-To: <3a247e91ebe81cdae4bae27ec1631c5015fb943f.1552672441.git.petrm@mellanox.com>

Hi Petr

> +enum rtnl_link_down_reason_major {
> +	RTNL_LDR_OTHER,

Does 'other' make any sense? Seem better to just not report anything
at all, or add a comment that more reasons should be added at the end
to reflect whatever the hardware or software can determine.

> +	RTNL_LDR_NO_CABLE,
> +	RTNL_LDR_UNSUPPORTED_CABLE,
> +	RTNL_LDR_AUTONEG_FAILURE,
> +	RTNL_LDR_NO_LINK_PARTNER,
> +	RTNL_LDR_LINK_TRAINING_FAILURE,
> +	RTNL_LDR_LOGICAL_MISMATCH,
> +	RTNL_LDR_REMOTE_FAULT,
> +	RTNL_LDR_BAD_SIGNAL_INTEGRITY,
> +	RTNL_LDR_CALIBRATION_FAILURE,
> +	RTNL_LDR_POWER_BUDGET_EXCEEDED,
> +};

What about SFP cage empty?, i.e. no SFP, SFP+ module in the cage?  An
SFP can also report LOS. That does not appear to be any of the above.
Or that the core SFP code has been unable to read the EEPROM? We have
people reporting this problem at the moment. We also have that the
SERDES has not yet obtained sync to its peer, which you know from
phylink_mac_change. That probably means the peer is using a different
bit rate.

I think it would be good if you handle the general case errors which
phylib and phylink can report, as well as the proprietary cases your
driver can report. We don't want this to be a Mellanox only API.

	Andrew

  parent reply	other threads:[~2019-03-16  2:27 UTC|newest]

Thread overview: 27+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-03-15 17:56 [RFC PATCH net-next 0/3] RTNL: Add link-down reason reporting Petr Machata
2019-03-15 17:56 ` [RFC PATCH net-next 1/3] net: rtnetlink: Add link-down reason to RTNL messages Petr Machata
2019-03-16  2:26   ` Jakub Kicinski
2019-03-17  0:24     ` Michal Kubecek
2019-03-18 12:34     ` Petr Machata
2019-03-18 12:43       ` Michal Kubecek
2019-03-18 13:12       ` Andrew Lunn
2019-03-16  2:26   ` Andrew Lunn [this message]
2019-03-18 13:15     ` Petr Machata
2019-03-18 13:33       ` Andrew Lunn
2019-03-18 13:47         ` Petr Machata
2019-03-18 14:02       ` Andrew Lunn
2019-03-18 15:52         ` Stephen Hemminger
2019-03-19 10:18           ` Petr Machata
2019-03-19 11:56             ` Michal Kubecek
2019-03-19 15:42             ` Stephen Hemminger
2019-03-19 15:57               ` Petr Machata
2019-03-17 22:38   ` Roopa Prabhu
2019-03-18  0:03     ` Andrew Lunn
2019-03-28 17:59       ` Petr Machata
2019-03-28 19:51         ` Andrew Lunn
2019-04-23 13:41           ` Jiri Pirko
2019-03-18 12:15     ` Petr Machata
2019-03-15 17:56 ` [RFC PATCH net-next 2/3] mlxsw: reg: Add Port Diagnostics Database Register Petr Machata
2019-03-15 17:56 ` [RFC PATCH net-next 3/3] mlxsw: spectrum: Add rtnl_link_ops Petr Machata
2019-03-16  2:06 ` [RFC PATCH net-next 0/3] RTNL: Add link-down reason reporting Andrew Lunn
2019-03-18 12:11   ` Petr Machata

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20190316022658.GC29548@lunn.ch \
    --to=andrew@lunn.ch \
    --cc=davem@davemloft.net \
    --cc=idosch@mellanox.com \
    --cc=jakub.kicinski@netronome.com \
    --cc=jiri@mellanox.com \
    --cc=netdev@vger.kernel.org \
    --cc=petrm@mellanox.com \
    --cc=stephen@networkplumber.org \
    --cc=tariqt@mellanox.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).