IB/hfi1: Correct oversized ring allocation
authorMike Marciniszyn <mike.marciniszyn@cornelisnetworks.com>
Mon, 29 Mar 2021 13:54:09 +0000 (09:54 -0400)
committerJason Gunthorpe <jgg@nvidia.com>
Wed, 7 Apr 2021 23:19:00 +0000 (20:19 -0300)
commitb536d4b2a279733f440c911dc831764690b90050
treecc6d3cb8a1661825ce00dc12b5fcfe47f6a95bec
parent042a00f93aad5874937e00f36e68301f7e3a0af1
IB/hfi1: Correct oversized ring allocation

The completion ring for tx is using the wrong size to size the ring,
oversizing the ring by two orders of magniture.

Correct the allocation size and use kcalloc_node() to allocate the ring.
Fix mistaken GFP defines in similar allocations.

Link: https://lore.kernel.org/r/1617026056-50483-4-git-send-email-dennis.dalessandro@cornelisnetworks.com
Reviewed-by: Kaike Wan <kaike.wan@intel.com>
Signed-off-by: Mike Marciniszyn <mike.marciniszyn@cornelisnetworks.com>
Signed-off-by: Dennis Dalessandro <dennis.dalessandro@cornelisnetworks.com>
Signed-off-by: Jason Gunthorpe <jgg@nvidia.com>
drivers/infiniband/hw/hfi1/ipoib.h
drivers/infiniband/hw/hfi1/ipoib_tx.c