Received: by 2002:a05:6a10:206:0:0:0:0 with SMTP id 6csp2680353pxj; Mon, 31 May 2021 08:07:05 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwpyaaXyRIMaEwTsklJLM4MO2/oOgfQLyD0Y/pqpLospJRtVHjDpG2gaEqdEjFPcsEU8pec X-Received: by 2002:a05:6402:22f9:: with SMTP id dn25mr1425965edb.241.1622473625436; Mon, 31 May 2021 08:07:05 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1622473625; cv=none; d=google.com; s=arc-20160816; b=PQkFGZnW5lvwWKg4KpHZGGbFKVTdETjb/dps+zn0OrTdUFPuRCzlXGstpI6TXbyGv6 vIajKttALry4TWAONyHe23N4VekGFdbmPZsZwKiXSiLuE9Q0YuICVc0OwVrA5xmhizn5 Kzvr9cz2hZi8h3RKvIayP2alSZjlwUUYeUlnOXEaoaraNEaOm4x/OUh4lH/JxcA9w5oU w7NeldGtZ35PgwGGiV4KXU60lf924yMQYw3k8AfpAN0Km3STfrXy4UhdrlVPiRDySgev FV+LT92MHMd8JKb8ALIiCYVZBK7BUqpl3p+SQSQP6NLVlxigFrAybv0DvRVmlOVfrcP4 25zg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=LPbvzsge4G2OCsjJH9EPsJe4lRIHW1biSk5fMAxqdDk=; b=Efpwc94yXq92H31yfT3NkwIPAB2cS4Eeekz2nCejaFgsi5DuOLdPxMtWOoFbcVvyoY JL7+fVwS2lfVJ9LXtoXl4q4CLA/RYEulGbBmF38CjbYgFLVZmzh9nWbLZb+YMMR6qca2 vURi6mZ1+YWb8zHq0GrC6bkxXM6Xfl8YPQFD1YgEzsnPGFXIZvqWDCXhwiroaQRWCM0F FWfN1PqiySN79Q6YMj9GiFz66yes1I85oErBZ1YP9yRmJy6chCw4WLSj0HL6CThzs5np xEou4zIGQX+1GQrenfzoZre1PtWkrdbMr2ttjpkIxzhEJGIyogepm5o6hMH7fBJTOFv6 m/ZA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=O2UeVDuW; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id o18si13118426edt.176.2021.05.31.08.06.43; Mon, 31 May 2021 08:07:05 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=O2UeVDuW; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231778AbhEaPFZ (ORCPT + 99 others); Mon, 31 May 2021 11:05:25 -0400 Received: from mail.kernel.org ([198.145.29.99]:40254 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232341AbhEaOHg (ORCPT ); Mon, 31 May 2021 10:07:36 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id 5DBA061405; Mon, 31 May 2021 13:39:29 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1622468369; bh=b0wgViPQB62Zz0Ho4NTuz2MDL+XfHpFWYHJINEimzRE=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=O2UeVDuW85SlPBitz6ozI+uAubNtguGaAm4/aj8KoxfhETy63Ah3X+2gRLGS7VBmx BOkXqXYUpY2MakSj2ZLZaLHuK+it+5MBI2fpugJkZhUfmHNjrfR4G2IaJYPl6lC/9/ Vefc53zssoR6iV2VW+KZCXpuSqZ1f6ad861oTyXQ= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, David Awogbemila , Willem de Bruijn , "David S. Miller" , Sasha Levin Subject: [PATCH 5.10 217/252] gve: Update mgmt_msix_idx if num_ntfy changes Date: Mon, 31 May 2021 15:14:42 +0200 Message-Id: <20210531130705.385987602@linuxfoundation.org> X-Mailer: git-send-email 2.31.1 In-Reply-To: <20210531130657.971257589@linuxfoundation.org> References: <20210531130657.971257589@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: David Awogbemila [ Upstream commit e96b491a0ffa35a8a9607c193fa4d894ca9fb32f ] If we do not get the expected number of vectors from pci_enable_msix_range, we update priv->num_ntfy_blks but not priv->mgmt_msix_idx. This patch fixes this so that priv->mgmt_msix_idx is updated accordingly. Fixes: f5cedc84a30d ("gve: Add transmit and receive support") Signed-off-by: David Awogbemila Acked-by: Willem de Bruijn Signed-off-by: David S. Miller Signed-off-by: Sasha Levin --- drivers/net/ethernet/google/gve/gve_main.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/net/ethernet/google/gve/gve_main.c b/drivers/net/ethernet/google/gve/gve_main.c index 02e7d74779f4..a8fcf1227391 100644 --- a/drivers/net/ethernet/google/gve/gve_main.c +++ b/drivers/net/ethernet/google/gve/gve_main.c @@ -220,6 +220,7 @@ static int gve_alloc_notify_blocks(struct gve_priv *priv) int vecs_left = new_num_ntfy_blks % 2; priv->num_ntfy_blks = new_num_ntfy_blks; + priv->mgmt_msix_idx = priv->num_ntfy_blks; priv->tx_cfg.max_queues = min_t(int, priv->tx_cfg.max_queues, vecs_per_type); priv->rx_cfg.max_queues = min_t(int, priv->rx_cfg.max_queues, -- 2.30.2