| 378 | } |
| 379 | |
| 380 | static int |
| 381 | test_classify_buid(struct rte_acl_ctx *acx, |
| 382 | const struct rte_acl_ipv4vlan_rule *rules, uint32_t num) |
| 383 | { |
| 384 | int ret; |
| 385 | |
| 386 | /* add rules to the context */ |
| 387 | ret = rte_acl_ipv4vlan_add_rules(acx, rules, num); |
| 388 | if (ret != 0) { |
| 389 | printf("Line %i: Adding rules to ACL context failed!\n", |
| 390 | __LINE__); |
| 391 | return ret; |
| 392 | } |
| 393 | |
| 394 | /* try building the context */ |
| 395 | ret = rte_acl_ipv4vlan_build(acx, ipv4_7tuple_layout, |
| 396 | RTE_ACL_MAX_CATEGORIES); |
| 397 | if (ret != 0) { |
| 398 | printf("Line %i: Building ACL context failed!\n", __LINE__); |
| 399 | return ret; |
| 400 | } |
| 401 | |
| 402 | return 0; |
| 403 | } |
| 404 | |
| 405 | #define TEST_CLASSIFY_ITER 4 |
| 406 |
no test coverage detected