Received: by 2002:ac0:950c:0:0:0:0:0 with SMTP id f12csp3828909imc; Thu, 14 Mar 2019 06:19:20 -0700 (PDT) X-Google-Smtp-Source: APXvYqyJOoIp6oe+Nufjq09SIIES4T8Tw/XtDocLTSG+v/Gf3fDxM23DaM4QXXlST69ihX5Yn7gP X-Received: by 2002:a65:624c:: with SMTP id q12mr43887444pgv.75.1552569560512; Thu, 14 Mar 2019 06:19:20 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1552569560; cv=none; d=google.com; s=arc-20160816; b=bMXus3Iw9v319oCeLlYYfkYlt6NgsXj5C7PuoduAHgwbTWJ0abdPhjYqjcJLU/f048 oSWvx2RM78oGabizpAVyJ1IbaS3yLtPVXL9JaiZhjh9Aqegpl9vYaN0+zpzABSxRpkz5 Esh0Moba3ZNAM8OAaCDSq3mkEnU9kMVDkTeeOqjljJTM1eGwu3OVjJoSEbuArLwCQUHP IX7Hs8e3XFVuIN4865qX8EAd8pSls97x+OfY1L8rdhP55d+qdwMhAhs/5bjpZjqOIZGM 9btdVVuGyZEU6XGSOc1evx014F1tD331sjQ6KYHWrTF6A8BbBH9gx6rga/AKbz7XHx5e osLg== 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 :message-id:date:subject:cc:to:from:dkim-signature; bh=/7jFaqzBkBgJOqqcmYk+H8RgQmMqHirtHzXa3rG7ILY=; b=w4qPdvNA2btyXYdYxebjt8KC45RYVwE5EPOgWJxKaTtDcjWYRp5uLvTem38lT/VtxC V5ymusVarGkeqgBMXLZHZqM6veVWoe0cR7IEuaWeNNse14xQW3lJb1d9B16w9Bu7mOwl nkX0/zA6X5cZJEgMfgksgs7I89GMg2j5DHWF5ZjUU4KoarigegssIImiyy6N2QOa71vL uSbusRycrr00xt//wWKwDSI+QyzD/qTPp1dmfiSkQilOMEchBbxeYI+1Zn2yq391MolO Fc0Kgcg1tKex+B1mqO842KEc7gN/6j0CIHNCC7BULcm68XYi5BTgbL0YdpOeTtnXKooo jL5Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b="E/tr6J2x"; 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 f127si6316682pgc.505.2019.03.14.06.19.05; Thu, 14 Mar 2019 06:19:20 -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="E/tr6J2x"; 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 S1727309AbfCNNR7 (ORCPT + 99 others); Thu, 14 Mar 2019 09:17:59 -0400 Received: from mail-lj1-f196.google.com ([209.85.208.196]:34356 "EHLO mail-lj1-f196.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726419AbfCNNR6 (ORCPT ); Thu, 14 Mar 2019 09:17:58 -0400 Received: by mail-lj1-f196.google.com with SMTP id l5so4795247lje.1; Thu, 14 Mar 2019 06:17:57 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=/7jFaqzBkBgJOqqcmYk+H8RgQmMqHirtHzXa3rG7ILY=; b=E/tr6J2xgdxNI4dV5BJmLthQudBaXiXEIzVOJgdw1bJ34gPE1jYJFPnEzmiuioZapi XqhLSGwAlvxza3sT+1+NRzwtM/UgjG0KfFWPZcwI3bR9l7+4WlGQft4xO3LC3xd54Ipt c6ydk5F64I7TVsKZ79QjRwWjlnNzfFfXyXD5aBSDCcYo0CKFobdNJUmwEkRXmnkUWISs F7d0eRWtdUQxl5s1vzTCtS7YOMu/Ey1ryQaFhzgY783DAtq8Fsa05hm8Vjrn2dcgvIYQ SKGzE3Chfm3P2YTuwZa5GW0a1GoYECYrY/RcjLZujxSGeYrHCIhiL2XmqD+jOs14LBAW rj5w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=/7jFaqzBkBgJOqqcmYk+H8RgQmMqHirtHzXa3rG7ILY=; b=PrlWSnEoMRcAK7KC+GzLapLp25KzIRsJVmoIEvvUUT1NXQDD89cWqvqz7XPSEkF9GG t/usv7OoBF9g/nDaQOLZHYp/1VrAJaG24M+vfrcYvd/46edU9qh+J29DKPeS0mD9634w G+HbTT1chh9yH/NStlaW9JqWS8XISH4QbQY7XS5aJlKrKDQaFlLTTluoVJdFstqQ4lg5 jVBaZli9OyYh/ihPL5+KpkYkWPdDrjkY9Kq+2xOhTyEBXsBsXYVIwTnq1Ecv08oWNsYP bNW85aUyPfsBYCXUKW9d6D2lPfMyeXbMrt9znqD/3kboTKE1piDShyc8CJezI8+ukuYf S/vw== X-Gm-Message-State: APjAAAXov+D6RBes7d41Uff1yq8M2weFJ+GlIy5Rwh7CTnF3/+7Xp4qr dlgvXQQ/eKGYSyuA39z4llNZRvKJ X-Received: by 2002:a2e:425b:: with SMTP id p88mr25332270lja.78.1552569475936; Thu, 14 Mar 2019 06:17:55 -0700 (PDT) Received: from a2k-HP-ProDesk-600-G2-SFF.kyiv.epam.com (ll-74.141.223.85.sovam.net.ua. [85.223.141.74]) by smtp.gmail.com with ESMTPSA id y63sm2733082lfd.58.2019.03.14.06.17.54 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Thu, 14 Mar 2019 06:17:55 -0700 (PDT) From: Oleksandr Andrushchenko 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: andr2000@gmail.com, Oleksandr Andrushchenko Subject: [Xen-devel][PATCH] xen/netfront: Remove unneeded .resume callback Date: Thu, 14 Mar 2019 15:17:49 +0200 Message-Id: <20190314131749.25706-1-andr2000@gmail.com> X-Mailer: git-send-email 2.21.0 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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, }; -- 2.21.0