]> git.droids-corp.org - dpdk.git/commit
net/mlx5: remove Verbs query device duplication
authorMichael Baum <michaelba@nvidia.com>
Mon, 14 Feb 2022 09:35:00 +0000 (11:35 +0200)
committerRaslan Darawsheh <rasland@nvidia.com>
Mon, 21 Feb 2022 10:36:45 +0000 (11:36 +0100)
commit8f464810014ff46644218b81af3e1f59f87105d5
tree5de793e467b5e2d030106faf921dd09fd8651bfc
parent6dc0cbc6c640ce042cb7d1241d9a4202e49307c8
net/mlx5: remove Verbs query device duplication

The sharing device context structure has a field named "device_attr"
which is filled by mlx5_os_get_dev_attr() function.
The spawn function calls mlx5_os_get_dev_attr() again and save it to
local variable identical to "device_attr" field.

There is no need for this duplication, because there is a reference to
the sharing device context structure from spawn function.

This patch removes the local "device_attr" from spawn function, and uses
the context's field instead.

Signed-off-by: Michael Baum <michaelba@nvidia.com>
Acked-by: Matan Azrad <matan@nvidia.com>
drivers/net/mlx5/linux/mlx5_os.c
drivers/net/mlx5/windows/mlx5_os.c