Skip to content

Commit dd6c6a5

Browse files
mjruhljgunthorpe
authored andcommitted
IB/hfi1: Limit VNIC use of SDMA engines to the available count
VNIC assumes that all SDMA engines have been configured for use. This is not necessarily true (i.e. if the count was constrained by the module parameter). Update VNICs usage to use the configured count, rather than the hardware count. Reviewed-by: Mike Marciniszyn <[email protected]> Reviewed-by: Gary Leshner <[email protected]> Signed-off-by: Michael J. Ruhl <[email protected]> Signed-off-by: Dennis Dalessandro <[email protected]> Signed-off-by: Jason Gunthorpe <[email protected]>
1 parent fe4dd42 commit dd6c6a5

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

drivers/infiniband/hw/hfi1/vnic_main.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -816,14 +816,14 @@ struct net_device *hfi1_vnic_alloc_rn(struct ib_device *device,
816816

817817
size = sizeof(struct opa_vnic_rdma_netdev) + sizeof(*vinfo);
818818
netdev = alloc_netdev_mqs(size, name, name_assign_type, setup,
819-
chip_sdma_engines(dd), dd->num_vnic_contexts);
819+
dd->num_sdma, dd->num_vnic_contexts);
820820
if (!netdev)
821821
return ERR_PTR(-ENOMEM);
822822

823823
rn = netdev_priv(netdev);
824824
vinfo = opa_vnic_dev_priv(netdev);
825825
vinfo->dd = dd;
826-
vinfo->num_tx_q = chip_sdma_engines(dd);
826+
vinfo->num_tx_q = dd->num_sdma;
827827
vinfo->num_rx_q = dd->num_vnic_contexts;
828828
vinfo->netdev = netdev;
829829
rn->free_rdma_netdev = hfi1_vnic_free_rn;

0 commit comments

Comments
 (0)