vdpa/mlx5: prepare memory regions
authorMatan Azrad <matan@mellanox.com>
Sun, 2 Feb 2020 16:03:44 +0000 (16:03 +0000)
committerFerruh Yigit <ferruh.yigit@intel.com>
Wed, 5 Feb 2020 08:51:21 +0000 (09:51 +0100)
commitcc07a42da2504e684f430fe9e2c4e50927df0e02
tree2a2c9e30ceea0f4068e1d8bc9de2e35870c61243
parentf7aaf477d6e6888194781cacc2507ac38041f382
vdpa/mlx5: prepare memory regions

In order to map the guest physical addresses used by the virtio device
guest side to the host physical addresses used by the HW as the host
side, memory regions are created.

By this way, for example, the HW can translate the addresses of the
packets posted by the guest and to take the packets from the correct
place.

The design is to work with single MR which will be configured to the
virtio queues in the HW, hence a lot of direct MRs are grouped to single
indirect MR.

Create functions to prepare and release MRs with all the related
resources that are required for it.

Create a new file mlx5_vdpa_mem.c to manage all the MR related code
in the driver.

Signed-off-by: Matan Azrad <matan@mellanox.com>
Acked-by: Viacheslav Ovsiienko <viacheslavo@mellanox.com>
Acked-by: Maxime Coquelin <maxime.coquelin@redhat.com>
drivers/vdpa/mlx5/Makefile
drivers/vdpa/mlx5/meson.build
drivers/vdpa/mlx5/mlx5_vdpa.c
drivers/vdpa/mlx5/mlx5_vdpa.h [new file with mode: 0644]
drivers/vdpa/mlx5/mlx5_vdpa_mem.c [new file with mode: 0644]