MCPcopy Create free account
hub / github.com/F-Stack/f-stack / stop_packet_forwarding

Function stop_packet_forwarding

dpdk/app/test-pmd/testpmd.c:2588–2617  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

2586}
2587
2588void
2589stop_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
2619void
2620dev_set_link_up(portid_t pid)

Callers 3

pmd_test_exitFunction · 0.85
rmv_port_callbackFunction · 0.85
cmd_stop_parsedFunction · 0.85

Calls 3

rte_eal_mp_wait_lcoreFunction · 0.85
fwd_stats_displayFunction · 0.85
printfFunction · 0.50

Tested by

no test coverage detected