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=-3.8 required=3.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS autolearn=no 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 29481C43461 for ; Wed, 9 Sep 2020 22:39:46 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id EADFA20C09 for ; Wed, 9 Sep 2020 22:39:45 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726489AbgIIWjp (ORCPT ); Wed, 9 Sep 2020 18:39:45 -0400 Received: from vps0.lunn.ch ([185.16.172.187]:53618 "EHLO vps0.lunn.ch" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726642AbgIIWjo (ORCPT ); Wed, 9 Sep 2020 18:39:44 -0400 Received: from andrew by vps0.lunn.ch with local (Exim 4.94) (envelope-from ) id 1kG8kX-00DzJD-0p; Thu, 10 Sep 2020 00:39:33 +0200 Date: Thu, 10 Sep 2020 00:39:33 +0200 From: Andrew Lunn To: Marek Behun Cc: netdev@vger.kernel.org, linux-leds@vger.kernel.org, Pavel Machek , Dan Murphy , =?utf-8?Q?Ond=C5=99ej?= Jirman , Russell King , linux-kernel@vger.kernel.org, Matthias Schiffer , "David S. Miller" Subject: Re: [PATCH net-next + leds v2 0/7] PLEASE REVIEW: Add support for LEDs on Marvell PHYs Message-ID: <20200909223933.GM3290129@lunn.ch> References: <20200909162552.11032-1-marek.behun@nic.cz> <20200909214259.GL3290129@lunn.ch> <20200910001152.34de9a2d@nic.cz> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20200910001152.34de9a2d@nic.cz> Sender: linux-leds-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-leds@vger.kernel.org > They are in /sys/class/net/eth0/phydev/leds by default, because they > are children of the PHY device and are of `leds` class, and the PHY > subsystem creates a symlink `phydev` when PHY is attached to the > interface. > They are in /sys/class/leds/ as symlinks, because AFAIK everything in > /sys/class// is a symlink... > > > Have you played with network namespaces? What happens with > > > > ip netns add ns1 > > > > ip link set eth0 netns ns1 > > > > Andrew > > If you move eth0 to other network namespace, naturally the > /sys/class/net/eth0 symlink will disappear, as will the directory it > pointed to. > > The symlink phydev does will disappear from /sys/class/net/eth0/ > directory after eth0 is moved to ns1, and is lost. It does not return > even if eth0 is moved back to root namespace. Yes, i just played with this. I would say that is an existing bug. The link would still work in the namespace, since the mdio_bus is not net namespace aware and remains accessible from all namespaces. Andrew