summaryrefslogtreecommitdiffstats
path: root/drivers/staging/fsl-dpaa2/ethernet/dpaa2-eth.h
diff options
context:
space:
mode:
authorIoana Radulescu <ruxandra.radulescu@nxp.com>2017-12-08 06:47:54 -0600
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2017-12-08 16:33:29 +0100
commit441851b49a34e13966b316e54cdd9f54d71990ae (patch)
tree3560dd1851a5f779a9f799ee0e6452015f8898ff /drivers/staging/fsl-dpaa2/ethernet/dpaa2-eth.h
parent54ce891779888e85a2db04942dbaadd3f40fe223 (diff)
staging: fsl-dpaa2/eth: Don't set netdev->needed_headroom
Commit 4b2d9fe87950 ("staging: fsl-dpaa2/eth: Extra headroom in RX buffers") tried to avoid the performance penalty of doing skb reallocations in the network stack for IP forwarded frames between two DPAA2 Ethernet interfaces. This led to a (too) complicated formula that relies on the stack's internal implementation. Instead, it's safer and easier to just not request any guarantee from the stack. We already double check in the driver the required headroom size of egress frames and realloc the skb if needed, so we don't need to add any extra code. On forwarding between two of our own interfaces, there is no functional change; for traffic forwarded from a different device or generated on the core, skb realloc operations are moved from the stack to our driver, with no visible impact on performance. Signed-off-by: Ioana Radulescu <ruxandra.radulescu@nxp.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/staging/fsl-dpaa2/ethernet/dpaa2-eth.h')
-rw-r--r--drivers/staging/fsl-dpaa2/ethernet/dpaa2-eth.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/staging/fsl-dpaa2/ethernet/dpaa2-eth.h b/drivers/staging/fsl-dpaa2/ethernet/dpaa2-eth.h
index 3a4e9395acdc..63b09d1bd5cf 100644
--- a/drivers/staging/fsl-dpaa2/ethernet/dpaa2-eth.h
+++ b/drivers/staging/fsl-dpaa2/ethernet/dpaa2-eth.h
@@ -371,7 +371,7 @@ static inline unsigned int dpaa2_eth_buf_raw_size(struct dpaa2_eth_priv *priv)
static inline
unsigned int dpaa2_eth_needed_headroom(struct dpaa2_eth_priv *priv)
{
- return priv->tx_data_offset + DPAA2_ETH_TX_BUF_ALIGN - HH_DATA_MOD;
+ return priv->tx_data_offset + DPAA2_ETH_TX_BUF_ALIGN;
}
/* Extra headroom space requested to hardware, in order to make sure there's