| 2586 | } |
| 2587 | |
| 2588 | void |
| 2589 | stop_packet_forwarding(void) |
| 2590 | { |
| 2591 | port_fwd_end_t port_fwd_end; |
| 2592 | lcoreid_t lc_id; |
| 2593 | portid_t pt_id; |
| 2594 | int i; |
| 2595 | |
| 2596 | if (test_done) { |
| 2597 | fprintf(stderr, "Packet forwarding not started\n"); |
| 2598 | return; |
| 2599 | } |
| 2600 | printf("Telling cores to stop..."); |
| 2601 | for (lc_id = 0; lc_id < cur_fwd_config.nb_fwd_lcores; lc_id++) |
| 2602 | fwd_lcores[lc_id]->stopped = 1; |
| 2603 | printf("\nWaiting for lcores to finish...\n"); |
| 2604 | rte_eal_mp_wait_lcore(); |
| 2605 | port_fwd_end = cur_fwd_config.fwd_eng->port_fwd_end; |
| 2606 | if (port_fwd_end != NULL) { |
| 2607 | for (i = 0; i < cur_fwd_config.nb_fwd_ports; i++) { |
| 2608 | pt_id = fwd_ports_ids[i]; |
| 2609 | (*port_fwd_end)(pt_id); |
| 2610 | } |
| 2611 | } |
| 2612 | |
| 2613 | fwd_stats_display(); |
| 2614 | |
| 2615 | printf("\nDone.\n"); |
| 2616 | test_done = 1; |
| 2617 | } |
| 2618 | |
| 2619 | void |
| 2620 | dev_set_link_up(portid_t pid) |
no test coverage detected