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: Wed, 29 Aug 2018 15:00:14 -0700 Message-ID: <20180829150014.0ae59128@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> Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Cc: Ferruh Yigit , dev@dpdk.org To: Dan Gora Return-path: Received: from mail-pl1-f195.google.com (mail-pl1-f195.google.com [209.85.214.195]) by dpdk.org (Postfix) with ESMTP id F064E231E for ; Thu, 30 Aug 2018 00:00:22 +0200 (CEST) Received: by mail-pl1-f195.google.com with SMTP id s17-v6so2878534plp.7 for ; Wed, 29 Aug 2018 15:00:22 -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 Wed, 29 Aug 2018 18:02:06 -0300 Dan Gora wrote: > On Wed, Aug 29, 2018 at 12:54 PM, Stephen Hemminger > wrote: > > On Thu, 28 Jun 2018 18:55:08 -0700 > > Dan Gora wrote: > > > >> Add a new API function to KNI, rte_kni_update_link() to allow DPDK > >> applications to update the link state for the KNI network interfaces > >> in the linux kernel. > >> > >> Note that the default carrier state is set to off when the interface > >> is opened. > >> > >> Signed-off-by: Dan Gora > > > > Do you really need a special ioctl for this? > > There is already ability to set link state via sysfs or netlink. > > I think yes.. AFAIK sysfs does not constitute a stable API; It is a stable API on Linux. > it's only > available for Linux (yes, I know KNI is linux-only currently, but > there's not really any technical reason why it can't work on BSD) and > there are already callbacks to change the MTU and MAC addresses which > could also be done via netlink. IMHO having the kernel have an > accurate view of the link state is more important than the ability to > change the MAC address of the interface... The device model on BSD is significantly different than Linux. Doing KNI on BSD is going to be a full rewrite of the driver anyway; I won't worry about sysfs, dependency. The important part is that if KNI is ever going to be supportable it needs to be upstream in Linux, not a bolt on out of tree driver. Most Enterprise distributions will not support out of tree drivers for good reasons.