From mboxrd@z Thu Jan 1 00:00:00 1970 From: Stephen Hemminger Subject: Re: [PATCH v2] kni: use kni_ethtool_ops only with unknown drivers Date: Sat, 1 Dec 2018 09:31:50 -0800 Message-ID: <20181201093150.2ab26e85@xeon-e3> References: <20181130192946.13732-1-iryzhov@nfware.com> <20181130194750.13870-1-iryzhov@nfware.com> <20181130153815.3be2f30b@xeon-e3> Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Cc: dev@dpdk.org To: Igor Ryzhov Return-path: Received: from mail-pf1-f195.google.com (mail-pf1-f195.google.com [209.85.210.195]) by dpdk.org (Postfix) with ESMTP id 222591B525 for ; Sat, 1 Dec 2018 18:31:53 +0100 (CET) Received: by mail-pf1-f195.google.com with SMTP id z9so4357109pfi.2 for ; Sat, 01 Dec 2018 09:31:52 -0800 (PST) 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 Sat, 1 Dec 2018 14:12:54 +0300 Igor Ryzhov wrote: > Hi Stephen, >=20 > I also do not see the point of the current implementation of ethtool > support. > That's why I sent this patch =E2=80=93 it enables ethtool_ops for all dev= ices, > independent of the underlying driver. > Right now only .get_link is supported, but I am thinking about > implementation of a larger set of functions, using req/resp queue, like > netdev_ops functions are working. >=20 > Regarding the KNI itself, we use it as Linux mirror of physical port for: > 1. Port configuration from Linux =E2=80=93 such functions as set_mac, cha= nge_mtu, > etc. And ethtool_ops will be used the same way. > 2. Passing control-plane packets to Linux. >=20 > Can virtio user be used the same way, as a mirror of physical port? >=20 > Best regards, > Igor In Linux if device does not supply get_link the base code does the right thing u32 ethtool_op_get_link(struct net_device *dev) { return netif_carrier_ok(dev) ? 1 : 0; } Doing set_mac, change_mtu and ethtool_ops in virtio_user should be possible but probably not implemented.