summaryrefslogtreecommitdiff
path: root/drivers/infiniband/core/cache.c
diff options
context:
space:
mode:
authorParav Pandit <parav@mellanox.com>2018-06-05 08:40:13 +0300
committerJason Gunthorpe <jgg@mellanox.com>2018-06-18 07:32:04 +0300
commita1a4caeebac95875eaf6c8afb5a9784566484b2e (patch)
tree14e3308f99a8c4ac14f380a2bea487a0dc8eeede /drivers/infiniband/core/cache.c
parentce397d215ccd07b8ae3f71db689aedb85d56ab40 (diff)
downloadlinux-a1a4caeebac95875eaf6c8afb5a9784566484b2e.tar.xz
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>
Diffstat (limited to 'drivers/infiniband/core/cache.c')
-rw-r--r--drivers/infiniband/core/cache.c5
1 files changed, 0 insertions, 5 deletions
diff --git a/drivers/infiniband/core/cache.c b/drivers/infiniband/core/cache.c
index 81d66f56e38f..0415548eb5f3 100644
--- a/drivers/infiniband/core/cache.c
+++ b/drivers/infiniband/core/cache.c
@@ -792,7 +792,6 @@ static void gid_table_reserve_default(struct ib_device *ib_dev, u8 port,
unsigned int i;
unsigned long roce_gid_type_mask;
unsigned int num_default_gids;
- unsigned int current_gid = 0;
roce_gid_type_mask = roce_gid_type_mask_support(ib_dev, port);
num_default_gids = hweight_long(roce_gid_type_mask);
@@ -800,10 +799,6 @@ static void gid_table_reserve_default(struct ib_device *ib_dev, u8 port,
struct ib_gid_table_entry *entry = &table->data_vec[i];
entry->props |= GID_TABLE_ENTRY_DEFAULT;
- current_gid = find_next_bit(&roce_gid_type_mask,
- BITS_PER_LONG,
- current_gid);
- entry->attr.gid_type = current_gid++;
}
}