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

Function configure_output_ports

dpdk/examples/server_node_efd/efd_node/node.c:164–184  ·  view source on GitHub ↗

* set up output ports so that all traffic on port gets sent out * its paired port. Index using actual port numbers since that is * what comes in the mbuf structure. */

Source from the content-addressed store, hash-verified

162 * what comes in the mbuf structure.
163 */
164static void
165configure_output_ports(const struct shared_info *info)
166{
167 int i;
168
169 if (info->num_ports > RTE_MAX_ETHPORTS)
170 rte_exit(EXIT_FAILURE, "Too many ethernet ports. "
171 "RTE_MAX_ETHPORTS = %u\n",
172 (unsigned int)RTE_MAX_ETHPORTS);
173 for (i = 0; i < info->num_ports - 1; i += 2) {
174 uint8_t p1 = info->id[i];
175 uint8_t p2 = info->id[i+1];
176
177 output_ports[p1] = p2;
178 output_ports[p2] = p1;
179
180 configure_tx_buffer(p1, MBQ_CAPACITY);
181 configure_tx_buffer(p2, MBQ_CAPACITY);
182
183 }
184}
185
186/*
187 * Create the hash table that will contain the flows that

Callers 1

mainFunction · 0.70

Calls 2

rte_exitFunction · 0.85
configure_tx_bufferFunction · 0.70

Tested by

no test coverage detected