]> git.baikalelectronics.ru Git - kernel.git/commit
bnxt_en: Don't use static arrays for completion ring pages
authorMichael Chan <michael.chan@broadcom.com>
Mon, 2 Aug 2021 14:52:38 +0000 (10:52 -0400)
committerDavid S. Miller <davem@davemloft.net>
Tue, 3 Aug 2021 11:38:46 +0000 (12:38 +0100)
commit9c436bdaf4a52888ebd18c9c0dc9564311ea429c
tree84b72007879941e7f4071329dc7fbc3d8dbd415a
parentd5b9e478cad169ae7cb312b4927a0a0de72f27b1
bnxt_en: Don't use static arrays for completion ring pages

We currently store these page addresses and DMA addreses in static
arrays.  On systems with 4K pages, we support up to 64 pages per
completion ring.  The actual number of pages for each completion ring
may be much less than 64.  For example, when the RX ring size is set
to the default 511 entries, only 16 completion ring pages are needed
per ring.

In the next patch, we'll be doubling the maximum number of completion
pages.  So we convert to allocate these arrays as needed instead of
declaring them statically.

Reviewed-by: Pavan Chebbi <pavan.chebbi@broadcom.com>
Reviewed-by: Somnath Kotur <somnath.kotur@broadcom.com>
Reviewed-by: Edwin Peer <edwin.peer@broadcom.com>
Signed-off-by: Michael Chan <michael.chan@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/broadcom/bnxt/bnxt.c
drivers/net/ethernet/broadcom/bnxt/bnxt.h