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

Function assign_rings

dpdk/examples/dma/dmafwd.c:860–878  ·  view source on GitHub ↗

Assign ring structures for packet exchanging. 8< */

Source from the content-addressed store, hash-verified

858
859/* Assign ring structures for packet exchanging. 8< */
860static void
861assign_rings(void)
862{
863 uint32_t i;
864
865 for (i = 0; i < cfg.nb_ports; i++) {
866 char ring_name[RTE_RING_NAMESIZE];
867
868 snprintf(ring_name, sizeof(ring_name), "rx_to_tx_ring_%u", i);
869 /* Create ring for inter core communication */
870 cfg.ports[i].rx_to_tx_ring = rte_ring_create(
871 ring_name, ring_size,
872 rte_socket_id(), RING_F_SP_ENQ | RING_F_SC_DEQ);
873
874 if (cfg.ports[i].rx_to_tx_ring == NULL)
875 rte_exit(EXIT_FAILURE, "Ring create failed: %s\n",
876 rte_strerror(rte_errno));
877 }
878}
879/* >8 End of assigning ring structures for packet exchanging. */
880
881static uint32_t

Callers 1

mainFunction · 0.85

Calls 5

snprintfFunction · 0.85
rte_ring_createFunction · 0.85
rte_socket_idFunction · 0.85
rte_exitFunction · 0.85
rte_strerrorFunction · 0.85

Tested by

no test coverage detected