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

Function initial_flow_to_port_assignment

dpdk/drivers/event/dsw/dsw_evdev.c:251–267  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

249
250
251static void
252initial_flow_to_port_assignment(struct dsw_evdev *dsw)
253{
254 uint8_t queue_id;
255 for (queue_id = 0; queue_id < dsw->num_queues; queue_id++) {
256 struct dsw_queue *queue = &dsw->queues[queue_id];
257 uint16_t flow_hash;
258 for (flow_hash = 0; flow_hash < DSW_MAX_FLOWS; flow_hash++) {
259 uint8_t port_idx =
260 rte_rand() % queue->num_serving_ports;
261 uint8_t port_id =
262 queue->serving_ports[port_idx];
263 dsw->queues[queue_id].flow_to_port_map[flow_hash] =
264 port_id;
265 }
266 }
267}
268
269static int
270dsw_start(struct rte_eventdev *dev)

Callers 1

dsw_startFunction · 0.85

Calls 1

rte_randFunction · 0.85

Tested by

no test coverage detected