Received: by 2002:a25:8b91:0:0:0:0:0 with SMTP id j17csp10316966ybl; Thu, 26 Dec 2019 15:17:48 -0800 (PST) X-Google-Smtp-Source: APXvYqyINiuStkPLd+jmZVhGcEwBdRAwLGuZ3GZK7CwaZAmYDjcizv/L3Mp/0Xr7tl1O0lpyTG6t X-Received: by 2002:a9d:6c01:: with SMTP id f1mr50466808otq.133.1577402268042; Thu, 26 Dec 2019 15:17:48 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1577402268; cv=none; d=google.com; s=arc-20160816; b=gBX72ncdmguuMdi2FATcQ6c9EMMZFJXYXDpUrOO4YzhHgQ5PUjf57VwxyKIGV1/rk7 j1X2rNuCSEIHLLqC+SJsiaVmSvx8ULM1U/zOKcfXAsWgnbxH+qfaIp3I9l9jRx2p9PIu PfIYfkSObWVpeAV11Q3GjepqDxp6YRPSxUIyYIdNgWmTf1ImEbi3fTVG5edesxXPB4Ms QvoD5aKIBLgWd/94X6JA2lSvHnwCfpHA2py0ad4m3hvAFGCAxPiI8a10fnEED9auhcLE wmjQbvCmX2FPzn+hb81BdkBJ+sIZan2PM3To+bxycoIXpRjDgeL6+Lo2FaQql1yh7bR6 aqTQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :references:in-reply-to:from:subject:cc:to:message-id:date; bh=BGb8+qCIkCKpTvIUsdEVFkvafqEXHlJ8mrKQH/qaRMU=; b=QdHCJNalsP131hE3AjXQUqP4cQRiVe8HMYz+etoQXhntM6j4HqI0+QwH3z/vQF7O6A wVnHLZm+aKwTv8jyHnB4+A+uyuHkNJ95M5d4jlo1OdHi9drBmU57S48Mq7AV2iJSXZAy 1zZBr6Sbmu6VGPXfYE1xTPyj3dW42m4mfY4rwdOH7qyrGp0VDrX8y/jPGd8UBA2A00MG 0OsGyObkWPhZGN8cW6qdd2zB2ezFStB9SbRvApiuicWjajP+FaPQuhoDLMzKKVH5tKVP 3u0gtFz2WpEDnINTWCsaFRMbZyuxmfNXZ+y0czceTItx6tmN7muiYmDfox3BN0Pzx3Na qHFQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id u21si15330115oiv.267.2019.12.26.15.17.34; Thu, 26 Dec 2019 15:17:48 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726981AbfLZXQp (ORCPT + 99 others); Thu, 26 Dec 2019 18:16:45 -0500 Received: from shards.monkeyblade.net ([23.128.96.9]:44484 "EHLO shards.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726277AbfLZXQp (ORCPT ); Thu, 26 Dec 2019 18:16:45 -0500 Received: from localhost (unknown [IPv6:2601:601:9f00:1c3::3d5]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (Client did not present a certificate) (Authenticated sender: davem-davemloft) by shards.monkeyblade.net (Postfix) with ESMTPSA id BE1B81539419A; Thu, 26 Dec 2019 15:16:44 -0800 (PST) Date: Thu, 26 Dec 2019 15:16:44 -0800 (PST) Message-Id: <20191226.151644.93658401366332934.davem@davemloft.net> To: pdurrant@amazon.com Cc: xen-devel@lists.xenproject.org, netdev@vger.kernel.org, linux-kernel@vger.kernel.org, wei.liu@kernel.org, paul@xen.org Subject: Re: [PATCH net-next] xen-netback: support dynamic unbind/bind From: David Miller In-Reply-To: <20191223095923.2458-1-pdurrant@amazon.com> References: <20191223095923.2458-1-pdurrant@amazon.com> X-Mailer: Mew version 6.8 on Emacs 26.1 Mime-Version: 1.0 Content-Type: Text/Plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.5.12 (shards.monkeyblade.net [149.20.54.216]); Thu, 26 Dec 2019 15:16:45 -0800 (PST) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Paul Durrant Date: Mon, 23 Dec 2019 09:59:23 +0000 > By re-attaching RX, TX, and CTL rings during connect() rather than > assuming they are freshly allocated (i.e. assuming the counters are zero), > and avoiding forcing state to Closed in netback_remove() it is possible > for vif instances to be unbound and re-bound from and to (respectively) a > running guest. > > Dynamic unbind/bind is a highly useful feature for a backend module as it > allows it to be unloaded and re-loaded (i.e. updated) without requiring > domUs to be halted. > > This has been tested by running iperf as a server in the test VM and > then running a client against it in a continuous loop, whilst also > running: > > while true; > do echo vif-$DOMID-$VIF >unbind; > echo down; > rmmod xen-netback; > echo unloaded; > modprobe xen-netback; > cd $(pwd); > brctl addif xenbr0 vif$DOMID.$VIF; > ip link set vif$DOMID.$VIF up; > echo up; > sleep 5; > done > > in dom0 from /sys/bus/xen-backend/drivers/vif to continuously unbind, > unload, re-load, re-bind and re-plumb the backend. > > Clearly a performance drop was seen but no TCP connection resets were > observed during this test and moreover a parallel SSH connection into the > guest remained perfectly usable throughout. > > Signed-off-by: Paul Durrant Applied, thank you.