net/dpaa2: remove port level buffer layout definition
authorHemant Agrawal <hemant.agrawal@nxp.com>
Fri, 26 May 2017 06:51:07 +0000 (12:21 +0530)
committerFerruh Yigit <ferruh.yigit@intel.com>
Mon, 12 Jun 2017 09:41:26 +0000 (10:41 +0100)
This code in device init is not required, as the buffer
layout setting is also being programmed during queue configuration.

Signed-off-by: Hemant Agrawal <hemant.agrawal@nxp.com>
drivers/net/dpaa2/dpaa2_ethdev.c

index 4576442..f4c73de 100644 (file)
@@ -761,7 +761,6 @@ dpaa2_dev_init(struct rte_eth_dev *eth_dev)
        struct dpaa2_dev_priv *priv = eth_dev->data->dev_private;
        struct dpni_buffer_layout layout;
        int i, ret, hw_id;
-       int tot_size;
 
        PMD_INIT_FUNC_TRACE();
 
@@ -854,30 +853,6 @@ dpaa2_dev_init(struct rte_eth_dev *eth_dev)
                return -ret;
        }
 
-       /* ... rx buffer layout ... */
-       tot_size = DPAA2_HW_BUF_RESERVE + 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_FRAME_STATUS |
-                               DPNI_BUF_LAYOUT_OPT_PARSER_RESULT |
-                               DPNI_BUF_LAYOUT_OPT_DATA_HEAD_ROOM |
-                               DPNI_BUF_LAYOUT_OPT_PRIVATE_DATA_SIZE;
-
-       layout.pass_frame_status = 1;
-       layout.data_head_room = tot_size
-               - DPAA2_FD_PTA_SIZE - DPAA2_MBUF_HW_ANNOTATION;
-       layout.private_data_size = DPAA2_FD_PTA_SIZE;
-       layout.pass_parser_result = 1;
-       PMD_INIT_LOG(DEBUG, "Tot_size = %d, head room = %d, private = %d",
-                    tot_size, layout.data_head_room, layout.private_data_size);
-       ret = dpni_set_buffer_layout(dpni_dev, CMD_PRI_LOW, priv->token,
-                                    DPNI_QUEUE_RX, &layout);
-       if (ret) {
-               PMD_INIT_LOG(ERR, "Err(%d) in setting rx buffer layout", ret);
-               return -1;
-       }
 
        /* ... tx buffer layout ... */
        memset(&layout, 0, sizeof(struct dpni_buffer_layout));