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

Function rte_acl_set_ctx_classify

dpdk/lib/acl/rte_acl.c:263–283  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

261}
262
263extern int
264rte_acl_set_ctx_classify(struct rte_acl_ctx *ctx, enum rte_acl_classify_alg alg)
265{
266 int32_t rc;
267
268 /* formal parameters check */
269 if (ctx == NULL || (uint32_t)alg >= RTE_DIM(classify_fns))
270 return -EINVAL;
271
272 /* user asked us to select the *best* one */
273 if (alg == RTE_ACL_CLASSIFY_DEFAULT)
274 alg = acl_get_best_alg();
275
276 /* check that given alg is supported */
277 rc = acl_check_alg(alg);
278 if (rc != 0)
279 return rc;
280
281 ctx->alg = alg;
282 return 0;
283}
284
285int
286rte_acl_classify_alg(const struct rte_acl_ctx *ctx, const uint8_t **data,

Callers 3

test_classify_algFunction · 0.85
acx_initFunction · 0.85
app_acl_initFunction · 0.85

Calls 2

acl_get_best_algFunction · 0.85
acl_check_algFunction · 0.85

Tested by 1

test_classify_algFunction · 0.68