Received: by 2002:ac0:950c:0:0:0:0:0 with SMTP id f12csp3854288imc; Thu, 14 Mar 2019 06:51:28 -0700 (PDT) X-Google-Smtp-Source: APXvYqwW3VBJAXCgslmrFgILpkTHtPu5BQzy56ytauiODUxAcXO5T94+ndSz/wMOxr2d89AFU7k7 X-Received: by 2002:a65:5c0b:: with SMTP id u11mr35991831pgr.352.1552571488417; Thu, 14 Mar 2019 06:51:28 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1552571488; cv=none; d=google.com; s=arc-20160816; b=PFUatDwo0dVv2rLuxUULoC+ugCbAye8rg7CPli4C5SAekuGxAAXOg7ol1RDI8tElvy KcW2afeDSEvlzo0wXZoKlRzgQxMbBla+hNmQ/DFrEgX5CpqDeBDtDOedHcNtEKt4kbkA 3pzQdtWzB3/DQaULZRXdyZC5k9MhdsR2v2ppD1DLpKlB8lvCrk/AQ0e1PnyKkJxLvmNQ QHwiS2JXYk0CuGnepuoQS6suFKkp1FSbLpHUflXkYX/n8rMN8PD6nXY5ytgQyoAnh3A8 rbmkDSzz1eJDWudZZ4pX9daYZ2EuNCmv1WF+MZVoKkVDZBIAjvEIDRDC3w295jAlBfLJ vHIA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-language :content-transfer-encoding:in-reply-to:mime-version:user-agent:date :message-id:from:references:cc:to:subject:dkim-signature; bh=4ddxflZglpAI5MJot1Q2YWINVe1fcfeCgG+OR0bKChI=; b=Teh7up7tDBtKtNQhkgC6wwI5zZdlQz1TVyEvniyMKVaEyT3Rc0+VY1eMi52/BFpnTI qLek/gcK4V7bJsEPmGh/D1JikF3prRQyC72cY14+UPRhGo1bi909Gew8sM5Wv5pgRyGK K+frqGsq2RXPEaJ6FVEudzJYMTkhZFtwiTPW9JhpiQQ2BUBZrKygyzAW0Ly7XGwXDVSe k8EKBakoncx86TUsM/Gywwl+VYNeww5Ja/hZPqF7LyRAHtU9W/D/SSvIWF2Cy/4qAw/7 NhAi8OBBLxStPOS2+xDht39SAqH8ZMMhEfXaJQPhEubmZsSDESX+a2lacmanVtADY9c4 rUnw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=VtmT4GCl; 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; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id o5si880270pgl.194.2019.03.14.06.51.13; Thu, 14 Mar 2019 06:51:28 -0700 (PDT) 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; dkim=pass header.i=@gmail.com header.s=20161025 header.b=VtmT4GCl; 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; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727615AbfCNNuP (ORCPT + 99 others); Thu, 14 Mar 2019 09:50:15 -0400 Received: from mail-lj1-f193.google.com ([209.85.208.193]:36162 "EHLO mail-lj1-f193.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727394AbfCNNuP (ORCPT ); Thu, 14 Mar 2019 09:50:15 -0400 Received: by mail-lj1-f193.google.com with SMTP id v10so4888892lji.3; Thu, 14 Mar 2019 06:50:13 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=subject:to:cc:references:from:message-id:date:user-agent :mime-version:in-reply-to:content-transfer-encoding:content-language; bh=4ddxflZglpAI5MJot1Q2YWINVe1fcfeCgG+OR0bKChI=; b=VtmT4GClFn3/Smbv3EEZ13PJDaMMv2Am6r9u/b4ENSsdFFNS0As3uSAExqXDzvFOwh ot4CwySDMPtRf1myo9GDFY9w7DC1ZS+kV3EwnJnmTSLAl4HXnfmK/id3GNQ7euvDqp7+ 3Yk360b08ekddYbaqSPUDli6O62zfvswgZXgRKyr27x6pe0a+FPcmKKRG8eatRfhCMna c+dQZ8WFUOJ3aoCGqahPojJeHSlvoc6h1CrcCdN+CfUR4NzF08ueg/purBsECr/o6jbb 3hu97OSOTb1stjerrNdePinI0hdF2ec2y01kMaJ2IBLZemhVguVUD7EQPWWSsihywbDt jK+g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:to:cc:references:from:message-id:date :user-agent:mime-version:in-reply-to:content-transfer-encoding :content-language; bh=4ddxflZglpAI5MJot1Q2YWINVe1fcfeCgG+OR0bKChI=; b=VYi48awlPcsqAxDipbGv3kRWUw5ZvELknEyYfaQCjN9v8II+EZwKuKMZRnmoIpV3ww DPxgGU82C3eLrWTdpKc6F5MIX2GLbwi1eQLu25aY9dSVokbj+NrbZFVOx2IOSJmOom4T KeGztaVkrSQ1JW9egK0jCGKGJVp6oOv1LteSn1SjHQzjJFHS34UBLnMHeK/QuW+7DWK0 RMGbs5yY4ITb0pb/56jafbeV3zDND5hFJaRijDr4XLFEi04zjsMQFIahvtZmXn3WIccU 8dNCPuqDua0spskBpxJzewW2DHVlgFaUDRgloazynV3IlqQrt73rCSjhdctyvCO7n7wu Nb7g== X-Gm-Message-State: APjAAAVhwgOnJyyoJKn3yfQqgmUIiMhI9/3lCAoFbdDGEbeKkMss9kbl aSfLSmc5ChxS+Sg5SaSt9tM= X-Received: by 2002:a2e:8eda:: with SMTP id e26mr557835ljl.157.1552571412733; Thu, 14 Mar 2019 06:50:12 -0700 (PDT) Received: from [10.17.182.20] (ll-74.141.223.85.sovam.net.ua. [85.223.141.74]) by smtp.gmail.com with ESMTPSA id m16sm2431905ljb.50.2019.03.14.06.50.11 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 14 Mar 2019 06:50:12 -0700 (PDT) Subject: Re: [Xen-devel][PATCH] xen/netfront: Remove unneeded .resume callback To: netdev@vger.kernel.org, xen-devel@lists.xenproject.org, linux-kernel@vger.kernel.org, jgross@suse.com, boris.ostrovsky@oracle.com, sstabellini@kernel.org, davem@davemloft.net Cc: Oleksandr Andrushchenko References: <20190314131749.25706-1-andr2000@gmail.com> From: Oleksandr Andrushchenko Message-ID: <5c8dd6fa-7173-6618-ef4e-018c0be20028@gmail.com> Date: Thu, 14 Mar 2019 15:50:10 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.5.1 MIME-Version: 1.0 In-Reply-To: <20190314131749.25706-1-andr2000@gmail.com> Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit Content-Language: en-US Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org I am still confused about suspend/resume for the front drivers, for instance, block front [1] does implement full/proper reconnect on .resume, but net front only does this partially. Could anyone please shed some light on suspend/resume design? Thank you, Oleksandr On 3/14/19 3:17 PM, Oleksandr Andrushchenko wrote: > From: Oleksandr Andrushchenko > > Currently on driver resume we remove all the network queues and > destroy shared Tx/Rx rings leaving the driver in its current state > and never signaling the backend of this frontend's state change. > This leads to the number of consequences: > - when frontend withdraws granted references to the rings etc. it cannot > be cleanly done as the backend still holds those (it was not told to > free the resources) > - it is not possible to resume driver operation as all the communication > means with the backned were destroyed by the frontend, thus > making the frontend appear to the guest OS as functional, but > not really. > > Fix this by not destroying communication channels/rings on driver > resume. > > Signed-off-by: Oleksandr Andrushchenko > --- > drivers/net/xen-netfront.c | 17 ----------------- > 1 file changed, 17 deletions(-) > > diff --git a/drivers/net/xen-netfront.c b/drivers/net/xen-netfront.c > index c914c24f880b..2ca162048da4 100644 > --- a/drivers/net/xen-netfront.c > +++ b/drivers/net/xen-netfront.c > @@ -1422,22 +1422,6 @@ static void xennet_disconnect_backend(struct netfront_info *info) > } > } > > -/** > - * We are reconnecting to the backend, due to a suspend/resume, or a backend > - * driver restart. We tear down our netif structure and recreate it, but > - * leave the device-layer structures intact so that this is transparent to the > - * rest of the kernel. > - */ > -static int netfront_resume(struct xenbus_device *dev) > -{ > - struct netfront_info *info = dev_get_drvdata(&dev->dev); > - > - dev_dbg(&dev->dev, "%s\n", dev->nodename); > - > - xennet_disconnect_backend(info); > - return 0; > -} > - > static int xen_net_read_mac(struct xenbus_device *dev, u8 mac[]) > { > char *s, *e, *macstr; > @@ -2185,7 +2169,6 @@ static struct xenbus_driver netfront_driver = { > .ids = netfront_ids, > .probe = netfront_probe, > .remove = xennet_remove, > - .resume = netfront_resume, > .otherend_changed = netback_changed, > }; > [1] https://elixir.bootlin.com/linux/v5.0.2/source/drivers/block/xen-blkfront.c#L2072