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

Method CheckModuleConstraints

core/modules/queue.cc:255–268  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

253}
254
255CheckConstraintResult Queue::CheckModuleConstraints() const {
256 CheckConstraintResult status = CHECK_OK;
257 if (num_active_tasks() - tasks().size() < 1) { // Assume multi-producer.
258 LOG(ERROR) << "Queue has no producers";
259 status = CHECK_NONFATAL_ERROR;
260 }
261
262 if (tasks().size() > 1) { // Assume single consumer.
263 LOG(ERROR) << "More than one consumer for the queue" << name();
264 return CHECK_FATAL_ERROR;
265 }
266
267 return status;
268}
269
270ADD_MODULE(Queue, "queue",
271 "terminates current task and enqueue packets for new task")

Callers

nothing calls this directly

Calls 1

sizeMethod · 0.80

Tested by

no test coverage detected