]> www.infradead.org Git - users/jedix/linux-maple.git/commit
bnxt_en: Limit RX BD pages to be no bigger than 32K.
authorMichael Chan <michael.chan@broadcom.com>
Mon, 25 Apr 2016 06:30:50 +0000 (02:30 -0400)
committerChuck Anderson <chuck.anderson@oracle.com>
Thu, 7 Jul 2016 00:37:08 +0000 (17:37 -0700)
commit8c82dae18dee7f15543125cc9afa14352ee48e2d
tree9cbe039eaa926345ae64ecdff3e14ba03bb5d1b9
parent2921989a6ec669771470a39273fbff8d9bbff67a
bnxt_en: Limit RX BD pages to be no bigger than 32K.

Orabug: 23221795

The RX BD length field of this device is 16-bit, so the largest buffer
size is 65535.  For LRO and GRO, we allocate native CPU pages for the
aggregation ring buffers.  It won't work if the native CPU page size is
64K or bigger.

We fix this by defining BNXT_RX_PAGE_SIZE to be native CPU page size
up to 32K.  Replace PAGE_SIZE with BNXT_RX_PAGE_SIZE in all appropriate
places related to the rx aggregation ring logic.

The next patch will add additional logic to divide the page into 32K
chunks for aggrgation ring buffers if PAGE_SIZE is bigger than
BNXT_RX_PAGE_SIZE.

Signed-off-by: Michael Chan <michael.chan@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
(cherry picked from commit 2839f28bd5bf8fd2ab4a1ea3a5589c8f94364cbb)
Signed-off-by: Brian Maly <brian.maly@oracle.com>
drivers/net/ethernet/broadcom/bnxt/bnxt.c
drivers/net/ethernet/broadcom/bnxt/bnxt.h