From b3401428a2b4b0427b6f484a019e0bb64cdcab61 Mon Sep 17 00:00:00 2001 From: Bogdan Purcareata Date: Mon, 16 Oct 2017 11:04:34 +0000 Subject: 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 Integrated-by: Guanhua Gao 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 { -- cgit v0.10.2