author: Matteo Croce <mcroce@microsoft.com> 2021-06-14 04:25:04 +0200
committer: Emil Renner Berthing <kernel@esmil.dk> 2021-08-26 22:45:24 +0200
commit: 565abdd13bf1434ab402e85759094c8d13b9e017
parent: acb719ab9ccc271aa80c81c2a096741eb6083b43
Commit Summary:
Diffstat:
1 file changed, 2 insertions, 2 deletions
diff --git a/drivers/net/ethernet/stmicro/stmmac/stmmac.h b/drivers/net/ethernet/stmicro/stmmac/stmmac.h
index 8aa55612d094..82cee970aaad 100644
--- a/drivers/net/ethernet/stmicro/stmmac/stmmac.h
+++ b/drivers/net/ethernet/stmicro/stmmac/stmmac.h
@@ -338,9 +338,9 @@ static inline bool stmmac_xdp_is_enabled(struct stmmac_priv *priv)
static inline unsigned int stmmac_rx_offset(struct stmmac_priv *priv)
{
if (stmmac_xdp_is_enabled(priv))
- return XDP_PACKET_HEADROOM;
+ return XDP_PACKET_HEADROOM + NET_IP_ALIGN;
- return 0;
+ return NET_SKB_PAD + NET_IP_ALIGN;
}
void stmmac_disable_rx_queue(struct stmmac_priv *priv, u32 queue);