vdpa/mlx5: Decouple virtqueue callback from struct mlx5_vdpa_virtqueue
authorEli Cohen <elic@nvidia.com>
Mon, 23 Aug 2021 05:21:20 +0000 (08:21 +0300)
committerMichael S. Tsirkin <mst@redhat.com>
Sun, 5 Sep 2021 20:23:07 +0000 (16:23 -0400)
commitdb296d252dfb977885391e47d3fb6ac5a1f9601c
tree4087c2624c7d157b761b822977b841acec7892f1
parentae0428debf7cddf0863a95e415a1957d53384e7e
vdpa/mlx5: Decouple virtqueue callback from struct mlx5_vdpa_virtqueue

Instead, define an array of struct vdpa_callback on struct mlx5_vdpa_net
and use it to store callbacks for any virtqueue provided. This is
required due to the fact that callback configurations arrive before feature
negotiation. With control VQ and multiqueue introduced next we want to
save the information until after feature negotiation where we know the
CVQ index.

Signed-off-by: Eli Cohen <elic@nvidia.com>
Link: https://lore.kernel.org/r/20210823052123.14909-4-elic@nvidia.com
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
drivers/vdpa/mlx5/net/mlx5_vnet.c