Skip to content

Commit a1a4cae

Browse files
paravmellanoxjgunthorpe
authored andcommitted
IB/core: Do not set the gid type when reserving default entries
When default GIDs are added, their gid type is set by ib_cache_gid_set_default_gid(). There is no need to set the gid type of a free GID entry during GID table initialization. Signed-off-by: Parav Pandit <parav@mellanox.com> Signed-off-by: Leon Romanovsky <leonro@mellanox.com> Signed-off-by: Jason Gunthorpe <jgg@mellanox.com>
1 parent ce397d2 commit a1a4cae

File tree

1 file changed

+0
-5
lines changed

1 file changed

+0
-5
lines changed

drivers/infiniband/core/cache.c

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -792,18 +792,13 @@ static void gid_table_reserve_default(struct ib_device *ib_dev, u8 port,
792792
unsigned int i;
793793
unsigned long roce_gid_type_mask;
794794
unsigned int num_default_gids;
795-
unsigned int current_gid = 0;
796795

797796
roce_gid_type_mask = roce_gid_type_mask_support(ib_dev, port);
798797
num_default_gids = hweight_long(roce_gid_type_mask);
799798
for (i = 0; i < num_default_gids && i < table->sz; i++) {
800799
struct ib_gid_table_entry *entry = &table->data_vec[i];
801800

802801
entry->props |= GID_TABLE_ENTRY_DEFAULT;
803-
current_gid = find_next_bit(&roce_gid_type_mask,
804-
BITS_PER_LONG,
805-
current_gid);
806-
entry->attr.gid_type = current_gid++;
807802
}
808803
}
809804

0 commit comments

Comments
 (0)