aboutsummaryrefslogtreecommitdiffstats
path: root/target/linux/layerscape/patches-5.4/701-net-0295-staging-fsl_ppfe-eth-calculate-PFE_PKT_SIZE-with-SKB.patch
blob: f42ec78f09f2de92e41aff857ed7308a3065f4ad (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
From 2f59069dbb48ee86bee42bf36a4dfafe64028344 Mon Sep 17 00:00:00 2001
From: Calvin Johnson <calvin.johnson@nxp.com>
Date: Thu, 8 Mar 2018 13:58:38 +0530
Subject: [PATCH] staging: fsl_ppfe/eth: calculate PFE_PKT_SIZE with
 SKB_DATA_ALIGN

pfe packet size was calculated without considering skb data alignment
and this resulted in jumbo frames crashing kernel when the
cacheline size increased from 64 to 128 bytes with
commit 97303480753e ("arm64: Increase the max granular size").

Modify pfe packet size caclulation to include skb data alignment of
sizeof(struct skb_shared_info).

Signed-off-by: Calvin Johnson <calvin.johnson@nxp.com>
---
 drivers/staging/fsl_ppfe/pfe_hif_lib.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

--- a/drivers/staging/fsl_ppfe/pfe_hif_lib.h
+++ b/drivers/staging/fsl_ppfe/pfe_hif_lib.h
@@ -146,7 +146,7 @@ struct tx_queue_desc {
 #define PFE_BUF_SIZE		2048
 #define PFE_PKT_HEADROOM	128
 
-#define SKB_SHARED_INFO_SIZE   (sizeof(struct skb_shared_info))
+#define SKB_SHARED_INFO_SIZE   SKB_DATA_ALIGN(sizeof(struct skb_shared_info))
 #define PFE_PKT_SIZE		(PFE_BUF_SIZE - PFE_PKT_HEADROOM \
 				 - SKB_SHARED_INFO_SIZE)
 #define MAX_L2_HDR_SIZE		14	/* Not correct for VLAN/PPPoE */