From mboxrd@z Thu Jan 1 00:00:00 1970 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) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=networkplumber-org.20150623.gappssmtp.com; s=20150623; h=date:from:to:cc:subject:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=cPodVMzMXMrwMHK6wgmTzG1q30wW7QW5cS4vaMT5Uww=; b=XPoKhPb8GctZJBTm3erhTiwBlCLeqNU/O+3/LrhCFJXl3BwPy/8FZJNgJa43R3tNUz VIqPJbNezZaNXuqn8pXGr74L3QYFMj0VyMpB9662e+GzPSwdOyDkKXj1nH02NpDUnBX4 KvLSEl11C9AOOSVCF4UsYdR0IjR/8t0ff1/Ojn2ElpI6ionuMhmWKdt/ROEdvzg40TgO hiZd856ZzzZMCsOi4cWr5u0NliEbjHHpw/FNZ9kms5eT+0KekgYUFhCvKzwG2J9kIugh 6+xpcV/oXS46LKQdv+2DPx7e1HaQxaky+ZTcrbMLS/tf/CoIUXANCWZkXoxOOEHARutI DYiw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=cPodVMzMXMrwMHK6wgmTzG1q30wW7QW5cS4vaMT5Uww=; b=i4Desci3oScWOLqWIwD5tMnSWZ5w90PGlppJ+MtUtmX2BKRCGHyCDk9U8sLYZO4BbV RTgLRDxXBOZ6kErhNiXhIfHIhNGJmdM3JNvaGBUPARhiOtUMG0U3Ir+9CP1kbyGvqLCd Ib2R2Xwp3+uRwO7vSSiUOW31SfvO+wlof1iArNzLhLaXROfSrasS7kHUzv8ie2wvhr7G 31MuxOpFbpjIp0qvSsbRkWIdwfmkMkb+Yyj0WkplFT3zTIaY2zO2hcJBrpQZ4y/L/QtP aJ+Ro9n/SeAo3hgzCIMdr0MgVdyvSDuIgjIo1WKnBYk2KVF0iBPKsi83G/UIA8RSbT7w J9Aw== X-Gm-Message-State: APzg51DD0F5voIsJMiRX2XHYdHZm6aJ3Pc+VIwChKbgZOiwyKD3Z7pKe 59ejSXNxrR4frCpQxlYHFCV2dQ== X-Google-Smtp-Source: ANB0VdZGaAe9f09mP8phYzY6//UkMo1cHdnylSxIcsbrKTkKF32PwRfqr1qlf9eK+iPNEmK1oPkWfg== X-Received: by 2002:a17:902:d688:: with SMTP id v8-v6mr7495719ply.278.1535580021978; Wed, 29 Aug 2018 15:00:21 -0700 (PDT) Received: from xeon-e3 (204-195-22-127.wavecable.com. [204.195.22.127]) by smtp.gmail.com with ESMTPSA id o10-v6sm18883570pfk.76.2018.08.29.15.00.21 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Wed, 29 Aug 2018 15:00:21 -0700 (PDT) Date: Wed, 29 Aug 2018 15:00:14 -0700 From: Stephen Hemminger To: Dan Gora Cc: Ferruh Yigit , dev@dpdk.org Message-ID: <20180829150014.0ae59128@xeon-e3> 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> MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit 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: Wed, 29 Aug 2018 22:00:23 -0000 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.