Received: by 2002:a05:6a10:af89:0:0:0:0 with SMTP id iu9csp2646514pxb; Mon, 31 Jan 2022 00:46:09 -0800 (PST) X-Google-Smtp-Source: ABdhPJyFYX2PXWDFHjXgmAJlmc//12noqhf12Xe0iPO2VAwcpxcKjWY8eOBGEX0YWSMSYzyYd7ks X-Received: by 2002:a05:6402:440c:: with SMTP id y12mr19538082eda.75.1643618769443; Mon, 31 Jan 2022 00:46:09 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1643618769; cv=none; d=google.com; s=arc-20160816; b=ZaEL0zlWkVe5k2lawFuyG41e6xCUMm4CHYhAz8EEAJ1S4QLmc/RiN0kAGkOWdU03da 6Vx3acz8ATNAIQgZoWd+oMTzV9ACkSzd4IHO1/j4OIZb+z2zp4Enz407w1P+zw/xZ74b 0DMJun3XRYclV34yBV0uabF/WeugxAH0A1YZWUgOdAh4LPOaQGLKeWKjffd1Ihkx1guW VSeHwqbsLFD48Wmnqc/W1gPel9MtdsGAeZllJ2CQWmRW6jqbiee1olOAnJwUgsPBZtSK +SAdGh/ViyUkPUEuVT6nWMy6lhxntbrch3bIw9ic38Kb3Ep/OtdqgRoRj90w0wH17EZh iUug== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date; bh=T3GwLutikjaVmRDMl1eLk7nnKbncY+RCrO3oqiBAcq0=; b=rD0tUSdc3IRG2iDef3AdhzCMey87aGKo/JZ6k8XAHyRNWhRVyvEdBIdmYJZ2wBATJL RzPtS3ifokRq1EkCc7YLwYTPuC3cr5Xu+6uXQTu923TQoUsFgIC2DyxE6b+5+TBSq+S4 wYJQx5Mkfmz12UtE5S6wplX0E5tq3TLTF1uLH2LDNAjSwSDDLOnwW8pTJVIkU/eB5Wfi xbEDEu4cfFVtIZ6vH4RYbg/nKneZWtNY7kGMg6q7HxBfL5Uj5fUj+yVsba2Piytzu0eK FFmLDs3SJ8oyVy/dM0n25s/U0Qgbj5rbUvrBAbSYh61eH+PGaPu5ai/kn5JglrYa+i/K dRJg== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id gb24si8043767ejc.441.2022.01.31.00.45.45; Mon, 31 Jan 2022 00:46:09 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S235658AbiA1L1R (ORCPT + 99 others); Fri, 28 Jan 2022 06:27:17 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:56468 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235607AbiA1L1Q (ORCPT ); Fri, 28 Jan 2022 06:27:16 -0500 Received: from metis.ext.pengutronix.de (metis.ext.pengutronix.de [IPv6:2001:67c:670:201:290:27ff:fe1d:cc33]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 879D2C061714 for ; Fri, 28 Jan 2022 03:27:16 -0800 (PST) Received: from dude.hi.pengutronix.de ([2001:67c:670:100:1d::7]) by metis.ext.pengutronix.de with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1nDPPL-0003CI-EI; Fri, 28 Jan 2022 12:27:11 +0100 Received: from ore by dude.hi.pengutronix.de with local (Exim 4.94.2) (envelope-from ) id 1nDPPG-00CeA2-HH; Fri, 28 Jan 2022 12:27:06 +0100 Date: Fri, 28 Jan 2022 12:27:06 +0100 From: Oleksij Rempel To: Alan Stern Cc: Greg KH , Oliver Neukum , "David S. Miller" , Jakub Kicinski , kernel@pengutronix.de, linux-kernel@vger.kernel.org, linux-usb@vger.kernel.org, netdev@vger.kernel.org Subject: Re: [PATCH net-next v1 1/1] usbnet: add devlink support Message-ID: References: <20220127110742.922752-1-o.rempel@pengutronix.de> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: X-Sent-From: Pengutronix Hildesheim X-URL: http://www.pengutronix.de/ X-IRC: #ptxdist @freenode X-Accept-Language: de,en X-Accept-Content-Type: text/plain X-Uptime: 12:12:48 up 92 days, 17:40, 116 users, load average: 0.32, 1.33, 6.79 X-SA-Exim-Connect-IP: 2001:67c:670:100:1d::7 X-SA-Exim-Mail-From: ore@pengutronix.de X-SA-Exim-Scanned: No (on metis.ext.pengutronix.de); SAEximRunCond expanded to false X-PTX-Original-Recipient: linux-kernel@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, Jan 27, 2022 at 12:00:44PM -0500, Alan Stern wrote: > On Thu, Jan 27, 2022 at 12:13:53PM +0100, Greg KH wrote: > > On Thu, Jan 27, 2022 at 12:07:42PM +0100, Oleksij Rempel wrote: > > > The weakest link of usbnet devices is the USB cable. > > > > The weakest link of any USB device is the cable, why is this somehow > > special to usbnet devices? > > > > > Currently there is > > > no way to automatically detect cable related issues except of analyzing > > > kernel log, which would differ depending on the USB host controller. > > > > > > The Ethernet packet counter could potentially show evidence of some USB > > > related issues, but can be Ethernet related problem as well. > > > > > > To provide generic way to detect USB issues or HW issues on different > > > levels we need to make use of devlink. > > > > Please make this generic to all USB devices, usbnet is not special here > > at all. > > Even more basic question: How is the kernel supposed to tell the > difference between a USB issue and a HW issue? That is, by what > criterion do you decide which category a particular issue falls under? In case of networking device, from user space perspective, we have a communication issue with some external device over the Ethernet. So, depending on the health state of following chain: cpu->hcd->USB cable->ethernet_controller->ethernet_cable-<... We need to decide what to do, and what can be done automatically by device itself, for example Mars rover :) The user space should get as much information as possible what's going on in the system, to decide the proper measures to fix or mitigate the problem. System designers usually (hopefully) find out during testing what URB status and IP uplink status for that hardware means and how to fix that. Regards, Oleksij & Marc -- Pengutronix e.K. | | Steuerwalder Str. 21 | http://www.pengutronix.de/ | 31137 Hildesheim, Germany | Phone: +49-5121-206917-0 | Amtsgericht Hildesheim, HRA 2686 | Fax: +49-5121-206917-5555 |