Received: by 2002:a25:8b91:0:0:0:0:0 with SMTP id j17csp1026364ybl; Thu, 12 Dec 2019 08:33:14 -0800 (PST) X-Google-Smtp-Source: APXvYqyBJ8Z+nTTEI4xHAmR1Je3dRz7XDbfeQRLISf78DedzSg+C2/PWbWKftCuoaLw4hTOj+Pue X-Received: by 2002:a05:6830:1b6a:: with SMTP id d10mr9351107ote.52.1576168394094; Thu, 12 Dec 2019 08:33:14 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1576168394; cv=none; d=google.com; s=arc-20160816; b=CSlCQSNTeR8m3KN2ziT0DvClN48nTn+JW6ChaE5RGMCKmJZ1/tkD/iiEPM5MjPB9NY vrtloMkMDvX3fGMEO2wlMmpvJaTcm/MmoSF59WuZ6OzsUlO0xz6wSjoduWc2/uAkHzHT FVxvtlNYSqqhw+0L7qfcxB5DKBssC9LHDO07kYfVRZBupWFLOM+kLk5OLAotZJG9DZGo kKU9PAVJwoU9QSXSWWQr1k6P7f9VXywzHauI01yjAu5GHdw8Pu4NkIfh7jG1rl6pQXf0 Fzn5eIOPLAbUALRfKhdqAkd5qf1VU6wMFzE15LI4HERNBeRdniDhAEIwlxSw1r6L59ks yQhw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:dkim-signature; bh=iMtrFaOx5zO3RN/AAutoljB+onBiD3BJRHs5f2zZfww=; b=ss9dAzCtR9U3Z2A8C7iB23vycgoMMEjSetujvsSh4mH2hf9Jmfq/YevkoWLsUPRRlo ecLGJOWuS5JRVM5mmjH9fA/xT+9RTSmtrFTxK19Xt21SBzJS6pb36S1O6eiqrq7e4IBb XZYDiisVHlINxE5MQLLcaiLd2KS73l22tvIj3cfti8qJpahtn7kg/4ksIijau07yfwj5 KODPx5EKNqD/Ka5fHswwFP//C1qjvd9t/RtX6Yr4XnOe22qTuC0r6y1a7BLX/FNk2n0w wrattYtpsuG5bnBaT3uK1RTOZQ5xO666yBIZTDARbDM0FP5u4hQopT/E7uyI7Iph54qi M3Sw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b="RX0b/2Hp"; 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 d95si3663331otb.258.2019.12.12.08.33.01; Thu, 12 Dec 2019 08:33:14 -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; dkim=pass header.i=@gmail.com header.s=20161025 header.b="RX0b/2Hp"; 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 S1729960AbfLLQcC (ORCPT + 99 others); Thu, 12 Dec 2019 11:32:02 -0500 Received: from mail-lf1-f65.google.com ([209.85.167.65]:40552 "EHLO mail-lf1-f65.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729857AbfLLQcC (ORCPT ); Thu, 12 Dec 2019 11:32:02 -0500 Received: by mail-lf1-f65.google.com with SMTP id i23so2167779lfo.7; Thu, 12 Dec 2019 08:32:00 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=iMtrFaOx5zO3RN/AAutoljB+onBiD3BJRHs5f2zZfww=; b=RX0b/2HpsKZ7maRpMri6BR1fLBSsr8jB3blJdj2v9ZtRJDZm/64TPjzD6jAcDoqxCD axOyXYFX28C6WELe7LwQkjK1jRxAP4eUWzcIEXMaurpHhAXRyLxKr80Yx0M8gYEik0Rp OWV+5nba5PaFRT9LXejGtKdUeavvOE7T+bnLLxG9X4yvLNcfOUannt6ffP38z5NUfeFW KU2pvyxU1dNdhfFvsSpDPyeJvakGaSk0K1XirMHIyAnhOLdqeYDPR5b0KmJyvWI9CFFE BzYmx598f/124HZuezJ61isYRjRLsgxv/K+n+VIC4K6gMRDu8QkhCsqONjnMkM9JWMnY S2ig== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=iMtrFaOx5zO3RN/AAutoljB+onBiD3BJRHs5f2zZfww=; b=o669tte2EqOu22/cGBsSzYwSHTrSeT9llGEqF2uGfrEm8vak3MKfPetoKHoL2fFVqu c2SO0axLLMQAED1cy4nguy9fRo3E0z+ruBrKsTLvWcz8nbvmrG36vJItCOVEcKAAGP+0 reIfIsTlo7qGEkgIwEU6JYkqHVWId+8fAMkxwbKPuuBNLBjJcghMhleY+O5GrQO84qsJ uKtzX1eJH3w1w2pdb2Ap3cwg4AS6xaRZoc+KDaxLm5L6FLqXXsO20hTYiaxqirJioVLj pRKFehTu9GgqOtWdQYp9cor+797IfHCsfLLf7Jb90q0mUVQaEkxiRhtvwiK36EciVgHL qilw== X-Gm-Message-State: APjAAAXfujR4TQ5JS7LY+di9+FD3v0Y8Rgi99PZ22mABuPmhViCTNunT /bSIGftguFomgDDJhBcQM3B633Xz/7kNs3HTgfg= X-Received: by 2002:ac2:555c:: with SMTP id l28mr6129545lfk.52.1576168319470; Thu, 12 Dec 2019 08:31:59 -0800 (PST) MIME-Version: 1.0 References: <20191212135406.26229-1-pdurrant@amazon.com> In-Reply-To: <20191212135406.26229-1-pdurrant@amazon.com> From: Jason Andryuk Date: Thu, 12 Dec 2019 11:31:48 -0500 Message-ID: Subject: Re: [Xen-devel] [PATCH net-next] xen-netback: get rid of old udev related code To: Paul Durrant Cc: xen-devel , netdev@vger.kernel.org, open list , Wei Liu , "David S. Miller" Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, Dec 12, 2019 at 8:56 AM Paul Durrant wrote: > > In the past it used to be the case that the Xen toolstack relied upon > udev to execute backend hotplug scripts. However this has not been the > case for many releases now and removal of the associated code in > xen-netback shortens the source by more than 100 lines, and removes much > complexity in the interaction with the xenstore backend state. > > NOTE: xen-netback is the only xenbus driver to have a functional uevent() > method. The only other driver to have a method at all is > pvcalls-back, and currently pvcalls_back_uevent() simply returns 0. > Hence this patch also facilitates further cleanup. > > Signed-off-by: Paul Durrant > --- > Cc: Wei Liu > Cc: "David S. Miller" > --- > drivers/net/xen-netback/common.h | 11 --- > drivers/net/xen-netback/xenbus.c | 125 ++++--------------------------- > 2 files changed, 14 insertions(+), 122 deletions(-) > > diff --git a/drivers/net/xen-netback/common.h b/drivers/net/xen-netback/common.h > index 05847eb91a1b..e48da004c1a3 100644 > -static inline void backend_switch_state(struct backend_info *be, > - enum xenbus_state state) > -{ > - struct xenbus_device *dev = be->dev; > - > - pr_debug("%s -> %s\n", dev->nodename, xenbus_strstate(state)); > - be->state = state; > - > - /* If we are waiting for a hotplug script then defer the > - * actual xenbus state change. > - */ > - if (!be->have_hotplug_status_watch) > - xenbus_switch_state(dev, state); have_hotplug_status_watch prevents xen-netback from switching to connected state unless the the backend scripts have written "hotplug-status" "success". I had always thought that was intentional so the frontend doesn't connect when the backend is unconnected. i.e. if the backend scripts fails, it writes "hotplug-status" "error" and the frontend doesn't connect. That behavior is independent of using udev to run the scripts. I'm not opposed to removing it, but I think it at least warrants mentioning in the commit message. Regards, Jason