* BSD LICENSE
*
* Copyright (c) 2016 Freescale Semiconductor, Inc. All rights reserved.
- * Copyright (c) 2016 NXP. All rights reserved.
+ * Copyright 2016 NXP.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
#include <rte_cycles.h>
#include <rte_kvargs.h>
#include <rte_dev.h>
-#include <rte_ethdev.h>
#include <fslmc_logs.h>
#include <dpaa2_hw_pvt.h>
tc_cfg.dist_size = eth_dev->data->nb_rx_queues;
tc_cfg.dist_mode = DPNI_DIST_MODE_HASH;
- ret = dpni_prepare_key_cfg(&kg_cfg, p_params);
+ ret = dpkg_prepare_key_cfg(&kg_cfg, p_params);
if (ret) {
RTE_LOG(ERR, PMD, "Unable to prepare extract parameters\n");
rte_free(p_params);
&tc_cfg);
rte_free(p_params);
if (ret) {
- RTE_LOG(ERR, PMD, "Setting distribution for Rx failed with"
- " err code: %d\n", ret);
+ RTE_LOG(ERR, PMD,
+ "Setting distribution for Rx failed with err: %d\n",
+ ret);
return ret;
}
}
memset(p_params, 0, DIST_PARAM_IOVA_SIZE);
memset(&tc_cfg, 0, sizeof(struct dpni_rx_tc_dist_cfg));
-
+ kg_cfg.num_extracts = 0;
tc_cfg.key_cfg_iova = (uint64_t)(DPAA2_VADDR_TO_IOVA(p_params));
tc_cfg.dist_size = 0;
tc_cfg.dist_mode = DPNI_DIST_MODE_NONE;
- ret = dpni_prepare_key_cfg(&kg_cfg, p_params);
+ ret = dpkg_prepare_key_cfg(&kg_cfg, p_params);
if (ret) {
RTE_LOG(ERR, PMD, "Unable to prepare extract parameters\n");
rte_free(p_params);
ret = dpni_set_rx_tc_dist(dpni, CMD_PRI_LOW, priv->token, tc_index,
&tc_cfg);
rte_free(p_params);
- if (ret) {
- RTE_LOG(ERR, PMD, "Setting distribution for Rx failed with"
- " err code: %d\n", ret);
- return ret;
- }
+ if (ret)
+ RTE_LOG(ERR, PMD,
+ "Setting distribution for Rx failed with err: %d\n",
+ ret);
return ret;
}
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_DATA_ALIGN |
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_align = DPAA2_PACKET_LAYOUT_ALIGN;
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,
bpool_cfg.num_dpbp = 1;
bpool_cfg.pools[0].dpbp_id = bp_list->buf_pool.dpbp_node->dpbp_id;
bpool_cfg.pools[0].backup_pool = 0;
- bpool_cfg.pools[0].buffer_size =
- RTE_ALIGN_CEIL(bp_list->buf_pool.size,
- 256 /*DPAA2_PACKET_LAYOUT_ALIGN*/);
+ bpool_cfg.pools[0].buffer_size = RTE_ALIGN_CEIL(bp_list->buf_pool.size,
+ DPAA2_PACKET_LAYOUT_ALIGN);
+ bpool_cfg.pools[0].priority_mask = 0;
retcode = dpni_set_pools(dpni, CMD_PRI_LOW, priv->token, &bpool_cfg);
if (retcode != 0) {