We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 6459838 commit d6dd508Copy full SHA for d6dd508
drivers/net/ethernet/broadcom/bnx2.c
@@ -5415,8 +5415,9 @@ bnx2_set_rx_ring_size(struct bnx2 *bp, u32 size)
5415
5416
bp->rx_buf_use_size = rx_size;
5417
/* hw alignment + build_skb() overhead*/
5418
- bp->rx_buf_size = SKB_DATA_ALIGN(bp->rx_buf_use_size + BNX2_RX_ALIGN) +
5419
- NET_SKB_PAD + SKB_DATA_ALIGN(sizeof(struct skb_shared_info));
+ bp->rx_buf_size = kmalloc_size_roundup(
+ SKB_DATA_ALIGN(bp->rx_buf_use_size + BNX2_RX_ALIGN) +
5420
+ NET_SKB_PAD + SKB_DATA_ALIGN(sizeof(struct skb_shared_info)));
5421
bp->rx_jumbo_thresh = rx_size - BNX2_RX_OFFSET;
5422
bp->rx_ring_size = size;
5423
bp->rx_max_ring = bnx2_find_max_ring(size, BNX2_MAX_RX_RINGS);
0 commit comments