| 255 | } |
| 256 | |
| 257 | static int |
| 258 | test_hash_multiwriter_main(void) |
| 259 | { |
| 260 | if (rte_lcore_count() < 2) { |
| 261 | printf("Not enough cores for distributor_autotest, expecting at least 2\n"); |
| 262 | return TEST_SKIPPED; |
| 263 | } |
| 264 | |
| 265 | setlocale(LC_NUMERIC, ""); |
| 266 | |
| 267 | |
| 268 | if (!rte_tm_supported()) { |
| 269 | printf("Hardware transactional memory (lock elision) " |
| 270 | "is NOT supported\n"); |
| 271 | } else { |
| 272 | printf("Hardware transactional memory (lock elision) " |
| 273 | "is supported\n"); |
| 274 | |
| 275 | printf("Test multi-writer with Hardware transactional memory\n"); |
| 276 | |
| 277 | use_htm = 1; |
| 278 | if (test_hash_multiwriter() < 0) |
| 279 | return -1; |
| 280 | } |
| 281 | |
| 282 | printf("Test multi-writer without Hardware transactional memory\n"); |
| 283 | use_htm = 0; |
| 284 | if (test_hash_multiwriter() < 0) |
| 285 | return -1; |
| 286 | |
| 287 | return 0; |
| 288 | } |
| 289 | |
| 290 | REGISTER_PERF_TEST(hash_multiwriter_autotest, test_hash_multiwriter_main); |
nothing calls this directly
no test coverage detected