From mboxrd@z Thu Jan 1 00:00:00 1970 From: Stephen Hemminger Subject: Re: [RFC PATCH] virtio_net: Extend virtio to use VF datapath when available Date: Tue, 19 Dec 2017 10:13:45 -0800 Message-ID: <20171219101345.7bf43a8d@xeon-e3> References: <1513644036-45230-1-git-send-email-sridhar.samudrala@intel.com> <20171219174259-mutt-send-email-mst@kernel.org> <20171219095548.61d70d10@xeon-e3> <20171219200611-mutt-send-email-mst@kernel.org> Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Cc: "Samudrala, Sridhar" , netdev@vger.kernel.org, virtualization@lists.linux-foundation.org, alexander.duyck@gmail.com, "Brandeburg, Jesse" To: "Michael S. Tsirkin" Return-path: Received: from mail-pf0-f195.google.com ([209.85.192.195]:46972 "EHLO mail-pf0-f195.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750918AbdLSSNt (ORCPT ); Tue, 19 Dec 2017 13:13:49 -0500 Received: by mail-pf0-f195.google.com with SMTP id c204so11445824pfc.13 for ; Tue, 19 Dec 2017 10:13:48 -0800 (PST) In-Reply-To: <20171219200611-mutt-send-email-mst@kernel.org> Sender: netdev-owner@vger.kernel.org List-ID: On Tue, 19 Dec 2017 20:07:01 +0200 "Michael S. Tsirkin" wrote: > On Tue, Dec 19, 2017 at 09:55:48AM -0800, Stephen Hemminger wrote: > > On Tue, 19 Dec 2017 09:41:39 -0800 > > "Samudrala, Sridhar" wrote: > > =20 > > > On 12/19/2017 7:47 AM, Michael S. Tsirkin wrote: =20 > > > > I'll need to look at this more, in particular the feature > > > > bit is missing here. For now one question: > > > > > > > > On Mon, Dec 18, 2017 at 04:40:36PM -0800, Sridhar Samudrala wrote: = =20 > > > >> @@ -56,6 +58,8 @@ module_param(napi_tx, bool, 0644); > > > >> */ > > > >> DECLARE_EWMA(pkt_len, 0, 64) > > > >> =20 > > > >> +#define VF_TAKEOVER_INT (HZ / 10) > > > >> + > > > >> #define VIRTNET_DRIVER_VERSION "1.0.0" > > > >> =20 > > > >> static const unsigned long guest_offloads[] =3D { =20 > > > > Why is this delay necessary? And why by 100ms? =20 > > >=20 > > > This is based on netvsc implementation and here is the commit that > > > added this delay.=C2=A0 Not sure if this needs to be 100ms. > > >=20 > > > commit 6123c66854c174e4982f98195100c1d990f9e5e6 > > > Author: stephen hemminger > > > Date:=C2=A0=C2=A0 Wed Aug 9 17:46:03 2017 -0700 > > >=20 > > > =C2=A0=C2=A0=C2=A0 netvsc: delay setup of VF device > > >=20 > > > =C2=A0=C2=A0=C2=A0 When VF device is discovered, delay bring it auto= matically up in > > > =C2=A0=C2=A0=C2=A0 order to allow userspace to some simple changes (= like renaming). > > >=20 > > >=20 > > > =20 > >=20 > > could be 10ms, just enough to let udev do its renaming =20 >=20 > Isn't there a way not to depend on udev completing its thing within a giv= en timeframe? Not that I know. the path is quite indirect.