MCPcopy Create free account
hub / github.com/NetSys/bess / AddNewFlow

Method AddNewFlow

core/modules/drr.cc:309–329  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

307}
308
309void DRR::AddNewFlow(bess::Packet *pkt, FlowId id, int *err) {
310 // creates flow
311 Flow *f = new Flow(id);
312
313 // TODO(joshua) do proper error checking
314 f->queue = AddQueue(static_cast<int>(kFlowQueueSize), err);
315
316 if (*err != 0) {
317 return;
318 }
319
320 flows_.Insert(id, f);
321
322 Enqueue(f, pkt, err);
323 if (*err != 0) {
324 return;
325 }
326
327 // puts flow in round robin
328 *err = llring_enqueue(flow_ring_, f);
329}
330
331void DRR::RemoveFlow(Flow *f) {
332 if (f == current_flow_) {

Callers

nothing calls this directly

Calls 2

llring_enqueueFunction · 0.85
InsertMethod · 0.45

Tested by

no test coverage detected