mirror of https://github.com/torvalds/linux.git
eth: bnxt: allocate enough buffer space to meet HDS threshold
Now that we can configure HDS threshold separately from the rx_copybreak
HDS threshold may be higher than rx_copybreak.
We need to make sure that we have enough space for the headers.
Fixes: 6b43673a25 ("bnxt_en: add support for hds-thresh ethtool command")
Reviewed-by: Michael Chan <michael.chan@broadcom.com>
Link: https://patch.msgid.link/20250119020518.1962249-7-kuba@kernel.org
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
This commit is contained in:
parent
928459bbda
commit
bee018052d
|
|
@ -4671,9 +4671,10 @@ void bnxt_set_ring_params(struct bnxt *bp)
|
|||
ALIGN(max(NET_SKB_PAD, XDP_PACKET_HEADROOM), 8) -
|
||||
SKB_DATA_ALIGN(sizeof(struct skb_shared_info));
|
||||
} else {
|
||||
rx_size = SKB_DATA_ALIGN(max(BNXT_DEFAULT_RX_COPYBREAK,
|
||||
bp->rx_copybreak) +
|
||||
NET_IP_ALIGN);
|
||||
rx_size = max3(BNXT_DEFAULT_RX_COPYBREAK,
|
||||
bp->rx_copybreak,
|
||||
bp->dev->cfg_pending->hds_thresh);
|
||||
rx_size = SKB_DATA_ALIGN(rx_size + NET_IP_ALIGN);
|
||||
rx_space = rx_size + NET_SKB_PAD +
|
||||
SKB_DATA_ALIGN(sizeof(struct skb_shared_info));
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue