kernel-5.4: bump to 5.4.102 and refresh patches
[openwrt/openwrt.git] / target / linux / layerscape / patches-5.4 / 701-net-0298-staging-fsl_ppfe-eth-HW-parse-results-for-DPDK.patch
1 From fd2bdf555ab192a96a44fa02f701095b24448d47 Mon Sep 17 00:00:00 2001
2 From: anuj batham <anuj.batham@nxp.com>
3 Date: Fri, 27 Apr 2018 14:38:09 +0530
4 Subject: [PATCH] staging: fsl_ppfe/eth: HW parse results for DPDK
5
6 HW Parse results are included in the packet headroom.
7 Length and Offset calculation now accommodates parse info size.
8
9 Signed-off-by: Archana Madhavan <archana.madhavan@nxp.com>
10 ---
11 drivers/staging/fsl_ppfe/pfe_hif_lib.c | 7 +++++--
12 drivers/staging/fsl_ppfe/pfe_hif_lib.h | 1 +
13 2 files changed, 6 insertions(+), 2 deletions(-)
14
15 --- a/drivers/staging/fsl_ppfe/pfe_hif_lib.c
16 +++ b/drivers/staging/fsl_ppfe/pfe_hif_lib.c
17 @@ -435,6 +435,7 @@ void *hif_lib_receive_pkt(struct hif_cli
18 u16 size = *rx_ctrl >> HIF_CTRL_RX_OFFSET_OFST;
19
20 if (size) {
21 + size += PFE_PARSE_INFO_SIZE;
22 *len = CL_DESC_BUF_LEN(desc->ctrl) -
23 PFE_PKT_HEADER_SZ - size;
24 *ofst = pfe_pkt_headroom + PFE_PKT_HEADER_SZ
25 @@ -442,8 +443,10 @@ void *hif_lib_receive_pkt(struct hif_cli
26 *priv_data = desc->data + PFE_PKT_HEADER_SZ;
27 } else {
28 *len = CL_DESC_BUF_LEN(desc->ctrl) -
29 - PFE_PKT_HEADER_SZ;
30 - *ofst = pfe_pkt_headroom + PFE_PKT_HEADER_SZ;
31 + PFE_PKT_HEADER_SZ - PFE_PARSE_INFO_SIZE;
32 + *ofst = pfe_pkt_headroom
33 + + PFE_PKT_HEADER_SZ
34 + + PFE_PARSE_INFO_SIZE;
35 *priv_data = NULL;
36 }
37
38 --- a/drivers/staging/fsl_ppfe/pfe_hif_lib.h
39 +++ b/drivers/staging/fsl_ppfe/pfe_hif_lib.h
40 @@ -23,6 +23,7 @@
41
42 #define HIF_CL_REQ_TIMEOUT 10
43 #define GFP_DMA_PFE 0
44 +#define PFE_PARSE_INFO_SIZE 16
45
46 enum {
47 REQUEST_CL_REGISTER = 0,