Received: by 2002:a05:7412:2a8c:b0:e2:908c:2ebd with SMTP id u12csp1803082rdh; Tue, 26 Sep 2023 04:13:54 -0700 (PDT) X-Google-Smtp-Source: AGHT+IGwfZ+Rp5+9WUiB+tFAUKw0Ak9nohtWlC3jYtZJUOWFVF/ol9kCHwJeevTVzOHZUvloaUYI X-Received: by 2002:a05:6a21:a58d:b0:157:229a:db21 with SMTP id gd13-20020a056a21a58d00b00157229adb21mr9017330pzc.56.1695726834587; Tue, 26 Sep 2023 04:13:54 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1695726834; cv=none; d=google.com; s=arc-20160816; b=bPXDTpFXgvH4WgqUkw19oCb7Ings+/pCAdPvPwJk9Eo4eJaHWxTWoq/zgU34f9ilQ2 S/N80LQl49wa19w6NJqZ603yQFxPDQd58lJgq+J3VxfNunjcg1QLRNoinYcWobGn+mxX 6LDD3FS3DRbry3/z23OVsik0l8c0Ou81390SsNft14q7cGCamsdu+whNajNZPrfOw3FP TCxyPMcU5MiuhGN4LVZ9PgKdEnZEBJEcCV5AiEm2us3dLLj7h98vwM8ajy6iNyWexXFM 6EQD/yVizIjZZ0Tdox5WJDI7BdvQwMlds7qvXaXsxbjjgwFAWYYG/Ln7Pry5SnD0GSly FvxA== 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=VemcH0Pxc7gzhy8cLvwCxUH2+uz/mp+txw8hIJIiBPM=; fh=dJp8FZn3+jiYGV+e7Ew7vHmAFoOpfPx8FCDDh6gjrPI=; b=PWozBk9P7szt0eZU/+79hzppvLLiw67Z0lnRp71niFr1xITzK/ACfO1ztOczheuQfI vJLIREyZSbjFnl8Sfx4OmfKokI/N0GWJD1bpCT5XzDCC0EjL92hARwkerxgDe9DTP7cc ziE/Xp0gkctRgr3RidKVOOANvmxujTU5HA8dvpI4b7WxOcJ/E3VQcNVb7PTI8ziEVDl9 +k32c+e8bwQ64jUPjDLplMR8J/Aj7jvzVqxIks5jCRad3oAW2mFvL0KypHwQEYAipYbj X45EGff7dsmBYAdzc4iyYF9dgpFCpXRCbpUZig7OBaqAnB/A2xZ6AkpB5/m39Ob3hn6i EuWg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=IJj32r9w; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:4 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 howler.vger.email (howler.vger.email. [2620:137:e000::3:4]) by mx.google.com with ESMTPS id e6-20020a170902d38600b001c5844a4db7si11919791pld.562.2023.09.26.04.13.48 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 26 Sep 2023 04:13:54 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:4 as permitted sender) client-ip=2620:137:e000::3:4; Authentication-Results: mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=IJj32r9w; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:4 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by howler.vger.email (Postfix) with ESMTP id 74D9480F4E3F; Mon, 25 Sep 2023 20:34:54 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at howler.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232488AbjIZDey (ORCPT + 99 others); Mon, 25 Sep 2023 23:34:54 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:43064 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229651AbjIZDex (ORCPT ); Mon, 25 Sep 2023 23:34:53 -0400 Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 4910EDF for ; Mon, 25 Sep 2023 20:34:01 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1695699240; 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=VemcH0Pxc7gzhy8cLvwCxUH2+uz/mp+txw8hIJIiBPM=; b=IJj32r9wU3CCU8E+GIZ9uT6BBbnh1rkqi6MpvSEbhGrqCMpt7Toee/PaxsuNI+9R81tSpB bWPsjqJkDbGzWs1F78QIhkO9Tq1LdR+4I7EdeG+ImNZVvaVRU1im1VVOGpvGmyapoobR8U SyKjhljrfVL2dSL5nZad1bnj3HcAFoU= Received: from mail-lf1-f69.google.com (mail-lf1-f69.google.com [209.85.167.69]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-306-5Vck-DXDPlWS-GoGrV7D1Q-1; Mon, 25 Sep 2023 23:33:58 -0400 X-MC-Unique: 5Vck-DXDPlWS-GoGrV7D1Q-1 Received: by mail-lf1-f69.google.com with SMTP id 2adb3069b0e04-5043c463bf9so8904711e87.0 for ; Mon, 25 Sep 2023 20:33:58 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1695699237; x=1696304037; 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=VemcH0Pxc7gzhy8cLvwCxUH2+uz/mp+txw8hIJIiBPM=; b=fS/DDlWNFbSee8bdkffHC6o+Tfsv4zbMlXUuuw43c/5IbEI3OogygGvpvKWHMRXq3I 8ixy5UoINpGD7eMyk5S0UjLbDIOowN7GVSV/+ZQUbFQpw1Ts0SwGWJ+b7r1KfcokQ38e Iu0EEweR80zBobSuxCyeGkB3TAxUh/po7F/lxONotZrprD7a1VH4jai4tintSAGpF757 e1BM3WAd54u+AY4vmVPs6mlIV9CyyEEY5wOtZLa+A0Bu1f8dxXlFobpXRDEhAb61f9rs j0nldrF47skg1PkanC/Eg0o+tYc1irEFlv68GJ99m3W/VV+W87mdlcB0nQHtRibilIKE NpQQ== X-Gm-Message-State: AOJu0YwR0E/X9Ut4XzSPVxCndQJU9TXToukAKl3aqDYzfi8tOdmzs+Hj noiGn3wwyvf/cujwjUxB9nG4CtTKZBZAP//4T32SJ0Nm/ozoGDnBLomwll3J4mGAhnm+wz/+hrC 40TUFjm7l1qM9KOXZqc4TPeiM3rO9ojcSPWUaAdVRgnbq5YjRlFozhg== X-Received: by 2002:a05:6512:3daa:b0:503:1adf:b4d5 with SMTP id k42-20020a0565123daa00b005031adfb4d5mr8636661lfv.52.1695699236795; Mon, 25 Sep 2023 20:33:56 -0700 (PDT) X-Received: by 2002:a05:6512:3daa:b0:503:1adf:b4d5 with SMTP id k42-20020a0565123daa00b005031adfb4d5mr8636648lfv.52.1695699236445; Mon, 25 Sep 2023 20:33:56 -0700 (PDT) MIME-Version: 1.0 References: <20230912130132.561193-1-dtatulea@nvidia.com> <20230912130132.561193-8-dtatulea@nvidia.com> In-Reply-To: <20230912130132.561193-8-dtatulea@nvidia.com> From: Jason Wang Date: Tue, 26 Sep 2023 11:33:45 +0800 Message-ID: Subject: Re: [PATCH 07/16] vdpa/mlx5: Collapse "dvq" mr add/delete functions To: Dragos Tatulea Cc: =?UTF-8?Q?Eugenio_P=C3=A9rez?= , Si-Wei Liu , "Michael S . Tsirkin" , Saeed Mahameed , virtualization@lists.linux-foundation.org, linux-kernel@vger.kernel.org, Parav Pandit , Xuan Zhuo , kvm@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_H3,RCVD_IN_MSPIKE_WL,SPF_HELO_NONE,SPF_NONE autolearn=unavailable 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 X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (howler.vger.email [0.0.0.0]); Mon, 25 Sep 2023 20:34:54 -0700 (PDT) On Tue, Sep 12, 2023 at 9:02=E2=80=AFPM Dragos Tatulea wrote: > > Now that the cvq code is out of mlx5_vdpa_create/destroy_mr, the "dvq" > functions can be folded into their callers. > > Having "dvq" in the naming will no longer be accurate in the downstream > patches. > > Signed-off-by: Dragos Tatulea Acked-by: Jason Wang Thanks > --- > drivers/vdpa/mlx5/core/mr.c | 16 +++++----------- > 1 file changed, 5 insertions(+), 11 deletions(-) > > diff --git a/drivers/vdpa/mlx5/core/mr.c b/drivers/vdpa/mlx5/core/mr.c > index 587300e7c18e..fde00497f4ad 100644 > --- a/drivers/vdpa/mlx5/core/mr.c > +++ b/drivers/vdpa/mlx5/core/mr.c > @@ -489,7 +489,7 @@ static void destroy_user_mr(struct mlx5_vdpa_dev *mvd= ev, struct mlx5_vdpa_mr *mr > } > } > > -static void _mlx5_vdpa_destroy_dvq_mr(struct mlx5_vdpa_dev *mvdev, unsig= ned int asid) > +static void _mlx5_vdpa_destroy_mr(struct mlx5_vdpa_dev *mvdev, unsigned = int asid) > { > struct mlx5_vdpa_mr *mr =3D &mvdev->mr; > > @@ -513,7 +513,7 @@ void mlx5_vdpa_destroy_mr_asid(struct mlx5_vdpa_dev *= mvdev, unsigned int asid) > > mutex_lock(&mr->mkey_mtx); > > - _mlx5_vdpa_destroy_dvq_mr(mvdev, asid); > + _mlx5_vdpa_destroy_mr(mvdev, asid); > > mutex_unlock(&mr->mkey_mtx); > } > @@ -524,9 +524,9 @@ void mlx5_vdpa_destroy_mr(struct mlx5_vdpa_dev *mvdev= ) > prune_iotlb(mvdev); > } > > -static int _mlx5_vdpa_create_dvq_mr(struct mlx5_vdpa_dev *mvdev, > - struct vhost_iotlb *iotlb, > - unsigned int asid) > +static int _mlx5_vdpa_create_mr(struct mlx5_vdpa_dev *mvdev, > + struct vhost_iotlb *iotlb, > + unsigned int asid) > { > struct mlx5_vdpa_mr *mr =3D &mvdev->mr; > int err; > @@ -550,12 +550,6 @@ static int _mlx5_vdpa_create_dvq_mr(struct mlx5_vdpa= _dev *mvdev, > return 0; > } > > -static int _mlx5_vdpa_create_mr(struct mlx5_vdpa_dev *mvdev, > - struct vhost_iotlb *iotlb, unsigned int a= sid) > -{ > - return _mlx5_vdpa_create_dvq_mr(mvdev, iotlb, asid); > -} > - > int mlx5_vdpa_create_mr(struct mlx5_vdpa_dev *mvdev, struct vhost_iotlb = *iotlb, > unsigned int asid) > { > -- > 2.41.0 >