Skip to content

Commit 40f2f3e

Browse files
elic307imstsirkin
authored andcommitted
vdpa/mlx5: Update Control VQ callback information
The control VQ specific information is stored in the dedicated struct mlx5_control_vq. When the callback is updated through mlx5_vdpa_set_vq_cb(), make sure to update the control VQ struct. Fixes: 5262912 ("vdpa/mlx5: Add support for control VQ and MAC setting") Signed-off-by: Eli Cohen <elic@nvidia.com> Message-Id: <20220613075958.511064-1-elic@nvidia.com> Signed-off-by: Michael S. Tsirkin <mst@redhat.com> Acked-by: Jason Wang <jasowang@redhat.com)
1 parent a111daf commit 40f2f3e

1 file changed

Lines changed: 2 additions & 0 deletions

File tree

drivers/vdpa/mlx5/net/mlx5_vnet.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1962,6 +1962,8 @@ static void mlx5_vdpa_set_vq_cb(struct vdpa_device *vdev, u16 idx, struct vdpa_c
19621962
struct mlx5_vdpa_net *ndev = to_mlx5_vdpa_ndev(mvdev);
19631963

19641964
ndev->event_cbs[idx] = *cb;
1965+
if (is_ctrl_vq_idx(mvdev, idx))
1966+
mvdev->cvq.event_cb = *cb;
19651967
}
19661968

19671969
static void mlx5_cvq_notify(struct vringh *vring)

0 commit comments

Comments
 (0)