| 1532 | } |
| 1533 | |
| 1534 | static struct port_indirect_action * |
| 1535 | action_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 | |
| 1560 | static int |
| 1561 | action_alloc(portid_t port_id, uint32_t id, |
no test coverage detected