Received: by 2002:a05:6a10:206:0:0:0:0 with SMTP id 6csp1729269pxj; Sun, 30 May 2021 01:23:19 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyMTstC6hQZRBTZhu+GHtJ64/N3isNNG0B8/kcLSoQ7mQ1PprlS2s19BCYvuP3uRcKP0ma9 X-Received: by 2002:aa7:dd10:: with SMTP id i16mr19248661edv.274.1622362999572; Sun, 30 May 2021 01:23:19 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1622362999; cv=none; d=google.com; s=arc-20160816; b=KyGsWX9LoUTF1kF1e7DUNXS0NfonpJstng+6RZvqbENh3eMYGTY/ZD+uB4Vr3qdka1 880JcrCxlhid+xlJj4oUpaTVgY37FE4bqsGP2nUa+ski9N9VOEizyPb2AHOP8IJiXlg4 k23terhQkQXwkO5NJ1nmlhcD/zH1pFBCdvs9Ffin/dNlMzcXmd0zhOh2PXj8gdXsh2qH myP/AckoX5cWVJTeF5XrCGWbAoge6rt58AwO6Q60haPBTpMZvK0iU+DkAt35JWO/OoEz ZMJw+KKpdQ/u9yQTCX/VQrNbRORJapn9rOMfyHwoyl9XODTp/Cju24jP+EOJ+ljYjhFe oBjg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=ZrzgekDde8XcJc+H0wAf58TmREEJyXT/86BNmij9h/4=; b=EDJXtB63tlHKAy/xolHA+r41zGCcCDy3VEiWvVpLirlbztXvBj6AWoP1JI70GDwnmN gLolRkfGZUqWo7gyHWb80Bj2FFDro3sH1S1+zSAX0a/1xPJYByMx+YPx3H1WBPUsAKxO 6hrLiW3Mo5L7jwIguFT8whvzXjBblsVuPJWuvHG5omoPNMdl8w4M5LElzC9UTYH1dOrD NwwyEWRuR9OjR+syBOZRGrzoVkv1OM9dRJgM3oKiyGriVOkIRNE4QVEZ6wq0bcrxsW5a 1jcM1EeVgKx2O6Tq0+OmFBJ1ehThW4lNWstb6B8QJvKxFrMbfE7GUGu8vNh1M0qwHk5Z L0Qg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=itUNNhgB; 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=redhat.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id s25si10927487edy.339.2021.05.30.01.22.56; Sun, 30 May 2021 01:23:19 -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=@redhat.com header.s=mimecast20190719 header.b=itUNNhgB; 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=redhat.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229579AbhE3IUr (ORCPT + 99 others); Sun, 30 May 2021 04:20:47 -0400 Received: from us-smtp-delivery-124.mimecast.com ([170.10.133.124]:58932 "EHLO us-smtp-delivery-124.mimecast.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229500AbhE3IUq (ORCPT ); Sun, 30 May 2021 04:20:46 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1622362748; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=ZrzgekDde8XcJc+H0wAf58TmREEJyXT/86BNmij9h/4=; b=itUNNhgBSg2msHcp2Pko0ofSgXhrLKvXx9A5dPkkILdQfixgOJY7G247TNeGjYNAV1ERAI 2ZOWTHdh1Sel4zb6ErFlAb6tvSzjGBfiueOHCIQ3YECfksKdtwG7mTAS0ad3BiYuAYn2Sv U8Ft1IVIKA+xlQ0hgIWjLkV1Q07IACg= Received: from mail-wm1-f71.google.com (mail-wm1-f71.google.com [209.85.128.71]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-140-QKNGqmITME2uPJc5EJcHVg-1; Sun, 30 May 2021 04:19:06 -0400 X-MC-Unique: QKNGqmITME2uPJc5EJcHVg-1 Received: by mail-wm1-f71.google.com with SMTP id h18-20020a05600c3512b029018434eb1bd8so3470374wmq.2 for ; Sun, 30 May 2021 01:19:06 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to; bh=ZrzgekDde8XcJc+H0wAf58TmREEJyXT/86BNmij9h/4=; b=KfLLZmoNSGd3vtXu6+Bq777cQ2J+/Cng2AJ4XdQISYSgnmaqtrekxs4MRApidyRLyV 4jB2GMTeDZjRaNPUxarJJA9Hvyvxp5p5pWuhRpp+6EpOL9xNf5TP7gMpC2z4Bou/2842 JSwreVTQU2fu9hOnJ7OCJBnZ4yhZqHzDkxQDTcrR98Eeco7cHeWNXY3TKKvl5YD2cgjJ /4/cW5ZmnqdiRILgpNTy0XHbxt1i1FLUYoGA79N5tdK9C76eRuCaD0h4pZdnzh/r2N18 JlwoGSLpFfqdUtoGzpxU0zR6QyG+/tIv8EZQkbosfxuYGHQRnxYulam5DrPz9MPKapgG TXLA== X-Gm-Message-State: AOAM530cOg1XT+XbgyekLghAN4vUAXkoJ2E256vDS+Xlh9uFPlvAqn4G TH4XYcTXzLdEaLWiIHobHsJqAqeu/jFj5BJbTif3osfnScx93flY/AcOJG0Y+eO5MBWYQ2w4y5v /aJllT0o6FnTKPM0PxxOuvZPq X-Received: by 2002:a1c:dcd7:: with SMTP id t206mr9401686wmg.121.1622362745454; Sun, 30 May 2021 01:19:05 -0700 (PDT) X-Received: by 2002:a1c:dcd7:: with SMTP id t206mr9401672wmg.121.1622362745203; Sun, 30 May 2021 01:19:05 -0700 (PDT) Received: from redhat.com ([2a00:a040:196:94e6::1002]) by smtp.gmail.com with ESMTPSA id n20sm11262618wmk.12.2021.05.30.01.19.03 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 30 May 2021 01:19:04 -0700 (PDT) Date: Sun, 30 May 2021 04:19:01 -0400 From: "Michael S. Tsirkin" To: Eli Cohen Cc: jasowang@redhat.com, virtualization@lists.linux-foundation.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH 1/2] vdpa/mlx5: Fix umem sizes assignments on VQ create Message-ID: <20210530041624-mutt-send-email-mst@kernel.org> References: <20210530063128.183258-1-elic@nvidia.com> <20210530040458-mutt-send-email-mst@kernel.org> <20210530081536.GA119906@mtl-vdi-166.wap.labs.mlnx> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20210530081536.GA119906@mtl-vdi-166.wap.labs.mlnx> Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Sun, May 30, 2021 at 11:15:36AM +0300, Eli Cohen wrote: > On Sun, May 30, 2021 at 04:05:16AM -0400, Michael S. Tsirkin wrote: > > On Sun, May 30, 2021 at 09:31:28AM +0300, Eli Cohen wrote: > > > Fix copy paste bug assigning umem1 size to umem2 and umem3. > > > > > > Fixes: 1a86b377aa21 ("vdpa/mlx5: Add VDPA driver for supported mlx5 devices") > > > Signed-off-by: Eli Cohen > > > > could you clarify the impact of the bug please? > > > > I leads to firmware failure to create the virtqueue resource when you > try to use a 1:1 mapping MR. This kind of usage is presented in the > virtio_vdpa support I sent earlier. OK pls include this info in the commit log. And is 1:1 the only case where sizes differ? Is it true that in other cases sizes are all the same? > > > --- > > > 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 189e4385df40..53312f0460ad 100644 > > > --- a/drivers/vdpa/mlx5/net/mlx5_vnet.c > > > +++ b/drivers/vdpa/mlx5/net/mlx5_vnet.c > > > @@ -828,9 +828,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.31.1 > >