-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
This patch inits hem resource for SRQ table, includes SRQWQE and SRQWQE index resource. Signed-off-by: Lijun Ou <oulijun@huawei.com> Signed-off-by: Jason Gunthorpe <jgg@mellanox.com>
- Loading branch information
Lijun Ou
authored and
Jason Gunthorpe
committed
Dec 5, 2018
1 parent
d16da11
commit 5c1f167
Showing
9 changed files
with
140 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
// SPDX-License-Identifier: GPL-2.0 OR Linux-OpenIB | ||
/* | ||
* Copyright (c) 2018 Hisilicon Limited. | ||
*/ | ||
|
||
#include <rdma/ib_umem.h> | ||
#include <rdma/hns-abi.h> | ||
#include "hns_roce_device.h" | ||
#include "hns_roce_cmd.h" | ||
#include "hns_roce_hem.h" | ||
|
||
int hns_roce_init_srq_table(struct hns_roce_dev *hr_dev) | ||
{ | ||
struct hns_roce_srq_table *srq_table = &hr_dev->srq_table; | ||
|
||
xa_init(&srq_table->xa); | ||
|
||
return hns_roce_bitmap_init(&srq_table->bitmap, hr_dev->caps.num_srqs, | ||
hr_dev->caps.num_srqs - 1, | ||
hr_dev->caps.reserved_srqs, 0); | ||
} | ||
|
||
void hns_roce_cleanup_srq_table(struct hns_roce_dev *hr_dev) | ||
{ | ||
hns_roce_bitmap_cleanup(&hr_dev->srq_table.bitmap); | ||
} |