MCPcopy Create free account
hub / github.com/F-Stack/f-stack / __rte_format_printf

Function __rte_format_printf

dpdk/app/test/test_dmadev.c:52–90  ·  view source on GitHub ↗
(3, 4)

Source from the content-addressed store, hash-verified

50};
51
52static void
53__rte_format_printf(3, 4)
54print_err(const char *func, int lineno, const char *format, ...)
55{
56 va_list ap;
57
58 fprintf(stderr, "In %s:%d - ", func, lineno);
59 va_start(ap, format);
60 vfprintf(stderr, format, ap);
61 va_end(ap);
62}
63
64static int
65runtest(const char *printable, int (*test_fn)(int16_t dev_id, uint16_t vchan), int iterations,
66 int16_t dev_id, uint16_t vchan, bool check_err_stats)
67{
68 struct rte_dma_stats stats;
69 int i;
70
71 rte_dma_stats_reset(dev_id, vchan);
72 printf("DMA Dev %d: Running %s Tests %s\n", dev_id, printable,
73 check_err_stats ? " " : "(errors expected)");
74 for (i = 0; i < iterations; i++) {
75 if (test_fn(dev_id, vchan) < 0)
76 return -1;
77
78 rte_dma_stats_get(dev_id, 0, &stats);
79 printf("Ops submitted: %"PRIu64"\t", stats.submitted);
80 printf("Ops completed: %"PRIu64"\t", stats.completed);
81 printf("Errors: %"PRIu64"\r", stats.errors);
82
83 if (stats.completed != stats.submitted)
84 ERR_RETURN("\nError, not all submitted jobs are reported as completed\n");
85 if (check_err_stats && stats.errors != 0)
86 ERR_RETURN("\nErrors reported during op processing, aborting tests\n");
87 }
88 printf("\n");
89 return 0;
90}
91
92static void
93await_hw(int16_t dev_id, uint16_t vchan)

Callers 1

rte_log.hFile · 0.50

Calls 3

rte_dma_stats_resetFunction · 0.85
rte_dma_stats_getFunction · 0.85
printfFunction · 0.50

Tested by

no test coverage detected