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

Function rte_table_action_create

dpdk/lib/pipeline/rte_table_action.c:2492–2516  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

2490};
2491
2492struct rte_table_action *
2493rte_table_action_create(struct rte_table_action_profile *profile,
2494 uint32_t socket_id)
2495{
2496 struct rte_table_action *action;
2497
2498 /* Check input arguments */
2499 if ((profile == NULL) ||
2500 (profile->frozen == 0))
2501 return NULL;
2502
2503 /* Memory allocation */
2504 action = rte_zmalloc_socket(NULL,
2505 sizeof(struct rte_table_action),
2506 RTE_CACHE_LINE_SIZE,
2507 socket_id);
2508 if (action == NULL)
2509 return NULL;
2510
2511 /* Initialization */
2512 memcpy(&action->cfg, &profile->cfg, sizeof(profile->cfg));
2513 memcpy(&action->data, &profile->data, sizeof(profile->data));
2514
2515 return action;
2516}
2517
2518static __rte_always_inline void *
2519action_data_get(void *data,

Callers 1

pipeline_table_createFunction · 0.85

Calls 2

rte_zmalloc_socketFunction · 0.85
memcpyFunction · 0.50

Tested by

no test coverage detected