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

Function action_get_by_id

dpdk/app/test-pmd/config.c:1534–1558  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1532}
1533
1534static struct port_indirect_action *
1535action_get_by_id(portid_t port_id, uint32_t id)
1536{
1537 struct rte_port *port;
1538 struct port_indirect_action **ppia;
1539 struct port_indirect_action *pia = NULL;
1540
1541 if (port_id_is_invalid(port_id, ENABLED_WARN) ||
1542 port_id == (portid_t)RTE_PORT_ALL)
1543 return NULL;
1544 port = &ports[port_id];
1545 ppia = &port->actions_list;
1546 while (*ppia) {
1547 if ((*ppia)->id == id) {
1548 pia = *ppia;
1549 break;
1550 }
1551 ppia = &(*ppia)->next;
1552 }
1553 if (!pia)
1554 fprintf(stderr,
1555 "Failed to find indirect action #%u on port %u\n",
1556 id, port_id);
1557 return pia;
1558}
1559
1560static int
1561action_alloc(portid_t port_id, uint32_t id,

Calls 1

port_id_is_invalidFunction · 0.85

Tested by

no test coverage detected