Skip to content
Commit e2243720 authored by Alexander Lobakin's avatar Alexander Lobakin Committed by David S. Miller
Browse files

net: ethernet: mvneta: fix MVNETA_SKB_HEADROOM alignment



Commit ca23cb0b ("mvneta: MVNETA_SKB_HEADROOM set last 3 bits to zero")
added headroom alignment check against 8.
Hovewer (if we imagine that NET_SKB_PAD or XDP_PACKET_HEADROOM is not
aligned to cacheline size), it actually aligns headroom down, while
skb/xdp_buff headroom should be *at least* equal to one of the values
(depending on XDP prog presence).
So, fix the check to align the value up. This satisfies both
hardware/driver and network stack requirements.

Fixes: ca23cb0b ("mvneta: MVNETA_SKB_HEADROOM set last 3 bits to zero")
Signed-off-by: default avatarAlexander Lobakin <bloodyreaper@yandex.ru>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 178f67b1
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment