| 59 | } |
| 60 | |
| 61 | static int |
| 62 | route4_rewirte_table_update(struct route_ipv4_config *ipv4route) |
| 63 | { |
| 64 | uint8_t depth; |
| 65 | int portid; |
| 66 | |
| 67 | portid = ethdev_portid_by_ip4(ipv4route->via, ipv4route->netmask); |
| 68 | if (portid < 0) { |
| 69 | printf("Invalid portid found to install the route\n"); |
| 70 | return portid; |
| 71 | } |
| 72 | |
| 73 | depth = convert_netmask_to_depth(ipv4route->netmask); |
| 74 | |
| 75 | return rte_node_ip4_route_add(ipv4route->ip, depth, portid, |
| 76 | RTE_NODE_IP4_LOOKUP_NEXT_REWRITE); |
| 77 | } |
| 78 | |
| 79 | static int |
| 80 | route_ip4_add(struct route_ipv4_config *route) |
no test coverage detected