diff options
| author | Kalesh AP <[email protected]> | 2025-01-09 18:18:13 +0000 |
|---|---|---|
| committer | Leon Romanovsky <[email protected]> | 2025-01-14 11:22:10 +0000 |
| commit | 9264cd6aa8f194753507cb6e1f444141e7c79f48 (patch) | |
| tree | ceea6c12d572fca8b9401c2c2dac3d97f9894cc4 /drivers/infiniband/hw/bnxt_re/qplib_res.c | |
| parent | RDMA/bnxt_re: Pass the context for ulp_irq_stop (diff) | |
| download | kernel-9264cd6aa8f194753507cb6e1f444141e7c79f48.tar.gz kernel-9264cd6aa8f194753507cb6e1f444141e7c79f48.zip | |
RDMA/bnxt_re: Allocate dev_attr information dynamically
In order to optimize the size of driver private structure,
the memory for dev_attr is allocated dynamically during the
chip context initialization. In order to make certain runtime
decisions, store dev_attr in the qplib_res structure.
Signed-off-by: Kalesh AP <[email protected]>
Signed-off-by: Selvin Xavier <[email protected]>
Link: https://patch.msgid.link/[email protected]
Signed-off-by: Leon Romanovsky <[email protected]>
Diffstat (limited to 'drivers/infiniband/hw/bnxt_re/qplib_res.c')
| -rw-r--r-- | drivers/infiniband/hw/bnxt_re/qplib_res.c | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/drivers/infiniband/hw/bnxt_re/qplib_res.c b/drivers/infiniband/hw/bnxt_re/qplib_res.c index 96ceec1e8199..02922a0987ad 100644 --- a/drivers/infiniband/hw/bnxt_re/qplib_res.c +++ b/drivers/infiniband/hw/bnxt_re/qplib_res.c @@ -876,14 +876,13 @@ void bnxt_qplib_free_res(struct bnxt_qplib_res *res) bnxt_qplib_free_dpi_tbl(res, &res->dpi_tbl); } -int bnxt_qplib_alloc_res(struct bnxt_qplib_res *res, struct pci_dev *pdev, - struct net_device *netdev, - struct bnxt_qplib_dev_attr *dev_attr) +int bnxt_qplib_alloc_res(struct bnxt_qplib_res *res, struct net_device *netdev) { + struct bnxt_qplib_dev_attr *dev_attr; int rc; - res->pdev = pdev; res->netdev = netdev; + dev_attr = res->dattr; rc = bnxt_qplib_alloc_sgid_tbl(res, &res->sgid_tbl, dev_attr->max_sgid); if (rc) |
