Received: by 2002:a05:6a10:22f:0:0:0:0 with SMTP id 15csp2311682pxk; Mon, 14 Sep 2020 09:54:41 -0700 (PDT) X-Google-Smtp-Source: ABdhPJw6qNNj3ilXMJ+Tc+xFZjp225cJZKsSMwW749JoZtXdUdsGPBpjsW5V0GuNqwSq9kR2poMf X-Received: by 2002:a17:907:685:: with SMTP id wn5mr7890170ejb.285.1600102480892; Mon, 14 Sep 2020 09:54:40 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1600102480; cv=none; d=google.com; s=arc-20160816; b=kvFyY+Z+QnfYLZbhnhGezXwcsSjCHQg29JEmIU+pri2nCvFkdcQDcwcKvFRi1lWrez MgqLPfjZz0gEVsJLVqOWRV1gRe/AaISFG4pP6WWaOjRp/7m+O7qnT+IWlk9/whpbyTu5 21GL+5J7Hlc8fc5pYe3w0X0gyuGo3ln3QV2NfgGcKidS1D+HcGU/yohSLKwIgD14KOjD ydxIKQzKJwuBsk1TSFcLwUazi5vKB/nGtm4DHaTJ6DtgMgPIo4b+Vi9mWEx7pPt1IDlJ CcZIMUYa4uLHgFDU8NGpbHUE7qkgJP55+FDytuXr89suN6Tnax5NcW3P17vUsyHNf1Ne 2A/Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :references:in-reply-to:message-id:subject:cc:to:from:date :dkim-signature; bh=UzKseRPYTS7FtbsvuOjcYvKgbnxuTsxIT1FX/56ykqU=; b=ZNtLLEjcMI7m+o/hsYgwWX93M3ctys8mpHEgA21yq5VOIf00mlIIHTrleGqiJD+fde 61JLYBLubO2r1wm2/CtcmN3KBrv0YIiG5/xc34wC4KTjX57jELI+MmhdU6Ds2cUlUdAW 6ucuOZ28QEvSNkOhQbP49MOyRwUBWD2Q/4dyFwGn/olqOQSTgDxy8r3FKYQ9IodJZtdB QdFXulgk3+2rM+bz6YB3C3cYYABCkrZKZCwiDPSADABNjTwPs3mhZ7r5B9NcA2Is8mj0 Bm2Wet2Yg+gsHB+uMUWOB2vSMA1KMbrkArbRbORbu9SwmTGICLptfhI9ihV06vxi80kl kwbQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=GRiu9srC; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id d20si5993616edq.603.2020.09.14.09.54.18; Mon, 14 Sep 2020 09:54:40 -0700 (PDT) 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; dkim=pass header.i=@kernel.org header.s=default header.b=GRiu9srC; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726356AbgINQvQ (ORCPT + 99 others); Mon, 14 Sep 2020 12:51:16 -0400 Received: from mail.kernel.org ([198.145.29.99]:53662 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726349AbgINQuV (ORCPT ); Mon, 14 Sep 2020 12:50:21 -0400 Received: from kicinski-fedora-pc1c0hjn.dhcp.thefacebook.com (unknown [163.114.132.5]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id B3F0D20829; Mon, 14 Sep 2020 16:50:20 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1600102221; bh=fjDVxTT4iFv5fMkMhLJSlhBi4P9qMYMhYAv6LFdtSMs=; h=Date:From:To:Cc:Subject:In-Reply-To:References:From; b=GRiu9srCw2nY3msEykEVdDAyg8cDJ6cMq0JmZgQgyoNESbX9zG0L0POfmo77QK/ra OAw7ypT9ACL+QIZLoVu2FUDc9o87C7oHNPEmjYqGcxkls9xkrtvSCuMLw+G5wLSW15 G5tRpPKd/7AQK3ei2W/csQSFAuvdNUFKvdgw6jRo= Date: Mon, 14 Sep 2020 09:50:18 -0700 From: Jakub Kicinski To: Omer Shpigelman Cc: Oded Gabbay , "Linux-Kernel@Vger. Kernel. Org" , "netdev@vger.kernel.org" , SW_Drivers , Greg Kroah-Hartman , "David S. Miller" Subject: Re: [PATCH 12/15] habanalabs/gaudi: add debugfs entries for the NIC Message-ID: <20200914095018.21808fae@kicinski-fedora-pc1c0hjn.dhcp.thefacebook.com> In-Reply-To: References: <20200910161126.30948-1-oded.gabbay@gmail.com> <20200910161126.30948-13-oded.gabbay@gmail.com> <20200910130138.6d595527@kicinski-fedora-pc1c0hjn.dhcp.thefacebook.com> <20200910131629.65b3e02c@kicinski-fedora-pc1c0hjn.dhcp.thefacebook.com> <20200910133058.0fe0f5e3@kicinski-fedora-pc1c0hjn.dhcp.thefacebook.com> MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, 14 Sep 2020 13:48:14 +0000 Omer Shpigelman wrote: > On Thu, Sep 10, 2020 at 11:31 PM Jakub Kicinski wrote: > > On Thu, 10 Sep 2020 23:17:59 +0300 Oded Gabbay wrote: > > > > Doesn't seem like this one shows any more information than can be > > > > queried with ethtool, right? > > > correct, it just displays it in a format that is much more readable > > > > You can cat /sys/class/net/$ifc/carrier if you want 0/1. > > > > > > > nic_mac_loopback > > > > > is to set a port to loopback mode and out of it. It's not really > > > > > configuration but rather a mode change. > > > > > > > > What is this loopback for? Testing? > > > > > > Correct. > > > > Loopback test is commonly implemented via ethtool -t > > This debugfs entry is only to set the port to loopback mode, not running a loopback test. > Hence IMO adding a private flag is more suitable here and please correct me if I'm wrong. > But either way, doing that from ethtool instead of debugfs is not a good practice in our case. > Due to HW limitations, when we switch a port to/from loopback mode, we need to reset the device. > Since ethtool works on specific interface rather than an entire device, we'll need to reset the device 10 times in order to switch the entire device to loopback mode. > Moreover, running this command for one interface affects other interfaces which is not desirable when using ethtool AFAIK. > Is there any other acceptable debugfs-like mechanism for that? What's the use for a networking device which only communicates with itself, other than testing?