This function is placed here as it is required for both * performance and functional tests. */
| 223 | * performance and functional tests. |
| 224 | */ |
| 225 | static inline void * |
| 226 | test_ring_calloc(unsigned int rsize, int esize) |
| 227 | { |
| 228 | unsigned int sz; |
| 229 | void *p; |
| 230 | |
| 231 | /* Legacy queue APIs? */ |
| 232 | if (esize == -1) |
| 233 | sz = sizeof(void *); |
| 234 | else |
| 235 | sz = esize; |
| 236 | |
| 237 | p = rte_zmalloc(NULL, rsize * sz, RTE_CACHE_LINE_SIZE); |
| 238 | if (p == NULL) |
| 239 | printf("Failed to allocate memory\n"); |
| 240 | |
| 241 | return p; |
| 242 | } |
no test coverage detected