vdpa/mlx5: Small improvement for change_num_qps()
authorDragos Tatulea <dtatulea@nvidia.com>
Fri, 16 Aug 2024 09:01:58 +0000 (12:01 +0300)
committerMichael S. Tsirkin <mst@redhat.com>
Wed, 25 Sep 2024 11:07:43 +0000 (07:07 -0400)
commit74c89072f22600cc3d83fc70617b1b6c2f500013
tree7f4ca046422b130e7bf74284d12a35ecedc7f4ce
parent55a7cb05b0a6c6cd6e3f482551cf93c398f1b4c9
vdpa/mlx5: Small improvement for change_num_qps()

change_num_qps() has a lot of multiplications by 2 to convert
the number of VQ pairs to number of VQs. This patch simplifies
the code by doing the VQP -> VQ count conversion at the beginning
in a variable.

Signed-off-by: Dragos Tatulea <dtatulea@nvidia.com>
Reviewed-by: Tariq Toukan <tariqt@nvidia.com>
Message-Id: <20240816090159.1967650-10-dtatulea@nvidia.com>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
Acked-by: Eugenio PĂ©rez <eperezma@redhat.com>
Tested-by: Lei Yang <leiyang@redhat.com>
drivers/vdpa/mlx5/net/mlx5_vnet.c