* Analyze set of ipv4vlan rules and build required internal * run-time structures. * This function is not multi-thread safe. * * @param ctx * ACL context to build. * @param layout * Layout of input data to search through. * @param num_categories * Maximum number of categories to use in that build. * @return * - -ENOMEM if couldn't allocate enough memory. * - -EINVAL if the pa
| 261 | * - Zero if operation completed successfully. |
| 262 | */ |
| 263 | static int |
| 264 | rte_acl_ipv4vlan_build(struct rte_acl_ctx *ctx, |
| 265 | const uint32_t layout[RTE_ACL_IPV4VLAN_NUM], |
| 266 | uint32_t num_categories) |
| 267 | { |
| 268 | struct rte_acl_config cfg; |
| 269 | |
| 270 | if (ctx == NULL || layout == NULL) |
| 271 | return -EINVAL; |
| 272 | |
| 273 | memset(&cfg, 0, sizeof(cfg)); |
| 274 | acl_ipv4vlan_config(&cfg, layout, num_categories); |
| 275 | return rte_acl_build(ctx, &cfg); |
| 276 | } |
| 277 | |
| 278 | /* |
| 279 | * Test ACL lookup (selected alg). |
no test coverage detected