From mboxrd@z Thu Jan 1 00:00:00 1970 From: Stephen Hemminger Subject: Re: [PATCH v2 10/10] kni: add API to set link status on kernel interface Date: Tue, 11 Sep 2018 14:52:48 -0700 Message-ID: <20180911145248.7512abd1@xeon-e3> References: <20180628224513.18391-1-dg@adax.com> <20180629015508.26599-1-dg@adax.com> <20180629015508.26599-11-dg@adax.com> <20180829085410.4411c07e@xeon-e3> <20180829150014.0ae59128@xeon-e3> <20180829161043.11bb2434@xeon-e3> <20180830150911.6b0e7901@xeon-e3> <20180905135751.74f6c14b@shemminger-XPS-13-9360> Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Cc: Igor Ryzhov , Ferruh Yigit , dev@dpdk.org To: Dan Gora Return-path: Received: from mail-pf1-f195.google.com (mail-pf1-f195.google.com [209.85.210.195]) by dpdk.org (Postfix) with ESMTP id 64AC32BF9 for ; Tue, 11 Sep 2018 23:52:56 +0200 (CEST) Received: by mail-pf1-f195.google.com with SMTP id i26-v6so12864112pfo.12 for ; Tue, 11 Sep 2018 14:52:56 -0700 (PDT) In-Reply-To: List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" On Tue, 11 Sep 2018 18:45:49 -0300 Dan Gora wrote: > Hi All, > > So I implemented the "write to /sys/devices/virtual/net/*/carrier" > method to change the link status, but there is one more minor thing > that I wanted to point out about this approach. The problem is that > you cannot read or write the '/sys/devices/virtual/net/*/carrier' file > while the interface is marked 'down'. This means that link status > changes can only be performed by the DPDK application while the > interface is in the "up" state. With the ioctl method, you can change > the carrier state at pretty much any time. > > Is this a problem? It's not a huge one, I guess, but it is something > else to consider. > > Please let me know what you all think. > > thanks > dan The carrier state has no meaning when device is down, at least for physical devices. Because often the PHY is powered off when the device is marked down.