| 1805 | } |
| 1806 | |
| 1807 | static int |
| 1808 | start_forwarding(void *data __rte_unused) |
| 1809 | { |
| 1810 | int lcore = rte_lcore_id(); |
| 1811 | int stream_id; |
| 1812 | uint16_t cnt; |
| 1813 | struct lcore_info *li = &lcore_infos[lcore]; |
| 1814 | |
| 1815 | if (!li->mode) |
| 1816 | return 0; |
| 1817 | |
| 1818 | if (li->mode == LCORE_MODE_STATS) { |
| 1819 | printf(":: started stats on lcore %u\n", lcore); |
| 1820 | packet_per_second_stats(); |
| 1821 | return 0; |
| 1822 | } |
| 1823 | |
| 1824 | while (!force_quit) |
| 1825 | for (stream_id = 0; stream_id < MAX_STREAMS; stream_id++) { |
| 1826 | if (li->streams[stream_id].rx_port == -1) |
| 1827 | continue; |
| 1828 | |
| 1829 | cnt = do_rx(li, |
| 1830 | li->streams[stream_id].rx_port, |
| 1831 | li->streams[stream_id].rx_queue); |
| 1832 | if (cnt) |
| 1833 | do_tx(li, cnt, |
| 1834 | li->streams[stream_id].tx_port, |
| 1835 | li->streams[stream_id].tx_queue); |
| 1836 | } |
| 1837 | return 0; |
| 1838 | } |
| 1839 | |
| 1840 | static void |
| 1841 | init_lcore_info(void) |
nothing calls this directly
no test coverage detected