| 56 | } |
| 57 | |
| 58 | static int |
| 59 | ethdev_rx_map_add(char *name, uint32_t queue, uint32_t core) |
| 60 | { |
| 61 | uint64_t coremask; |
| 62 | uint16_t port_id; |
| 63 | int rc; |
| 64 | |
| 65 | if (nb_lcore_params >= ETHDEV_RX_LCORE_PARAMS_MAX) |
| 66 | return -EINVAL; |
| 67 | |
| 68 | rc = rte_eth_dev_get_port_by_name(name, &port_id); |
| 69 | if (rc) |
| 70 | return -EINVAL; |
| 71 | |
| 72 | coremask = graph_coremask_get(); |
| 73 | |
| 74 | if (!(coremask & (1 << core))) |
| 75 | return -EINVAL; |
| 76 | |
| 77 | rx_map_configure(port_id, queue, core); |
| 78 | |
| 79 | lcore_params_array[nb_lcore_params].port_id = port_id; |
| 80 | lcore_params_array[nb_lcore_params].queue_id = queue; |
| 81 | lcore_params_array[nb_lcore_params].lcore_id = core; |
| 82 | nb_lcore_params++; |
| 83 | return 0; |
| 84 | } |
| 85 | |
| 86 | static void |
| 87 | cli_ethdev_rx_help(__rte_unused void *parsed_result, __rte_unused struct cmdline *cl, |
no test coverage detected