net/dpaa2: stop using software annotation
authorHemant Agrawal <hemant.agrawal@nxp.com>
Fri, 26 May 2017 06:51:08 +0000 (12:21 +0530)
committerFerruh Yigit <ferruh.yigit@intel.com>
Mon, 12 Jun 2017 09:41:26 +0000 (10:41 +0100)
The DPAA2 driver is not using the DPAA2 frame descriptor
software annotation area. This patch reduces the
PTA length to zero and adjust the RX Buffer Layout
accordingly.

Signed-off-by: Hemant Agrawal <hemant.agrawal@nxp.com>
drivers/bus/fslmc/portal/dpaa2_hw_pvt.h
drivers/net/dpaa2/base/dpaa2_hw_dpni.c
drivers/net/dpaa2/dpaa2_ethdev.c

index c022373..9ffcec3 100644 (file)
@@ -65,7 +65,7 @@
 
 #define MAX_BPID 256
 #define DPAA2_MBUF_HW_ANNOTATION       64
-#define DPAA2_FD_PTA_SIZE              64
+#define DPAA2_FD_PTA_SIZE              0
 
 #if (DPAA2_MBUF_HW_ANNOTATION + DPAA2_FD_PTA_SIZE) > RTE_PKTMBUF_HEADROOM
 #error "Annotation requirement is more than RTE_PKTMBUF_HEADROOM"
index 3dc60cc..547025d 100644 (file)
@@ -306,15 +306,20 @@ dpaa2_attach_bp_list(struct dpaa2_dev_priv *priv,
         */
 
        /* ... rx buffer layout ... */
-       tot_size = DPAA2_HW_BUF_RESERVE + RTE_PKTMBUF_HEADROOM;
-       tot_size = RTE_ALIGN_CEIL(tot_size,
-                                 DPAA2_PACKET_LAYOUT_ALIGN);
+       tot_size = RTE_PKTMBUF_HEADROOM;
+       tot_size = RTE_ALIGN_CEIL(tot_size, DPAA2_PACKET_LAYOUT_ALIGN);
 
        memset(&layout, 0, sizeof(struct dpni_buffer_layout));
-       layout.options = DPNI_BUF_LAYOUT_OPT_DATA_HEAD_ROOM;
-
-       layout.data_head_room =
-               tot_size - DPAA2_FD_PTA_SIZE - DPAA2_MBUF_HW_ANNOTATION;
+       layout.options = DPNI_BUF_LAYOUT_OPT_DATA_HEAD_ROOM |
+                        DPNI_BUF_LAYOUT_OPT_FRAME_STATUS |
+                        DPNI_BUF_LAYOUT_OPT_PARSER_RESULT |
+                        DPNI_BUF_LAYOUT_OPT_PRIVATE_DATA_SIZE;
+
+       layout.pass_frame_status = 1;
+       layout.private_data_size = DPAA2_FD_PTA_SIZE;
+       layout.pass_parser_result = 1;
+       layout.data_head_room = tot_size - DPAA2_FD_PTA_SIZE -
+                               DPAA2_MBUF_HW_ANNOTATION;
        retcode = dpni_set_buffer_layout(dpni, CMD_PRI_LOW, priv->token,
                                         DPNI_QUEUE_RX, &layout);
        if (retcode) {
index f4c73de..007eda7 100644 (file)
@@ -284,7 +284,7 @@ dpaa2_dev_rx_queue_setup(struct rte_eth_dev *dev,
                cfg.flc.value &= 0xFFFFFFFFFFFFFFC0;
                /* 00 00 00 - last 6 bit represent annotation, context stashing,
                 * data stashing setting 01 01 00 (0x14) to enable
-                * 1 line annotation, 1 line context
+                * 1 line data, 1 line annotation
                 */
                cfg.flc.value |= 0x14;
        }