summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBogdan Purcareata <bogdan.purcareata@nxp.com>2017-10-16 11:04:34 (GMT)
committerXie Xiaobo <xiaobo.xie@nxp.com>2017-12-12 07:32:42 (GMT)
commitb3401428a2b4b0427b6f484a019e0bb64cdcab61 (patch)
tree92ac05e0ee1864ae32bb0474ecfd8c8a1f2a2a01
parentd2c55feac3b207a2400d762322022ea7b110b65e (diff)
downloadlinux-b3401428a2b4b0427b6f484a019e0bb64cdcab61.tar.xz
staging: fsl-dpaa2/eth: Don't include HH_DATA_MOD in needed_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. Based on that, decrease the frame buffer headroom for ingress frames. Signed-off-by: Bogdan Purcareata <bogdan.purcareata@nxp.com> Integrated-by: Guanhua Gao <guanhua.gao@nxp.com>
-rw-r--r--drivers/staging/fsl-dpaa2/ethernet/dpaa2-eth.h4
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/staging/fsl-dpaa2/ethernet/dpaa2-eth.h b/drivers/staging/fsl-dpaa2/ethernet/dpaa2-eth.h
index 0126878..62de3c7 100644
--- a/drivers/staging/fsl-dpaa2/ethernet/dpaa2-eth.h
+++ b/drivers/staging/fsl-dpaa2/ethernet/dpaa2-eth.h
@@ -97,7 +97,7 @@
#define DPAA2_ETH_RX_BUF_ALIGN 64
#define DPAA2_ETH_RX_BUF_ALIGN_V1 256
#define DPAA2_ETH_NEEDED_HEADROOM(p_priv) \
- ((p_priv)->tx_data_offset + DPAA2_ETH_TX_BUF_ALIGN)
+ ((p_priv)->tx_data_offset + DPAA2_ETH_TX_BUF_ALIGN - HH_DATA_MOD)
/* rx_extra_head prevents reallocations in L3 processing. */
#define DPAA2_ETH_SKB_SIZE \
@@ -126,7 +126,7 @@
*/
#define DPAA2_ETH_RX_HEAD_ROOM \
(DPAA2_ETH_TX_HWA_SIZE - DPAA2_ETH_RX_HWA_SIZE + \
- DPAA2_ETH_TX_BUF_ALIGN + HH_DATA_MOD)
+ DPAA2_ETH_TX_BUF_ALIGN)
/* Must keep this struct smaller than DPAA2_ETH_SWA_SIZE */
struct dpaa2_eth_swa {