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

Function table_lookup

dpdk/lib/table/rte_swx_table_wm.c:433–458  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

431}
432
433static int
434table_lookup(void *table,
435 void *mailbox __rte_unused,
436 const uint8_t **key,
437 uint64_t *action_id,
438 uint8_t **action_data,
439 size_t *entry_id,
440 int *hit)
441{
442 struct table *t = table;
443 uint8_t *data;
444 uint32_t user_data;
445
446 rte_acl_classify(t->acl_ctx, key, &user_data, 1, 1);
447 if (!user_data) {
448 *hit = 0;
449 return 1;
450 }
451
452 data = &t->data[(user_data - 1) * t->entry_data_size];
453 *action_id = ((uint64_t *)data)[0];
454 *action_data = &data[8];
455 *entry_id = user_data - 1;
456 *hit = 1;
457 return 1;
458}
459
460struct rte_swx_table_ops rte_swx_table_wildcard_match_ops = {
461 .footprint_get = NULL,

Callers

nothing calls this directly

Calls 1

rte_acl_classifyFunction · 0.85

Tested by

no test coverage detected