testsuite_setup(void)
{
uint8_t count;
+
+ total = 0;
+ passed = 0;
+ failed = 0;
+ unsupported = 0;
+
count = rte_rawdev_count();
if (!count) {
SKELDEV_TEST_INFO("\tNo existing rawdev; "
struct skeleton_rawdev_conf rdev_conf_get = {0};
/* Check invalid configuration */
- ret = rte_rawdev_configure(test_dev_id, NULL);
+ ret = rte_rawdev_configure(test_dev_id, NULL, 0);
RTE_TEST_ASSERT(ret == -EINVAL,
"Null configure; Expected -EINVAL, got %d", ret);
rdev_info.dev_private = &rdev_conf_set;
ret = rte_rawdev_configure(test_dev_id,
- (rte_rawdev_obj_t)&rdev_info);
+ (rte_rawdev_obj_t)&rdev_info,
+ sizeof(rdev_conf_set));
RTE_TEST_ASSERT_SUCCESS(ret, "Failed to configure rawdev (%d)", ret);
rdev_info.dev_private = &rdev_conf_get;
* depth = DEF_DEPTH
*/
for (i = 0; i < rdev_conf_get.num_queues; i++) {
- rte_rawdev_queue_conf_get(test_dev_id, i, &q);
+ rte_rawdev_queue_conf_get(test_dev_id, i, &q, sizeof(q));
RTE_TEST_ASSERT_EQUAL(q.depth, SKELETON_QUEUE_DEF_DEPTH,
"Invalid default depth of queue (%d)",
q.depth);
/* Modify the queue depth for Queue 0 and attach it */
qset.depth = 15;
qset.state = SKELETON_QUEUE_ATTACH;
- ret = rte_rawdev_queue_setup(test_dev_id, 0, &qset);
+ ret = rte_rawdev_queue_setup(test_dev_id, 0, &qset, sizeof(qset));
RTE_TEST_ASSERT_SUCCESS(ret, "Failed to setup queue (%d)", ret);
/* Now, fetching the queue 0 should show depth as 15 */
- ret = rte_rawdev_queue_conf_get(test_dev_id, 0, &qget);
+ ret = rte_rawdev_queue_conf_get(test_dev_id, 0, &qget, sizeof(qget));
RTE_TEST_ASSERT_SUCCESS(ret, "Failed to get queue config (%d)", ret);
RTE_TEST_ASSERT_EQUAL(qset.depth, qget.depth,
RTE_TEST_ASSERT_SUCCESS(ret, "Failed to release queue 0; (%d)", ret);
/* Now, fetching the queue 0 should show depth as default */
- ret = rte_rawdev_queue_conf_get(test_dev_id, 0, &qget);
+ ret = rte_rawdev_queue_conf_get(test_dev_id, 0, &qget, sizeof(qget));
RTE_TEST_ASSERT_SUCCESS(ret, "Failed to get queue config (%d)", ret);
RTE_TEST_ASSERT_EQUAL(qget.depth, SKELETON_QUEUE_DEF_DEPTH,
dummy_value = &set_value;
*dummy_value = 200;
ret = rte_rawdev_set_attr(test_dev_id, "Test2", (uintptr_t)dummy_value);
+ RTE_TEST_ASSERT(!ret, "Unable to set an attribute (Test2)");
/* Check if attributes have been set */
ret = rte_rawdev_get_attr(test_dev_id, "Test1", &ret_value);
RTE_TEST_ASSERT_EQUAL((unsigned int)ret, count,
"Unable to dequeue buffers");
- if (deq_buffers)
- free(deq_buffers);
+ free(deq_buffers);
return TEST_SUCCESS;
cleanup:
- if (buffers[0].buf_addr)
- free(buffers[0].buf_addr);
+ free(buffers[0].buf_addr);
return TEST_FAILED;
}