]> git.baikalelectronics.ru Git - kernel.git/commit
staging: fsl-dpaa2/eth: Extra headroom in RX buffers
authorBogdan Purcareata <bogdan.purcareata@nxp.com>
Sun, 29 Oct 2017 08:20:43 +0000 (08:20 +0000)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 3 Nov 2017 15:19:27 +0000 (16:19 +0100)
commit91cb81772b11029d7443678519490f0d25926e5a
tree20bd08d5745db35cfb495915e18957075ea6c582
parent8338d44a1c4d5a7115eb3824b289e901fce64803
staging: fsl-dpaa2/eth: Extra headroom in RX buffers

The needed headroom that we ask the stack to reserve for us in TX
skbs is larger than the headroom available in RX frames, which
leads to skb reallocations in forwarding scenarios involving two
DPNI interfaces.

Configure the hardware to reserve some extra space in the RX
frame headroom to avoid this situation. The value is chosen based
on the Tx frame data offset, the Rx buffer alignment value and the
netdevice required headroom.

The network stack will take care to reserve space for HH_DATA_MOD when
building the skb, so there's no need to account for it in the netdevice
needed headroom.

Signed-off-by: Bogdan Purcareata <bogdan.purcareata@nxp.com>
Signed-off-by: Ioana Radulescu <ruxandra.radulescu@nxp.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/fsl-dpaa2/ethernet/dpaa2-eth.c
drivers/staging/fsl-dpaa2/ethernet/dpaa2-eth.h