From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-1.1 required=3.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_PASS, URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id C8342C43381 for ; Mon, 18 Mar 2019 13:47:40 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 8790F2085A for ; Mon, 18 Mar 2019 13:47:40 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (1024-bit key) header.d=Mellanox.com header.i=@Mellanox.com header.b="w0CRTV6p" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726765AbfCRNrj (ORCPT ); Mon, 18 Mar 2019 09:47:39 -0400 Received: from mail-eopbgr40067.outbound.protection.outlook.com ([40.107.4.67]:4878 "EHLO EUR03-DB5-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1726466AbfCRNri (ORCPT ); Mon, 18 Mar 2019 09:47:38 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=Mellanox.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=4YDKG8SGgLcEPLik/N4cNwnhU5Wijhe09PK2uPqM6VQ=; b=w0CRTV6pOhTm0vfE5X7zqEZZt8w2/8Wcd73vRPjcebMa3MfkmwYrf524E7jNd9HZngkUCCVdq+PXvKszaVdCWWjLoOuneAOljFnGbOxeqS5TsvjALhPoXhw22+IO054qRCjJMuZOGXlb99xYsP7zWD3eG02VVwZtj8xuORRxpxE= Received: from AM6PR05MB6133.eurprd05.prod.outlook.com (20.179.3.144) by AM6PR05MB4903.eurprd05.prod.outlook.com (20.177.35.15) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.1709.14; Mon, 18 Mar 2019 13:47:34 +0000 Received: from AM6PR05MB6133.eurprd05.prod.outlook.com ([fe80::8c6:b0f3:d983:2fea]) by AM6PR05MB6133.eurprd05.prod.outlook.com ([fe80::8c6:b0f3:d983:2fea%2]) with mapi id 15.20.1709.015; Mon, 18 Mar 2019 13:47:34 +0000 From: Petr Machata To: Andrew Lunn CC: "netdev@vger.kernel.org" , Jiri Pirko , Ido Schimmel , "davem@davemloft.net" , Tariq Toukan , "jakub.kicinski@netronome.com" , "stephen@networkplumber.org" Subject: Re: [RFC PATCH net-next 1/3] net: rtnetlink: Add link-down reason to RTNL messages Thread-Topic: [RFC PATCH net-next 1/3] net: rtnetlink: Add link-down reason to RTNL messages Thread-Index: AQHU21hddEVxaeti1Ey0mD5+skDyyqYNiMQAgAPZ2gCAAAUCgIAAA+6A Date: Mon, 18 Mar 2019 13:47:34 +0000 Message-ID: <87wokwguq8.fsf@mellanox.com> References: <3a247e91ebe81cdae4bae27ec1631c5015fb943f.1552672441.git.petrm@mellanox.com> <20190316022658.GC29548@lunn.ch> <87zhpsgw7j.fsf@mellanox.com> <20190318133323.GG30224@lunn.ch> In-Reply-To: <20190318133323.GG30224@lunn.ch> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-clientproxiedby: AM6PR0202CA0053.eurprd02.prod.outlook.com (2603:10a6:20b:3a::30) To AM6PR05MB6133.eurprd05.prod.outlook.com (2603:10a6:20b:af::16) authentication-results: spf=none (sender IP is ) smtp.mailfrom=petrm@mellanox.com; x-ms-exchange-messagesentrepresentingtype: 1 x-originating-ip: [78.45.160.211] x-ms-publictraffictype: Email x-ms-office365-filtering-correlation-id: 60d5e3f6-9cd8-4abb-675f-08d6aba8461d x-ms-office365-filtering-ht: Tenant x-microsoft-antispam: BCL:0;PCL:0;RULEID:(2390118)(7020095)(4652040)(8989299)(5600127)(711020)(4605104)(4618075)(4534185)(4627221)(201703031133081)(201702281549075)(8990200)(2017052603328)(7153060)(7193020);SRVR:AM6PR05MB4903; x-ms-traffictypediagnostic: AM6PR05MB4903: x-microsoft-antispam-prvs: x-forefront-prvs: 098076C36C x-forefront-antispam-report: SFV:NSPM;SFS:(10009020)(396003)(376002)(39860400002)(366004)(136003)(346002)(189003)(199004)(71190400001)(71200400001)(4326008)(66066001)(93886005)(53936002)(81156014)(305945005)(54906003)(186003)(26005)(8676002)(5660300002)(2906002)(6916009)(6512007)(102836004)(316002)(81166006)(99286004)(14444005)(76176011)(105586002)(97736004)(52116002)(486006)(6436002)(6486002)(6506007)(6246003)(68736007)(106356001)(3846002)(7736002)(256004)(386003)(14454004)(36756003)(25786009)(11346002)(478600001)(86362001)(8936002)(229853002)(476003)(2616005)(446003)(6116002);DIR:OUT;SFP:1101;SCL:1;SRVR:AM6PR05MB4903;H:AM6PR05MB6133.eurprd05.prod.outlook.com;FPR:;SPF:None;LANG:en;PTR:InfoNoRecords;MX:1;A:1; received-spf: None (protection.outlook.com: mellanox.com does not designate permitted sender hosts) x-ms-exchange-senderadcheck: 1 x-microsoft-antispam-message-info: LKGGUx+SRV1mK6efN3tkQkfkxt+87c4mQTwW2AP3P/ftEJhGU+gOn+GzyJEf/Ci4MFXVFNE8FE7N1YK479vQyhbUp/ITtP6J28HLZMKKwQfXhImSzPUsx9eCK6jI2CxuQppA25czZXVNLiWGEMgVIPMrLAq5eXmcWGeiZNvHcWqFD9vBpxUHRJewrcMSn4Z7p9j02CRXr+W3SigRykOWmueQZKs3sAUJwfbSuZGAv1OKINfRlNtyrYnAFl0von6zOhcOw3Rbu7G/pmh7qNgq0zG2apywIaBRi+rBYnoa0Jd3QYTZ1025LKDe5Sh/MD833RN/h9JYOgJ36tiGCo8z1JJrOXQ+mYtoRyM8/0F22tlqNx1nKVz0Ai/kCNDp0lvOYWN4/ryVnO+AoFSq4Nl3aDcFGwKXbB8JZJmYQfmJeS8= Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-OriginatorOrg: Mellanox.com X-MS-Exchange-CrossTenant-Network-Message-Id: 60d5e3f6-9cd8-4abb-675f-08d6aba8461d X-MS-Exchange-CrossTenant-originalarrivaltime: 18 Mar 2019 13:47:34.2894 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: a652971c-7d2e-4d9b-a6a4-d149256f461b X-MS-Exchange-CrossTenant-mailboxtype: HOSTED X-MS-Exchange-Transport-CrossTenantHeadersStamped: AM6PR05MB4903 Sender: netdev-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org Andrew Lunn writes: > On Mon, Mar 18, 2019 at 01:15:41PM +0000, Petr Machata wrote: >>=20 >> Andrew Lunn writes: >>=20 >> >> +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. >>=20 >> You still have the minor code to give you some information. >>=20 >> >> + 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 >>=20 >> No cable? Maybe the name needs to change... > > An SFP module, and the cable plugged into it via LC connectors, are > physically different things. And you can also have an SFP with an RJ45 > for 1G copper. I know at higher speeds they can be inseparable, but > this needs to be a generic API and also work with them being two > separate things. Understood. >>=20 >> > 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 >>=20 >> My assumption was that cable with unreadable EEPROM is simply a bad >> cable. Does the admin actually care which particular part of the cable >> is at fault? > > Yes. I throw away the SFP module, because its EEPROM is broke, but > don't need to replace the 1KM of fibre cable, or 100m of Cat 6a copper > cable. Classic example would be fibre to the home. OK, gotcha.