From mboxrd@z Thu Jan 1 00:00:00 1970 From: "Samudrala, Sridhar" Subject: Re: [RFC PATCH] virtio_net: Extend virtio to use VF datapath when available Date: Tue, 19 Dec 2017 09:41:39 -0800 Message-ID: References: <1513644036-45230-1-git-send-email-sridhar.samudrala@intel.com> <20171219174259-mutt-send-email-mst@kernel.org> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 8bit Cc: stephen@networkplumber.org, netdev@vger.kernel.org, virtualization@lists.linux-foundation.org, alexander.duyck@gmail.com, "Brandeburg, Jesse" To: "Michael S. Tsirkin" Return-path: Received: from mga01.intel.com ([192.55.52.88]:6993 "EHLO mga01.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750737AbdLSRlk (ORCPT ); Tue, 19 Dec 2017 12:41:40 -0500 In-Reply-To: <20171219174259-mutt-send-email-mst@kernel.org> Content-Language: en-US Sender: netdev-owner@vger.kernel.org List-ID: On 12/19/2017 7:47 AM, Michael S. Tsirkin wrote: > 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: >> @@ -56,6 +58,8 @@ module_param(napi_tx, bool, 0644); >> */ >> DECLARE_EWMA(pkt_len, 0, 64) >> >> +#define VF_TAKEOVER_INT (HZ / 10) >> + >> #define VIRTNET_DRIVER_VERSION "1.0.0" >> >> static const unsigned long guest_offloads[] = { > Why is this delay necessary? And why by 100ms? This is based on netvsc implementation and here is the commit that added this delay.  Not sure if this needs to be 100ms. commit 6123c66854c174e4982f98195100c1d990f9e5e6 Author: stephen hemminger Date:   Wed Aug 9 17:46:03 2017 -0700     netvsc: delay setup of VF device     When VF device is discovered, delay bring it automatically up in     order to allow userspace to some simple changes (like renaming).