Received: by 2002:ac0:a5a6:0:0:0:0:0 with SMTP id m35-v6csp2486462imm; Mon, 24 Sep 2018 05:19:13 -0700 (PDT) X-Google-Smtp-Source: ANB0VdYtive/OUfVr2IEJ8E+SRD+egGTh7Tz4kHOn69CWFxM+TXJGBjZ4L/ofMH7Lzr7R+/EnM/6 X-Received: by 2002:a62:1b44:: with SMTP id b65-v6mr5504828pfb.172.1537791552991; Mon, 24 Sep 2018 05:19:12 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1537791552; cv=none; d=google.com; s=arc-20160816; b=tN90L4YUyBhWaO3yncm7pRIclJ/XCupEjX/pRdKdANZLhjXBJycaHKENGj5pAc70HS b6yfuK8jMFPROREXUlA+iEJGqTS+Dqr/aaYjSkpFQd8F2ITYfX3nvU9eCcJdBNtKTEjQ b7HZiEq9na+TAtlTEW0yzOBXGc0nuVK0AiESY1LlZmoGFp6Rop6cnDSNNEsI8wXW/W0B 1LQRdXLFb4qpXzj2U1+e1ldG2yKYYLYCR/1vtR2nw/c/ChUB+lKC6US1QlOsFhX0ABAw Z/7ItzxyfHM8NqdltoafQIl4PANb+m7L5v3v5TfdsTUpqR5hdUSd/QQOpS2+hawt5vM1 fd2g== 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=89k55XRevoRCXjchvhBUWfeK4ALeQHgOyG1ejTZxi5U=; b=KZFy/id1UzmTly8NGE7+JDxDShnM43aFw6G2v7p2+R6ATIYA5XpStpUMa/Wv5fnMy4 qOHUUTxAkr4LadWtxbqZe5kOZjYcyMnzYdHNerOSMPiVfmINqAucnORVTuofXbWMfXO8 U7IJtM0830XrD6mkrlQFmtGsH//GaEO8jIzYJmO9sZngc8AuAvCWdo6FOOJKX2J3CeXO A0ONEcreYTHadPhgwycnDO4zGDBYhuExE1Ik3qBFmTH6WCbH9ieuif5v8qMy/Tzpv23d +3ZjfVcGDFklKy3jB4FVCDR6Gjp+T52LwO1AK4exfjCv3EiFmHjzfcT/kemYBHuaNbaZ 0HTg== 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 g70-v6si37719998pfe.4.2018.09.24.05.18.57; Mon, 24 Sep 2018 05:19:12 -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 S1732258AbeIXSS1 (ORCPT + 99 others); Mon, 24 Sep 2018 14:18:27 -0400 Received: from mail.linuxfoundation.org ([140.211.169.12]:55802 "EHLO mail.linuxfoundation.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1730180AbeIXSS0 (ORCPT ); Mon, 24 Sep 2018 14:18:26 -0400 Received: from localhost (ip-213-127-77-73.ip.prioritytelecom.net [213.127.77.73]) by mail.linuxfoundation.org (Postfix) with ESMTPSA id A9AE910A5; Mon, 24 Sep 2018 12:16:34 +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.14 060/173] xen-netfront: fix queue name setting Date: Mon, 24 Sep 2018 13:51:34 +0200 Message-Id: <20180924113120.433439519@linuxfoundation.org> X-Mailer: git-send-email 2.19.0 In-Reply-To: <20180924113114.334025954@linuxfoundation.org> References: <20180924113114.334025954@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.14-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 @@ -1611,7 +1611,7 @@ static int xennet_init_queue(struct netf (unsigned long)queue); 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;