From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mx1.redhat.com (mx3-rdu2.redhat.com [66.187.233.73]) by dpdk.org (Postfix) with ESMTP id C15841041 for ; Wed, 12 Sep 2018 06:02:48 +0200 (CEST) Received: from smtp.corp.redhat.com (int-mx05.intmail.prod.int.rdu2.redhat.com [10.11.54.5]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 49B7B7A7E6; Wed, 12 Sep 2018 04:02:48 +0000 (UTC) Received: from [10.72.12.130] (ovpn-12-130.pek2.redhat.com [10.72.12.130]) by smtp.corp.redhat.com (Postfix) with ESMTPS id F34F27D4DC; Wed, 12 Sep 2018 04:02:45 +0000 (UTC) To: Stephen Hemminger , Dan Gora Cc: Igor Ryzhov , Ferruh Yigit , dev@dpdk.org 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> <20180911161424.55b4089e@xeon-e3> From: Jason Wang Message-ID: <015abb18-e3c2-c18e-06ea-9efd9b47b57b@redhat.com> Date: Wed, 12 Sep 2018 12:02:42 +0800 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.9.1 MIME-Version: 1.0 In-Reply-To: <20180911161424.55b4089e@xeon-e3> Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 8bit Content-Language: en-US X-Scanned-By: MIMEDefang 2.79 on 10.11.54.5 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.11.55.2]); Wed, 12 Sep 2018 04:02:48 +0000 (UTC) X-Greylist: inspected by milter-greylist-4.5.16 (mx1.redhat.com [10.11.55.2]); Wed, 12 Sep 2018 04:02:48 +0000 (UTC) for IP:'10.11.54.5' DOMAIN:'int-mx05.intmail.prod.int.rdu2.redhat.com' HELO:'smtp.corp.redhat.com' FROM:'jasowang@redhat.com' RCPT:'' 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, 12 Sep 2018 04:02:49 -0000 On 2018年09月12日 07:14, Stephen Hemminger wrote: > 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. Why not use vhost_net instead? KNI duplicates its function. Thanks > > 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.