Received: by 2002:a05:6a10:1287:0:0:0:0 with SMTP id d7csp3854227pxv; Mon, 19 Jul 2021 10:18:45 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxMKvevRlbUjo6Hnm1UszdSVK7x0qpqmCqNUUKLAVBEYGpuYzsnq9cm6HRQKYPU1bm3QlVL X-Received: by 2002:a17:906:1701:: with SMTP id c1mr28032037eje.425.1626715125013; Mon, 19 Jul 2021 10:18:45 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1626715125; cv=none; d=google.com; s=arc-20160816; b=xGcpbG80liBvgYRq88msdqF7HPtzmEHKQE+ms6hXB4ffh7ueyOcB9GEpFWeycTLZrL gl9YJdMGZZNYsqYJd/65ivVq4+d2rfp+f+WIo7noAqfommxpHQsoSrRT8RWZIU2ySfDf ZWhjgYj0jts/uqYAzB19mijleaLgu8faaRvLVY0EQFXsv2Actb29DGx4gFLk1OkOoDPa IJVdTlyLu9a259bvxAQBnVa+uLIxDAitXmsYSxXOEESbc1Ga5+YC2PGaRy35IyCsFsew RMyhFedtHvxtjk8RTW4d3tTwow1V/2j4qDMRvx4P8addOUouWAz5COGeF8ce+xw+g6UU /XQA== 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=ZMnX9FqBbA4TMilLTZuzK8VojxMapIRz2Vir82Tc4qY=; b=TlX2gYxCql0j99PdnNI7vMDLyimf1OarxG/XSq6do1JYomWNz+PgUgUHwJq7e+f0BG G7INK8kv4u+gn7h3k1//EaRINJ4mHpbBKnvXViTuQ/sfaOrYbZ1EMh02AMqNJM8g68i2 rxEGclO1rc07VwmxURWKW7nUQtWFbztP8chot5aFUdDpxqlA2F3nKYqrI3CaNQS6rgIB PWH0LjXtI4lgp1MzIHSvIB/djWQa8vI3yH+aohJEBDqkx4dbaSjkzGi0QFY/mNnJBbPz ERXMz2be0p9+Q/bzkcyf0I86dd+kUAi0BoW8QsNa3jdh63cSiJT2cMiR/E9L5+kCzSHd UYPA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=E8gEHKbN; 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 d21si22073319edx.270.2021.07.19.10.18.22; Mon, 19 Jul 2021 10:18:45 -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=E8gEHKbN; 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 S1353158AbhGSQe4 (ORCPT + 99 others); Mon, 19 Jul 2021 12:34:56 -0400 Received: from mail.kernel.org ([198.145.29.99]:60842 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1347651AbhGSPUF (ORCPT ); Mon, 19 Jul 2021 11:20:05 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id 9DCFF613F0; Mon, 19 Jul 2021 15:58:59 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1626710340; bh=P8e+ShoRwLeoF66Z95i3SG0vjKAU/TvEdnamc2iqn0M=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=E8gEHKbNcaXphARdG/g++zngO0sdZ12P5uaMYy+ppOQPml9/YD+ZXiVEgGKcKIDZs vTP3h4I0nGf5bII5LKodJp6Lyhp5Sp83sx9UmH9qbhIwELeWbVJNCDmHZuTYIviipA ZbY8IEizPLE09FQDwSzOLbyaYAdssjKige2qshtM= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Eli Cohen , "Michael S. Tsirkin" , Jason Wang , Sasha Levin Subject: [PATCH 5.10 174/243] vdpa/mlx5: Fix umem sizes assignments on VQ create Date: Mon, 19 Jul 2021 16:53:23 +0200 Message-Id: <20210719144946.525086306@linuxfoundation.org> X-Mailer: git-send-email 2.32.0 In-Reply-To: <20210719144940.904087935@linuxfoundation.org> References: <20210719144940.904087935@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: Eli Cohen [ Upstream commit e3011776af16caf423f2c36d0047acd624c274fa ] Fix copy paste bug assigning umem1 size to umem2 and umem3. The issue was discovered when trying to use a 1:1 MR that covers the entire address space where firmware complained that provided sizes are not large enough. 1:1 MRs are required to support virtio_vdpa. Fixes: 1a86b377aa21 ("vdpa/mlx5: Add VDPA driver for supported mlx5 devices") Signed-off-by: Eli Cohen Link: https://lore.kernel.org/r/20210530090317.8284-1-elic@nvidia.com Signed-off-by: Michael S. Tsirkin Acked-by: Jason Wang Signed-off-by: Sasha Levin --- drivers/vdpa/mlx5/net/mlx5_vnet.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/vdpa/mlx5/net/mlx5_vnet.c b/drivers/vdpa/mlx5/net/mlx5_vnet.c index 8af30d07f688..ef76cfedcd79 100644 --- a/drivers/vdpa/mlx5/net/mlx5_vnet.c +++ b/drivers/vdpa/mlx5/net/mlx5_vnet.c @@ -814,9 +814,9 @@ static int create_virtqueue(struct mlx5_vdpa_net *ndev, struct mlx5_vdpa_virtque MLX5_SET(virtio_q, vq_ctx, umem_1_id, mvq->umem1.id); MLX5_SET(virtio_q, vq_ctx, umem_1_size, mvq->umem1.size); MLX5_SET(virtio_q, vq_ctx, umem_2_id, mvq->umem2.id); - MLX5_SET(virtio_q, vq_ctx, umem_2_size, mvq->umem1.size); + MLX5_SET(virtio_q, vq_ctx, umem_2_size, mvq->umem2.size); MLX5_SET(virtio_q, vq_ctx, umem_3_id, mvq->umem3.id); - MLX5_SET(virtio_q, vq_ctx, umem_3_size, mvq->umem1.size); + MLX5_SET(virtio_q, vq_ctx, umem_3_size, mvq->umem3.size); MLX5_SET(virtio_q, vq_ctx, pd, ndev->mvdev.res.pdn); if (MLX5_CAP_DEV_VDPA_EMULATION(ndev->mvdev.mdev, eth_frame_offload_type)) MLX5_SET(virtio_q, vq_ctx, virtio_version_1_0, 1); -- 2.30.2