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

Function rte_acl_ipv4vlan_build

dpdk/app/test/test_acl.c:263–276  ·  view source on GitHub ↗

* 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

Source from the content-addressed store, hash-verified

261 * - Zero if operation completed successfully.
262 */
263static int
264rte_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).

Callers 4

test_classify_buidFunction · 0.85
test_invalid_layoutFunction · 0.85
test_create_find_addFunction · 0.85
test_invalid_parametersFunction · 0.85

Calls 3

memsetFunction · 0.85
acl_ipv4vlan_configFunction · 0.85
rte_acl_buildFunction · 0.85

Tested by

no test coverage detected