From: Hemant Agrawal Date: Fri, 26 May 2017 06:51:07 +0000 (+0530) Subject: net/dpaa2: remove port level buffer layout definition X-Git-Tag: spdx-start~3139 X-Git-Url: http://git.droids-corp.org/?a=commitdiff_plain;h=19b7dc6a263f7bbb718e551c8c500ca2eac4aa04;p=dpdk.git net/dpaa2: remove port level buffer layout definition 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 --- diff --git a/drivers/net/dpaa2/dpaa2_ethdev.c b/drivers/net/dpaa2/dpaa2_ethdev.c index 4576442092..f4c73def15 100644 --- a/drivers/net/dpaa2/dpaa2_ethdev.c +++ b/drivers/net/dpaa2/dpaa2_ethdev.c @@ -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));