From mboxrd@z Thu Jan 1 00:00:00 1970 From: "Michael S. Tsirkin" Subject: Re: [PATCH net-next] virtio-net: invoke zerocopy callback on xmit path if no tx napi Date: Tue, 29 Aug 2017 23:40:49 +0300 Message-ID: <20170829233920-mutt-send-email-mst@kernel.org> References: <20170824160748-mutt-send-email-mst@kernel.org> <20170824234551-mutt-send-email-mst@kernel.org> <20170826022744-mutt-send-email-mst@kernel.org> <20170829224136-mutt-send-email-mst@kernel.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Cc: Koichiro Den , Jason Wang , virtualization@lists.linux-foundation.org, Network Development To: Willem de Bruijn Return-path: Received: from mx1.redhat.com ([209.132.183.28]:48898 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751249AbdH2Uku (ORCPT ); Tue, 29 Aug 2017 16:40:50 -0400 Content-Disposition: inline In-Reply-To: Sender: netdev-owner@vger.kernel.org List-ID: On Tue, Aug 29, 2017 at 03:53:08PM -0400, Willem de Bruijn wrote: > On Tue, Aug 29, 2017 at 3:42 PM, Michael S. Tsirkin wrote: > > On Tue, Aug 29, 2017 at 03:35:38PM -0400, Willem de Bruijn wrote: > >> By the way, I have had an unrelated patch outstanding for a while > >> to have virtio-net support the VIRTIO_CONFIG_S_NEEDS_RESET > >> command. Will send that as RFC. > > > > Oh nice. > > Great :) > > > One needs to be careful about locking there which is why > > no devices support that yet. > > I originally wrote it based on the virtnet_reset function introduced > for xdp. Calling this from virtnet_config_changed_work is non trivial, > as virtnet_freeze_down waits until no config worker is running. > > Otherwise, I could not find any constraints on when freeze may be > called, and it largely follows the same path. I hope I didn't miss anything. The issue is that on freeze processes are not running so we generally know no new packets will arrive (might be wrong for bridging, then it's a bug). On device error you must prevent new skbs from coming in, etc. -- MST