From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-wr1-f66.google.com (mail-wr1-f66.google.com [209.85.221.66]) by dpdk.org (Postfix) with ESMTP id 62B515F4D for ; Tue, 4 Sep 2018 02:48:03 +0200 (CEST) Received: by mail-wr1-f66.google.com with SMTP id 20-v6so2073249wrb.12 for ; Mon, 03 Sep 2018 17:48:03 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:sender:in-reply-to:references:from:date:message-id :subject:to:cc; bh=l2lsMLqUjls9xNo0j2d9azMHBpwBT52NP6D7BBaUSpA=; b=F/l1IJ5P0X1XFjb0MiV+W8/Ou0T8LW/TgjvYOExEqxW/AFcR3FCaHM023j3L1fDW6Z wwMOd0X+XGqF/ZUzaq+nRQAnV14EMKEIhYapjGjMRB8MYkt4QG+PPHU5A19ngjfc83Xv pcBLr2QEepQhE4CzfqjXy3ugvAKKcQljGHHOayyBK+OMcqEVmpEt3+GBteBPCU+JgnJY K/OwwjOAHhHVK3+vbIseYdjh24Q4IuAqmEw2FZCzipQEJ+n+aid5qVjHl4ooSF7/OW/2 7kN5+JI7Lo47BmIveUCFTwTWA4sZhrPev8ZylwV+k/qGtmg50XBFhWQMI5GfPH12TRbA ZR/A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:sender:in-reply-to:references:from :date:message-id:subject:to:cc; bh=l2lsMLqUjls9xNo0j2d9azMHBpwBT52NP6D7BBaUSpA=; b=qaU2ok6Z743u3lZK4fIWSnmCDEcW4J6YJwUAVKz3ebvis5oDYEEgK4Lqnve+ifQ/KX IAwiv9HGVgDXtfwIxJESKu7liE47SUejHZjVbADoBGArTjYPzQZ5le3KJ6jgw+L1yTcX wNoOHx3WmpNp0luLhE4TOFBtEYMUSzn/aQJcGTI/EL1HEvROc9qLyAK3W317Ng7jyzzV lyZqZKZ4eEeo5nNMuLO/UalAmk7qC5vDDljrCv4ZXsAN2/KsmLqgn6Z3ICKFLgdUoivl IGy1VtObtVeP6uIbw0Y4UkfPd1ehVinqpzmh9I2ewrS40wI/wcZwWQc4SNKpE99lpiu5 t3FQ== X-Gm-Message-State: APzg51B2yJeuAip26q++2yPiC+UzAu3cfQ/ScEpWc+g1s6qeuLnEPfw0 7eperDv00z83kAAl/V3eDitrh/ePdJ8Q7UnOlDM= X-Google-Smtp-Source: ANB0VdaRr1EP7qVJL0wFITe7aBwF+FskrENoOJlpXS/BSFk6z22mkLyy74Ka7d6hVQqiPAHp2RJYj1WrSK1D5T9XHrU= X-Received: by 2002:adf:e792:: with SMTP id n18-v6mr9467862wrm.136.1536022082973; Mon, 03 Sep 2018 17:48:02 -0700 (PDT) MIME-Version: 1.0 Sender: dan.gora@gmail.com Received: by 2002:adf:fbc1:0:0:0:0:0 with HTTP; Mon, 3 Sep 2018 17:47:22 -0700 (PDT) In-Reply-To: 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> From: Dan Gora Date: Mon, 3 Sep 2018 21:47:22 -0300 X-Google-Sender-Auth: _oAfRN-cBRRxF28blLi5sjGixwA Message-ID: To: Stephen Hemminger Cc: Igor Ryzhov , Ferruh Yigit , dev@dpdk.org Content-Type: text/plain; charset="UTF-8" Subject: Re: [dpdk-dev] [PATCH v2 10/10] kni: add API to set link status on kernel interface X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 04 Sep 2018 00:48:03 -0000 Hi All, One other problem with using the sysfs method to change the link state rather than this ioctl method. The sysfs/netdev method to change the carrier was only introduced in kernel 3.9. For older kernels, we would just be out of luck. The ioctl method will work with any kernel version (2.6+). It's not clear if this is a problem for DPDK apps or not. thanks dan On Thu, Aug 30, 2018 at 7:11 PM, Dan Gora wrote: > On Thu, Aug 30, 2018 at 7:09 PM, Stephen Hemminger > wrote: >> On Thu, 30 Aug 2018 18:41:14 -0300 >> Dan Gora wrote: >> >>> On the other hand, the "write to /sys" method is a bit more simple and >>> confines the changes to the user space library. If we're confident >>> that the /sys ABI is stable and not going to be changed going forward >>> it seems like a valid alternative. >> >> See Documentation/ABI/testing/sysfs-class-net > > yeah, but it's in the 'testing' directory :) > > From Documentation/ABI/README: > > testing/ > > This directory documents interfaces that are felt to be stable, > as the main development of this interface has been completed. > The interface can be changed to add new features, but the > current interface will not break by doing this, unless grave > errors or security problems are found in them. Userspace > programs can start to rely on these interfaces, but they must be > aware of changes that can occur before these interfaces move to > be marked stable. Programs that use these interfaces are > strongly encouraged to add their name to the description of > these interfaces, so that the kernel developers can easily > notify them if any changes occur (see the description of the > layout of the files below for details on how to do this.) > > Like I said, I'm ok with using this if that's what everyone wants to do. > > d -- Dan Gora Software Engineer Adax, Inc. Rua Dona Maria Alves, 1070 Casa 5 Centro Ubatuba, SP CEP 11680-000 Brasil Tel: +55 (12) 3833-1021 (Brazil and outside of US) : +1 (510) 859-4801 (Inside of US) : dan_gora (Skype) email: dg@adax.com