net: mvneta: use cache_line_size() to get cacheline size
Subsystems (3)
PATCH 1/1 net: mvneta: use cache_line_size() to get cacheline size
L1_CACHE_BYTES may not be the real cacheline size, use cache_line_size to determine the cacheline size in runtime.
Signed-off-by Jisheng Zhang <[email protected]>
Suggested-by Marcin Wojtas <[email protected]>
--- drivers/net/ethernet/marvell/mvneta.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/net/ethernet/marvell/mvneta.c +1 -1
@@ -299,7 +299,7 @@#define MVNETA_RX_PKT_SIZE (mtu) \ ALIGN((mtu) + MVNETA_MH_SIZE + MVNETA_VLAN_TAG_LEN + \ ETH_HLEN + ETH_FCS_LEN, \ - L1_CACHE_BYTES) + cache_line_size())#define IS_TSO_HEADER (txq, addr) \ ((addr >= txq->tso_hdrs_phys) && \
Signature · 1 line
2.8.0.rc3
From: Jisheng Zhang <[email protected]>
Date: Fri, 1 Apr 2016 17:12:49 +0800
Quoted 5 lines
L1_CACHE_BYTESmay not be the real cacheline size, usecache_line_sizeto determine the cacheline size in runtime.Signed-off-by Jisheng Zhang <[email protected]>Suggested-by Marcin Wojtas <[email protected]>
Applied.