Received: by 2002:a05:6358:c692:b0:131:369:b2a3 with SMTP id fe18csp629017rwb; Thu, 27 Jul 2023 19:21:46 -0700 (PDT) X-Google-Smtp-Source: APBJJlEkSv7ZmH6bmf7IB6B1J5jkLxiNi3ozWlr+3AbX7Y4wsUH0ZeW/gft9yZrkJ+GnKCimX1NR X-Received: by 2002:a05:6512:3c8d:b0:4f9:5426:6622 with SMTP id h13-20020a0565123c8d00b004f954266622mr803221lfv.69.1690510906264; Thu, 27 Jul 2023 19:21:46 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1690510906; cv=none; d=google.com; s=arc-20160816; b=LsqCVoP6GvsUXXkYViO+gd7i2XwKBw0+SqYXsS+0dfIsWIE7wVK9XyzATxqB1YwNZG ChV5SsX/Jg03r4E1b13gRXoz1QHMHsEOE0qqtwERBtJ23e7uSa0eJaKzI6rmyvZ8i0TN Pr4Een0jQiw2UA/hpUq7FlRKV77wSXl2C9N56xgNl4J7CD0PJQDO9LnBr6kv1lwGLvqK PImYveqZcPy283nmszRZ1wx2tSzGb9wlFzFb+TJfr+TOpEkjxil+4l2jsMoDhsM9yPKW RJ4njIVXiobpN6B2XfrH9mWORbBoSUBGVCgSp4A5oqyacc/SMviEUhwdqJlRbPSREt0A M2Iw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:cc:to:subject :message-id:date:from:in-reply-to:references:mime-version :dkim-signature; bh=3pN/ym8BrU7SB9ZbfxQKn7T8k7nbmNNGc1emjzZf6u4=; fh=UnqlEQfTZLDoOCWXtIfhjyMeqp8jMD8O3nlSC7SdmZM=; b=O/tzpAR5BDSpHXzq64UvUij2+L175NphFCxd+kMDZ0O9DzK/C5d8XHC65erQfNK++o 3L0YPwJmsCrEWfCOO8A/kGgvAsbsS4ksVw8OqEi6JbEWJCJ/Skiwmw4h68h/Xx0V8oAy 5BTjEmCcOVjAYMCjo2c5nVJ+4i406PpwVx74H2TwMN5xd7zGKDmCoSnt5WOxIrSw6lKE MvD6+xOoLGS1RU71YLG4d2BGxAmr6COGfgwcgOPqwBPzqy9/m9K7KrkUQyjbc1nd+boB Dn3WVwfyMETdt57EReESQVf+a5dGd7VHzj/+Na4uhwLDWoXWAazpBy5xjN7ygU5MXRWt q8Kw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=HNZylASW; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 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 out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id a4-20020a17090680c400b0099bd6900520si1822295ejx.1000.2023.07.27.19.20.55; Thu, 27 Jul 2023 19:21:46 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=HNZylASW; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 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 S229956AbjG1Bkx (ORCPT + 99 others); Thu, 27 Jul 2023 21:40:53 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:49466 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229715AbjG1Bkw (ORCPT ); Thu, 27 Jul 2023 21:40:52 -0400 Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 942F73584 for ; Thu, 27 Jul 2023 18:40:04 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1690508403; 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: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=3pN/ym8BrU7SB9ZbfxQKn7T8k7nbmNNGc1emjzZf6u4=; b=HNZylASWe3lEHios/txMzHXeeEywoNN1ADN1ubZd1t6WDaNq7bv0qMXzbJpFPAO2Zt1HtM 0v8A0SALaVj2taGgmYqrKssxmT5Wk+8AVmtlMocfEwdplae8SqU+87AWfLs9V+EdLdqB8n FJGon2cifY2AGvvU7IGsaoJdVEHPjPQ= Received: from mail-lj1-f199.google.com (mail-lj1-f199.google.com [209.85.208.199]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-281-_TcHLkyRMTaiE8HnLIRsCw-1; Thu, 27 Jul 2023 21:40:01 -0400 X-MC-Unique: _TcHLkyRMTaiE8HnLIRsCw-1 Received: by mail-lj1-f199.google.com with SMTP id 38308e7fff4ca-2b9ce397ef1so3095621fa.1 for ; Thu, 27 Jul 2023 18:40:01 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1690508400; x=1691113200; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=3pN/ym8BrU7SB9ZbfxQKn7T8k7nbmNNGc1emjzZf6u4=; b=SJ2cy9dNma38SnV4YKJ1jd7wuUq73SmKCZi97XEPLUvdiufndKF8Onlv+b58jwajEv JPHEsWjeHjPKA8pwwu3yGLIiAaajWxzqij/Pr7N37YDvgZwod5ALHkhDxzcecpZAuIN7 f2j2EiPLGFrQwORaNeHtewiH4kgmNxVo0GGJk5hOsykMwsfVyVr9OxMPOd5wnS7dsnUL Qi6/FqzVDZBadan3hP2Q/KRFGs/Ug18BPkq8jE4QMc/VSV4PnCpKqh5yYSoaSEHYQ5cT cG+snMzHomPdzcnu3Bo/poFi7YRauffSkQyE9rcjiUgdKlXvvcIS2DYRB0Dz41wEdxsA 7WFA== X-Gm-Message-State: ABy/qLaI3aFKEHUa3J9RUpXPNPUlbFO1A189C48+Vhuu+sxR3sfegeVf O7oZPOlVvFUkn7HMWbURnh9o4MrK+Gjo1XdIj0ksIWDfJVqQV+zvSfLISvw6kfedSNUlbeWmB4V 67pdRdVoemAjy25xuvnPaP3CqMYTCIPEqnxklnCGr X-Received: by 2002:a2e:a209:0:b0:2b6:d137:b61c with SMTP id h9-20020a2ea209000000b002b6d137b61cmr441080ljm.39.1690508400572; Thu, 27 Jul 2023 18:40:00 -0700 (PDT) X-Received: by 2002:a2e:a209:0:b0:2b6:d137:b61c with SMTP id h9-20020a2ea209000000b002b6d137b61cmr441072ljm.39.1690508400375; Thu, 27 Jul 2023 18:40:00 -0700 (PDT) MIME-Version: 1.0 References: <20230727172354.68243-2-dtatulea@nvidia.com> In-Reply-To: <20230727172354.68243-2-dtatulea@nvidia.com> From: Jason Wang Date: Fri, 28 Jul 2023 09:39:49 +0800 Message-ID: Subject: Re: [PATCH] vdpa/mlx5: Correct default number of queues when MQ is on To: Dragos Tatulea Cc: "Michael S. Tsirkin" , Xuan Zhuo , =?UTF-8?Q?Eugenio_P=C3=A9rez?= , virtualization@lists.linux-foundation.org, linux-kernel@vger.kernel.org Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H4,RCVD_IN_MSPIKE_WL,SPF_HELO_NONE,SPF_NONE, T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, Jul 28, 2023 at 1:25=E2=80=AFAM Dragos Tatulea wrote: > > The standard specifies that the initial number of queues is the > default, which is 1 (1 tx, 1 rx). > > Signed-off-by: Dragos Tatulea > Reviewed-by: Eugenio P=C3=A9rez Acked-by: Jason Wang Thanks > --- > drivers/vdpa/mlx5/net/mlx5_vnet.c | 10 +++++++++- > 1 file changed, 9 insertions(+), 1 deletion(-) > > diff --git a/drivers/vdpa/mlx5/net/mlx5_vnet.c b/drivers/vdpa/mlx5/net/ml= x5_vnet.c > index 9138ef2fb2c8..6b6eb69a8a90 100644 > --- a/drivers/vdpa/mlx5/net/mlx5_vnet.c > +++ b/drivers/vdpa/mlx5/net/mlx5_vnet.c > @@ -2517,7 +2517,15 @@ static int mlx5_vdpa_set_driver_features(struct vd= pa_device *vdev, u64 features) > else > ndev->rqt_size =3D 1; > > - ndev->cur_num_vqs =3D 2 * ndev->rqt_size; > + /* Device must start with 1 queue pair, as per VIRTIO v1.2 spec, = section > + * 5.1.6.5.5 "Device operation in multiqueue mode": > + * > + * Multiqueue is disabled by default. > + * The driver enables multiqueue by sending a command using class > + * VIRTIO_NET_CTRL_MQ. The command selects the mode of multiqueue > + * operation, as follows: ... > + */ > + ndev->cur_num_vqs =3D 2; > > update_cvq_info(mvdev); > return err; > -- > 2.41.0 >