Received: by 2002:ac0:a5a6:0:0:0:0:0 with SMTP id m35-v6csp2501443imm; Mon, 24 Sep 2018 05:32:56 -0700 (PDT) X-Google-Smtp-Source: ACcGV61dvoi7M3fjLLVTloneK2SfQbhMd2OpFXYSiGxorR0CPuzWKt9+4pgT7Jz8y5cTl9vU6pgq X-Received: by 2002:a17:902:6ac7:: with SMTP id i7-v6mr10621105plt.153.1537792376337; Mon, 24 Sep 2018 05:32:56 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1537792376; cv=none; d=google.com; s=arc-20160816; b=ESZswAHv0AOo6Nu1g1UfaI9iOa7h7QeSuLZWEGP5qKnj6kDoVQLe4uq18BZ/cWRM08 dYd5piT1Q/NMjU8UsUGHQEPlnZvnG7BqdKHQSP59VXG6znKxlNmtQIMWZwkZIdssWsrt uh0+h5T5dkz3fThSV/RRM4e590IAaNo4fHrIe4YOfWGZOmU65/EdeWRRAAWi9+5MZjRA c3Svro5RdKC27GrS7DQLYyg4RZVWQFHw+tnjHSEHllPWliht37+Vq4QRvkLQs+wdqxzE IwHPscS/gDdSBERlbo6IMYV3c18iXKtZXzW8XoeT0eIIwHKVLTok9Y/QOZx10Hg7AiX9 GT8A== 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 :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from; bh=reGvI0LWdzapyTqB7HNTQ57KiPgz8/U0Kkj1REpKAM8=; b=yMbhdvNbb4Vh168iV0+lAMaM3o/zhHFU0COgHvQUqYv0qPFWjsozovQqwtHb1oV6th svrBrxfWcdsIxlK0w5XAG/vwbgrHrWmc9NLC9dx9E/d4i+2ITpm1pK5MWJpgOhX9pVkQ e0D+BGopHbpBX4Fx709ikt1Qx629UDCdPj4qCmYApLjncESARhjbAOiQ560YrXCq7+qa lV0IbJLE8XKjvv/5GcEJRfUnkLVwRpVFJdJWLOFA+qvGtGgkGSnC+0jxX8dnRpbBFeCw jifZK/y+Ghdt4s1VKGpRPYRRuB2QB/9bGfbz2I5X0+a0FQpSODK/c3/VbDKvmuom7q9t eCxg== 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 a10-v6si9363547pgk.365.2018.09.24.05.32.41; Mon, 24 Sep 2018 05:32:56 -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; 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 S2388047AbeIXSd3 (ORCPT + 99 others); Mon, 24 Sep 2018 14:33:29 -0400 Received: from mail.linuxfoundation.org ([140.211.169.12]:57986 "EHLO mail.linuxfoundation.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1730369AbeIXSd2 (ORCPT ); Mon, 24 Sep 2018 14:33:28 -0400 Received: from localhost (ip-213-127-77-73.ip.prioritytelecom.net [213.127.77.73]) by mail.linuxfoundation.org (Postfix) with ESMTPSA id 451A41099; Mon, 24 Sep 2018 12:31:33 +0000 (UTC) From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Vitaly Kuznetsov , Ross Lagerwall , "David S. Miller" , Sasha Levin Subject: [PATCH 4.18 078/235] xen-netfront: fix queue name setting Date: Mon, 24 Sep 2018 13:51:04 +0200 Message-Id: <20180924113112.929834603@linuxfoundation.org> X-Mailer: git-send-email 2.19.0 In-Reply-To: <20180924113103.999624566@linuxfoundation.org> References: <20180924113103.999624566@linuxfoundation.org> User-Agent: quilt/0.65 X-stable: review MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 4.18-stable review patch. If anyone has any objections, please let me know. ------------------ From: Vitaly Kuznetsov [ Upstream commit 2d408c0d4574b01b9ed45e02516888bf925e11a9 ] Commit f599c64fdf7d ("xen-netfront: Fix race between device setup and open") changed the initialization order: xennet_create_queues() now happens before we do register_netdev() so using netdev->name in xennet_init_queue() is incorrect, we end up with the following in /proc/interrupts: 60: 139 0 xen-dyn -event eth%d-q0-tx 61: 265 0 xen-dyn -event eth%d-q0-rx 62: 234 0 xen-dyn -event eth%d-q1-tx 63: 1 0 xen-dyn -event eth%d-q1-rx and this looks ugly. Actually, using early netdev name (even when it's already set) is also not ideal: nowadays we tend to rename eth devices and queue name may end up not corresponding to the netdev name. Use nodename from xenbus device for queue naming: this can't change in VM's lifetime. Now /proc/interrupts looks like 62: 202 0 xen-dyn -event device/vif/0-q0-tx 63: 317 0 xen-dyn -event device/vif/0-q0-rx 64: 262 0 xen-dyn -event device/vif/0-q1-tx 65: 17 0 xen-dyn -event device/vif/0-q1-rx Fixes: f599c64fdf7d ("xen-netfront: Fix race between device setup and open") Signed-off-by: Vitaly Kuznetsov Reviewed-by: Ross Lagerwall Signed-off-by: David S. Miller Signed-off-by: Sasha Levin Signed-off-by: Greg Kroah-Hartman --- drivers/net/xen-netfront.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) --- a/drivers/net/xen-netfront.c +++ b/drivers/net/xen-netfront.c @@ -1610,7 +1610,7 @@ static int xennet_init_queue(struct netf timer_setup(&queue->rx_refill_timer, rx_refill_timeout, 0); snprintf(queue->name, sizeof(queue->name), "%s-q%u", - queue->info->netdev->name, queue->id); + queue->info->xbdev->nodename, queue->id); /* Initialise tx_skbs as a free chain containing every entry. */ queue->tx_skb_freelist = 0;