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
6 HW Parse results are included in the packet headroom.
7 Length and Offset calculation now accommodates parse info size.
9 Signed-off-by: Archana Madhavan <archana.madhavan@nxp.com>
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(-)
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;
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;
28 *len = CL_DESC_BUF_LEN(desc->ctrl) -
30 - *ofst = pfe_pkt_headroom + PFE_PKT_HEADER_SZ;
31 + PFE_PKT_HEADER_SZ - PFE_PARSE_INFO_SIZE;
32 + *ofst = pfe_pkt_headroom
34 + + PFE_PARSE_INFO_SIZE;
38 --- a/drivers/staging/fsl_ppfe/pfe_hif_lib.h
39 +++ b/drivers/staging/fsl_ppfe/pfe_hif_lib.h
42 #define HIF_CL_REQ_TIMEOUT 10
44 +#define PFE_PARSE_INFO_SIZE 16
47 REQUEST_CL_REGISTER = 0,