From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-pf1-f193.google.com (mail-pf1-f193.google.com [209.85.210.193]) by dpdk.org (Postfix) with ESMTP id A9A1A5B40 for ; Fri, 7 Dec 2018 20:18:44 +0100 (CET) Received: by mail-pf1-f193.google.com with SMTP id w73so2372883pfk.10 for ; Fri, 07 Dec 2018 11:18:44 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=networkplumber-org.20150623.gappssmtp.com; s=20150623; h=date:from:to:cc:subject:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=Hox55f3daPQk5Cdw7DKqHrBu/9pH0Z5lZ5TAc8ujkUc=; b=s1IkWNpeRRdZrUuZbVlYoBDe/WJ8CxOMqefoejJiiotzFPY18R9lUC9TGNoBZqoPnf u6yFWzhbJslC2AwbzrA4i6EeFSugFoKRAn7/odjHBT2+FUh5FLWfaTVcPHXuYmNgdsd5 ZT4Sp7CT2Y9MTP7TgYFQQYCc2H0Mc9HSYKDjDRBKyjduh/9FXeBmf54H6DQA947Do1xX 3ETpq37u6PyZkHk3fv0Av6e/IBejMwY19wdMXOt02siUydW3XolDKizQFCR8yo8c+BrK /p6kIa16bXuwBgJIYFkUIw+XPnw42/05mDKhkBsTBZ8zLVlpODFNncwCV/bIoyUYcAzW aqeg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=Hox55f3daPQk5Cdw7DKqHrBu/9pH0Z5lZ5TAc8ujkUc=; b=NQTfvn5u6Ycv9R13gbqNn58+guzOV4sQBIZ1pOfnNG6it5cXmyNE5ANOZS8eVZ8Zem ZaIltHuOhoAkdEOP9QQpt/OTwfu7WUetd+UCTORTU19SvUibxjzx8mBWps4Qg48Dhn7t o24vAjxru2zegVIxtQV0UXdjdFpZ85/s0jRaDA4jwmeWAGArFY9hgh3CIy8xb1E84hdE wWo25iUl7WKvefyBzH8ST+Lx35usFxOShyBBAssZrcXCnTKuiEfWLMcnlCE6OeelMPpJ gL1BX7Ms6IgOvVukME/YIdg0pI2adFmhKdMf0CPNQv5wyu/8FOAFt1VzzspG7aNCSsNI EZtg== X-Gm-Message-State: AA+aEWaWnnmUO0G1rQCKIKo1IkOkxKm2CrXReGylR31EoM0CFHyBWIVj 4DV+NigPJkR3ZLP2wwMaDs6diw== X-Google-Smtp-Source: AFSGD/XKmZV7v7WKimKOn0fG5md39DxrXMIdyAUPEIwUAXpUjrkqBH1wZkqlzNB5Pvpk8uYfeabicA== X-Received: by 2002:a63:cf56:: with SMTP id b22mr2852695pgj.336.1544210323477; Fri, 07 Dec 2018 11:18:43 -0800 (PST) Received: from xeon-e3 (204-195-22-127.wavecable.com. [204.195.22.127]) by smtp.gmail.com with ESMTPSA id 4sm10445857pfq.10.2018.12.07.11.18.43 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Fri, 07 Dec 2018 11:18:43 -0800 (PST) Date: Fri, 7 Dec 2018 11:18:40 -0800 From: Stephen Hemminger To: Mohammed Gamal Cc: dev@dpdk.org, maxime coquelin , Yuhui Jiang , Wei Shi Message-ID: <20181207111841.29450b51@xeon-e3> In-Reply-To: <1544181343.5629.1.camel@redhat.com> References: <1543575881.5400.33.camel@redhat.com> <20181130102756.41332fc2@xeon-e3> <1879110132.59852748.1543604812639.JavaMail.zimbra@redhat.com> <20181204084858.03ecdf98@shemminger-XPS-13-9360> <1543942571.5400.38.camel@redhat.com> <20181205143238.5b4b1ae7@xeon-e3> <1544181343.5629.1.camel@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Subject: Re: [dpdk-dev] Problems running netvsc multiq X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 07 Dec 2018 19:18:44 -0000 On Fri, 07 Dec 2018 13:15:43 +0200 Mohammed Gamal wrote: > On Wed, 2018-12-05 at 14:32 -0800, Stephen Hemminger wrote: > > The problem is a regression in 4.20 kernel. Bisecting now. =20 >=20 > I was bisecting the kernel and the change that seems to introduce this > regression is this one: >=20 > commit ae6935ed7d424ffa74d634da00767e7b03c98fd3 > Author: Stephen Hemminger > Date:=C2=A0=C2=A0=C2=A0Fri Sep 14 09:10:17 2018 -0700 >=20 > =C2=A0=C2=A0=C2=A0=C2=A0vmbus: split ring buffer allocation from open > =C2=A0=C2=A0=C2=A0=C2=A0 > =C2=A0=C2=A0=C2=A0=C2=A0The UIO driver needs the ring buffer to be persis= tent(reused) > =C2=A0=C2=A0=C2=A0=C2=A0across open/close. Split the allocation and setup= of ring buffer > =C2=A0=C2=A0=C2=A0=C2=A0out of vmbus_open. For normal usage vmbus_open/vm= bus_close there > =C2=A0=C2=A0=C2=A0=C2=A0are no changes; only impacts uio_hv_generic which= needs to keep > =C2=A0=C2=A0=C2=A0=C2=A0ring buffer memory and reuse when application res= tarts. > =C2=A0=C2=A0=C2=A0=C2=A0 > =C2=A0=C2=A0=C2=A0=C2=A0Signed-off-by: Stephen Hemminger > =C2=A0=C2=A0=C2=A0=C2=A0Signed-off-by: Greg Kroah-Hartman >=20 Patch posted:=20 =46rom stephen@networkplumber.org Fri Dec 7 10:58:47 2018 From: Stephen Hemminger Subject: [PATCH] vmbus: fix subchannel removal The changes to split ring allocation from open/close, broke the cleanup of subchannels. This resulted in problems using uio on network devices because the subchannel was left behind when the network device was unbound. The cause was in the disconnect logic which used list splice to move the subchannel list into a local variable. This won't work because the subchannel list is needed later during the process of the rescind messages (relid2channel). The fix is to just leave the subchannel list in place which is what the original code did. The list is cleaned up later when the host rescind is processed. Fixes: ae6935ed7d42 ("vmbus: split ring buffer allocation from open") Signed-off-by: Stephen Hemminger --- drivers/hv/channel.c | 10 +--------- 1 file changed, 1 insertion(+), 9 deletions(-) diff --git a/drivers/hv/channel.c b/drivers/hv/channel.c index fe00b12e4417..bea4c9850247 100644 --- a/drivers/hv/channel.c +++ b/drivers/hv/channel.c @@ -701,20 +701,12 @@ static int vmbus_close_internal(struct vmbus_channel = *channel) int vmbus_disconnect_ring(struct vmbus_channel *channel) { struct vmbus_channel *cur_channel, *tmp; - unsigned long flags; - LIST_HEAD(list); int ret; =20 if (channel->primary_channel !=3D NULL) return -EINVAL; =20 - /* Snapshot the list of subchannels */ - spin_lock_irqsave(&channel->lock, flags); - list_splice_init(&channel->sc_list, &list); - channel->num_sc =3D 0; - spin_unlock_irqrestore(&channel->lock, flags); - - list_for_each_entry_safe(cur_channel, tmp, &list, sc_list) { + list_for_each_entry_safe(cur_channel, tmp, &channel->sc_list, sc_list) { if (cur_channel->rescind) wait_for_completion(&cur_channel->rescind_event); =20 --=20 2.19.2