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

Method SetSize

core/modules/queue.cc:216–232  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

214}
215
216CommandResponse Queue::SetSize(uint64_t size) {
217 if (size < 4 || size > 16384) {
218 return CommandFailure(EINVAL, "must be in [4, 16384]");
219 }
220
221 if (size & (size - 1)) {
222 return CommandFailure(EINVAL, "must be a power of 2");
223 }
224
225 int ret = Resize(size);
226 if (ret) {
227 return CommandFailure(-ret);
228 }
229 size_ = size;
230
231 return CommandSuccess();
232}
233
234CommandResponse Queue::CommandSetSize(
235 const bess::pb::QueueCommandSetSizeArg &arg) {

Callers

nothing calls this directly

Calls 2

CommandFailureFunction · 0.85
CommandSuccessFunction · 0.85

Tested by

no test coverage detected