}
snprintf(addresses[port], sizeof(addresses[port]),
- "%02x:%02x:%02x:%02x:%02x:%02x\n",
+ RTE_ETHER_ADDR_PRT_FMT "\n",
mac.addr_bytes[0], mac.addr_bytes[1],
mac.addr_bytes[2], mac.addr_bytes[3],
mac.addr_bytes[4], mac.addr_bytes[5]);
* thread in the server process, when the process is run with more
* than one lcore enabled.
*/
+
+/* Display recorded statistics. 8< */
static void
do_stats_display(void)
{
printf("\n");
}
+/* >8 End of displaying the recorded statistics. */
/*
* The function called from each non-main lcore used by the process.
* send a burst of traffic to a node, assuming there are packets
* available to be sent to this node
*/
+
+/* Flush rx queue. 8< */
static void
flush_rx_queue(uint16_t node)
{
cl_rx_buf[node].count = 0;
}
+/* >8 End of sending a burst of traffic to a node. */
/*
* marks a packet down to be sent to a particular node process
/*
* This function takes a group of packets and routes them
* individually to the node process. Very simply round-robins the packets
- * without checking any of the packet contents.
+ * without checking any of the packet contents. 8<
*/
+
+/* Processing packets. 8< */
static void
process_packets(uint32_t port_num __rte_unused, struct rte_mbuf *pkts[],
uint16_t rx_count, unsigned int socket_id)
for (i = 0; i < num_nodes; i++)
flush_rx_queue(i);
}
+/* >8 End of process_packets. */
/*
* Function called by the main lcore of the DPDK process.
rte_eal_mp_remote_launch(sleep_lcore, NULL, SKIP_MAIN);
do_packet_forwarding();
+
+ /* clean up the EAL */
+ rte_eal_cleanup();
+
return 0;
}