Received: by 2002:ab2:6857:0:b0:1ef:ffd0:ce49 with SMTP id l23csp2405180lqp; Sun, 24 Mar 2024 18:09:19 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCUYr4Ueh6rW5CON9dK+FURaKMmYOwFiFocqxJlASEuVHnGyPAO6i7ouGJf2SVkOWd8znEQlwLQvjKcGnZJglZwyvfltT8Ta3Zy+UNhtmQ== X-Google-Smtp-Source: AGHT+IHkw/HV2J4/YXks0CNfnKMjCBO8++B6IzEDf4Amf0QJ9N6UQ6fmqoy3AB0TJDucm2uZrcVW X-Received: by 2002:a17:90a:5d07:b0:29b:a9b2:f98c with SMTP id s7-20020a17090a5d0700b0029ba9b2f98cmr3345477pji.24.1711328959450; Sun, 24 Mar 2024 18:09:19 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1711328959; cv=pass; d=google.com; s=arc-20160816; b=nnyzvQjnkhFYuvI7mI2SWIbfeNDUpzKlBrWKej4lS8AEB7AsuUPGvN7QpuAa2oR56b cgqyrXQOFN6KCLcz9plxQX4o3Lh0gs/G+jiiojNhBFC6zR0W3OTOn/Fp0rS76hQT13py qfPeNAl+N18dzHuXCk24cwY9dDuTsdltaXiYqrUsUdDhthbQlphnM6rLEPIOyHWSJnSW +1vTN6NUOODwVgYIENInO1Mmm/Oo+ZosumtVu3VzSh5O9EGhKfBjtEjlU4R65f6AvUuE kmznmW+uL3sT/Zdv7Mbopn2v1q6h7aOFUEKfpkJa3pnHWP2Xl62sZ/IbIAL32rK/TxRI ogJg== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:references:in-reply-to:message-id :date:subject:cc:to:from:dkim-signature; bh=K2EWDe9xRdyl54/r269eMASdXFLxdtd3IZCWCMKq1Xg=; fh=UZBjq8x3IS5QFVi63dcFeSlw7nCVoeaE32RVP//6mHo=; b=sXIfSH0fbH9zAZYEBxpnrJXC3Y34UZQKaBvMhyB9qZZcma+fsPUp7Pb6D4dbCFjauJ bfZvY4Si3wZgW3G1+91TSIFMV7k8adZSXHlwtwpXITzaFal/lo83HbYbGxyU5yjvR8i+ Ym6slbi8JadUwJNqUzAsEbFP2fdfMi45RiQpB/Y9rX117w2hMObYyaiMsVw0e8yomj5t w5+ogrT7bh8vAjX0KDYV1vbcDDOkovR8UHTsLNeDS6uCFLWHP2Ds9fHBX4yiowMeQ2dp 9+QUAZlxCrkKIhG8LfhQogPIyIjmL61SNl/YBkeVrWwtPe+h7EUILEx6SB8pkVrvao2S xwvg==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=jBTPzhtM; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-113585-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-113585-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [2604:1380:45e3:2400::1]) by mx.google.com with ESMTPS id p4-20020a17090a868400b0029b744a3e48si3996842pjn.119.2024.03.24.18.09.19 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 24 Mar 2024 18:09:19 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-113585-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) client-ip=2604:1380:45e3:2400::1; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=jBTPzhtM; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-113585-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-113585-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by sv.mirrors.kernel.org (Postfix) with ESMTPS id 217C62804D0 for ; Mon, 25 Mar 2024 01:09:19 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 858BC1CADB6; Sun, 24 Mar 2024 22:46:29 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="jBTPzhtM" Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id A16C41C9856; Sun, 24 Mar 2024 22:46:28 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1711320388; cv=none; b=onJV9HFP+Vr7qxgRzNzTFXpkty9NXcfC87HMIBtsjOSyzwTKukl6JC3UNB/9h7D2GBh1MkRGM7uBTvkZVTorVL2fn7WDZDNIaVoo9k1Rm9zkBPGWuGTHaDLesfVqqJOSYRku8ImQe7lWjvEqtC1XVuD453ec2ghAfxDg+Ls35zY= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1711320388; c=relaxed/simple; bh=8XXbG/EChvRgni9pSje66q6hAnBQVFirBzqxkCwPY/E=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=rL3mlBkfT7msyb8tuxnZxGYKE/0+bxm50QHfaF7xU4ZeSghQ+lTVd0rbp25Bv0TFVSkQPkqOyVII6GIORkooDES98kcjN76l9GSskFeWsHRfRxxiv/Lop26N8kmOrSCQ0xCUPT5jWiuVJBp8IwyGyPHDpp202OpCJQv4ANv1Du0= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=jBTPzhtM; arc=none smtp.client-ip=10.30.226.201 Received: by smtp.kernel.org (Postfix) with ESMTPSA id D7680C433B1; Sun, 24 Mar 2024 22:46:27 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1711320388; bh=8XXbG/EChvRgni9pSje66q6hAnBQVFirBzqxkCwPY/E=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=jBTPzhtMmlVSJVYKapvMYjkRe5ip62x+gm8dNqB9WL9AAsg9+VGKolaVis28h6KT3 op7+tsq/i6KXDsCN+D+K+JBsXThl++EW/c41gVcQwpHRAKF2DoRgiL10Qw6Q/xJlGY M+tJcQAoygTNgMXW32+GwshU5dOwHfe9LBTxYPCCKTLXXF6CHBHVkKVLgweb70p7zC aZndLSFlLx0AvyLpZfj5vRyBpH4zfReyG/v3PkbEcnWPcdOG+K8NJBctQcyhO3XZOc WUfPW3eWEkG+/DBLXSNQZ6KNZuDi1oal7GgL2xFDnVKh3ySGQxe4eZHJLe8PqB7LL9 A5qNceoD0azRA== From: Sasha Levin To: linux-kernel@vger.kernel.org, stable@vger.kernel.org Cc: Subbaraya Sundeep , "David S . Miller" , Sasha Levin Subject: [PATCH 6.8 694/715] octeontx2-pf: Use default max_active works instead of one Date: Sun, 24 Mar 2024 18:34:33 -0400 Message-ID: <20240324223455.1342824-695-sashal@kernel.org> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20240324223455.1342824-1-sashal@kernel.org> References: <20240324223455.1342824-1-sashal@kernel.org> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-stable: review X-Patchwork-Hint: Ignore Content-Transfer-Encoding: 8bit From: Subbaraya Sundeep [ Upstream commit 7558ce0d974ced1dc07edc1197f750fe28c52e57 ] Only one execution context for the workqueue used for PF and VFs mailbox communication is incorrect since multiple works are queued simultaneously by all the VFs and PF link UP messages. Hence use default number of execution contexts by passing zero as max_active to alloc_workqueue function. With this fix in place, modify UP messages also to wait until completion. Fixes: d424b6c02415 ("octeontx2-pf: Enable SRIOV and added VF mbox handling") Signed-off-by: Subbaraya Sundeep Signed-off-by: David S. Miller Signed-off-by: Sasha Levin --- drivers/net/ethernet/marvell/octeontx2/nic/otx2_pf.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/drivers/net/ethernet/marvell/octeontx2/nic/otx2_pf.c b/drivers/net/ethernet/marvell/octeontx2/nic/otx2_pf.c index 3c8841b35d0f7..f85d38fab3211 100644 --- a/drivers/net/ethernet/marvell/octeontx2/nic/otx2_pf.c +++ b/drivers/net/ethernet/marvell/octeontx2/nic/otx2_pf.c @@ -584,8 +584,9 @@ static int otx2_pfvf_mbox_init(struct otx2_nic *pf, int numvfs) if (!pf->mbox_pfvf) return -ENOMEM; - pf->mbox_pfvf_wq = alloc_ordered_workqueue("otx2_pfvf_mailbox", - WQ_HIGHPRI | WQ_MEM_RECLAIM); + pf->mbox_pfvf_wq = alloc_workqueue("otx2_pfvf_mailbox", + WQ_UNBOUND | WQ_HIGHPRI | + WQ_MEM_RECLAIM, 0); if (!pf->mbox_pfvf_wq) return -ENOMEM; @@ -3146,7 +3147,7 @@ static void otx2_vf_link_event_task(struct work_struct *work) otx2_mbox_wait_for_zero(&pf->mbox_pfvf[0].mbox_up, vf_idx); - otx2_mbox_msg_send_up(&pf->mbox_pfvf[0].mbox_up, vf_idx); + otx2_sync_mbox_up_msg(&pf->mbox_pfvf[0], vf_idx); mutex_unlock(&pf->mbox.lock); } -- 2.43.0