From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-pf1-f196.google.com (mail-pf1-f196.google.com [209.85.210.196]) by dpdk.org (Postfix) with ESMTP id EDCEE4C94 for ; Wed, 12 Sep 2018 01:14:27 +0200 (CEST) Received: by mail-pf1-f196.google.com with SMTP id k21-v6so12949079pff.11 for ; Tue, 11 Sep 2018 16:14:27 -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=1dTZl1JHPkJsnxRhaIYufk+tDKhxqSwwuBvWb8pO4aI=; b=B7bJsPA18G5t7sMWjSWA8DV+wvn71rnhfzOj8y/wRJ0uZdRefV4zaErFILVDcty6O9 KnU3iEEQ+S95lUMqturgnZvCyTVjdLDRcKvu7o792PQ2bzSSp4Fg+jqkFAaAhl2XIkPr rz+1MEioAwqyGIS87oH8RDoTkq3WdLKi3O7ZMtjgb9kFNpeW7wVz2Mauv9nZQWUVK0q7 6f/3M76HehE78pb/LNmsemT0WgLiKo/PEKZJ+GDcYMljMmVcVRhc3lOaMnV8eYZ5AOlw 3WLgsXeLrat8FGpy7q1jg97q9OzZ14EsEyxvEiAxBMvt9I/HjURy/UInyjBODSti6njL aQcQ== 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=1dTZl1JHPkJsnxRhaIYufk+tDKhxqSwwuBvWb8pO4aI=; b=GHNsu4iLv6Q/L8QXahvb5zPRk064L9nQLpCQi96T0PiYd12+9n1zmtihuFhTo2BwM9 GH6/XD9VzDaDfXizmhDtwj37CZ9U0IHKnM7Mzb3sKNQGP9CgEtHIj9M5WspSkhaffhfN j6B0YZWd23VBizLxrR9VXMZGPWIiEcqTExf0uKyLmPjgxWeBURvDoEnrfTxjUZyEH/5k qT/y2qt/F6xnMaXCWBoKFizvSK6pH5sB55+/e8bvrxxDaRhChzkG/EYzqrtrykmDzUH1 k3fpTtcUVRVcCS3d79dMIVgilJqdtWu/Hkm1V67Djmxt29Kh9Qr2f/mTCQYzInHUtrn+ uJ9g== X-Gm-Message-State: APzg51DHvpCd1eZBQ6rMaUmHZ06AU5uOgmWICiEib8kqIOqfE+YNEYKW ovD/caiTO++SXM4+/TDcp9zcDQ== X-Google-Smtp-Source: ANB0VdYVG+ls3NiUbI1rVCxI12JiNg13jAJwa/gwMYBUZ5jFwzzeOzf+dJ50FsqeaTQeO1cZP0rzRQ== X-Received: by 2002:a62:438f:: with SMTP id l15-v6mr32533168pfi.196.1536707666963; Tue, 11 Sep 2018 16:14:26 -0700 (PDT) Received: from xeon-e3 (204-195-22-127.wavecable.com. [204.195.22.127]) by smtp.gmail.com with ESMTPSA id l6-v6sm27475791pfl.169.2018.09.11.16.14.26 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Tue, 11 Sep 2018 16:14:26 -0700 (PDT) Date: Tue, 11 Sep 2018 16:14:24 -0700 From: Stephen Hemminger To: Dan Gora Cc: Igor Ryzhov , Ferruh Yigit , dev@dpdk.org Message-ID: <20180911161424.55b4089e@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> <20180829150014.0ae59128@xeon-e3> <20180829161043.11bb2434@xeon-e3> <20180830150911.6b0e7901@xeon-e3> <20180905135751.74f6c14b@shemminger-XPS-13-9360> <20180911145248.7512abd1@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: Tue, 11 Sep 2018 23:14:28 -0000 On Tue, 11 Sep 2018 19:07:47 -0300 Dan Gora wrote: > On Tue, Sep 11, 2018 at 6:52 PM, Stephen Hemminger > wrote: > > 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. > > The thing that caught my attention is that when you mark a kernel > ethernet device 'down', you get a message that the link is down in the > syslog. > > snappy:root:bash 2645 => ip link set down dev eth0 > Sep 11 18:32:48 snappy kernel: e1000e: eth0 NIC Link is Down > > With this method, that's not possible because you cannot change the > link state from the callback from kni_net_release. > > The carrier state doesn't have any meaning from a data transfer point > of view, but it's often useful for being able to diagnose connectivity > issues (is my cable plugged in or not). > > I'm still not really clear what the objection really is to the ioctl > method. Is it just the number of changes? That the kernel driver has > to change as well? Just that there is another way to do it? > > thanks > dan I want to see KNI as part of the standard Linux kernel at some future date. Having KNI as an out of tree driver means it is doomed to chasing tail lights for the Linux kernel ABI instability and also problems with Linux distributions. One of the barriers to entry for Linux drivers is introducing new ioctl's. Ioctl's have issues with being device specific and also 32/64 compatiablity. If KNI has ioctl's it makes it harder to get merged some day. I freely admit that this is forcing KNI to respond to something that is not there yet, so if it is too hard, then doing it with ioctl is going to be necessary.