From 6c43a5e9c77a6265b4aaf1988f5444fc5696c0e6 Mon Sep 17 00:00:00 2001 From: Hans Petter Selasky Date: Tue, 10 Nov 2020 12:58:25 +0000 Subject: [PATCH] Include GID type when deleting GIDs from HW table under RoCE in mlx4ib. Refer to the Linux commit mentioned below for a more detailed description. Linux commit: a18177925c252da7801149abe217c05b80884798 Requested by: Isilon MFC after: 1 week Sponsored by: Mellanox Technologies // NVIDIA Networking --- sys/dev/mlx4/mlx4_ib/mlx4_ib_main.c | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/sys/dev/mlx4/mlx4_ib/mlx4_ib_main.c b/sys/dev/mlx4/mlx4_ib/mlx4_ib_main.c index 5ccec7e6e53b..71ee6ae65229 100644 --- a/sys/dev/mlx4/mlx4_ib/mlx4_ib_main.c +++ b/sys/dev/mlx4/mlx4_ib/mlx4_ib_main.c @@ -371,8 +371,13 @@ static int mlx4_ib_del_gid(struct ib_device *device, if (!gids) { ret = -ENOMEM; } else { - for (i = 0; i < MLX4_MAX_PORT_GIDS; i++) - memcpy(&gids[i].gid, &port_gid_table->gids[i].gid, sizeof(union ib_gid)); + for (i = 0; i < MLX4_MAX_PORT_GIDS; i++) { + memcpy(&gids[i].gid, + &port_gid_table->gids[i].gid, + sizeof(union ib_gid)); + gids[i].gid_type = + port_gid_table->gids[i].gid_type; + } } } spin_unlock_bh(&iboe->lock);