/* SPDX-License-Identifier: BSD-3-Clause
- * Copyright 2018-2020 NXP
+ * Copyright 2018-2021 NXP
*/
#include <string.h>
DPAA2_QDMA_FUNC_TRACE();
- if (config_size != sizeof(*qdma_config))
+ if (config_size != sizeof(*qdma_config)) {
+ DPAA2_QDMA_ERR("Config size mismatch. Expected %" PRIu64
+ ", Got: %" PRIu64, (uint64_t)(sizeof(*qdma_config)),
+ (uint64_t)config_size);
return -EINVAL;
+ }
/* In case QDMA device is not in stopped state, return -EBUSY */
if (qdma_dev->state == 1) {
DPAA2_QDMA_FUNC_TRACE();
- if (conf_size != sizeof(*q_config))
+ if (conf_size != sizeof(*q_config)) {
+ DPAA2_QDMA_ERR("Config size mismatch. Expected %" PRIu64
+ ", Got: %" PRIu64, (uint64_t)(sizeof(*q_config)),
+ (uint64_t)conf_size);
return -EINVAL;
+ }
rte_spinlock_lock(&qdma_dev->lock);
/* SPDX-License-Identifier: BSD-3-Clause
- * Copyright 2018-2020 NXP
+ * Copyright 2018-2021 NXP
*/
#ifndef __RTE_PMD_DPAA2_QDMA_H__
#define rte_qdma_info rte_rawdev_info
#define rte_qdma_start(id) rte_rawdev_start(id)
#define rte_qdma_reset(id) rte_rawdev_reset(id)
-#define rte_qdma_configure(id, cf) rte_rawdev_configure(id, cf)
+#define rte_qdma_configure(id, cf, sz) rte_rawdev_configure(id, cf, sz)
#define rte_qdma_dequeue_buffers(id, buf, num, ctxt) \
rte_rawdev_dequeue_buffers(id, buf, num, ctxt)
#define rte_qdma_enqueue_buffers(id, buf, num, ctxt) \
rte_rawdev_enqueue_buffers(id, buf, num, ctxt)
-#define rte_qdma_queue_setup(id, qid, cfg) \
- rte_rawdev_queue_setup(id, qid, cfg)
+#define rte_qdma_queue_setup(id, qid, cfg, sz) \
+ rte_rawdev_queue_setup(id, qid, cfg, sz)
/*TODO introduce per queue stats API in rawdew */
/**