summaryrefslogtreecommitdiffstats
path: root/src/rpc-server/commands/trex_rpc_cmd_stream.cpp
diff options
context:
space:
mode:
authorimarom <imarom@cisco.com>2016-09-25 14:58:51 +0300
committerimarom <imarom@cisco.com>2016-09-25 15:08:09 +0300
commitd94e6a00edc22a1dd4946b3603aebb29319ce5ce (patch)
treefebed00c2f93adcc0519fcf9b6ee3c81d66d2178 /src/rpc-server/commands/trex_rpc_cmd_stream.cpp
parente768dc68155ba835882733753844a570d8384646 (diff)
split multicore - all tests pass
Diffstat (limited to 'src/rpc-server/commands/trex_rpc_cmd_stream.cpp')
-rw-r--r--src/rpc-server/commands/trex_rpc_cmd_stream.cpp21
1 files changed, 14 insertions, 7 deletions
diff --git a/src/rpc-server/commands/trex_rpc_cmd_stream.cpp b/src/rpc-server/commands/trex_rpc_cmd_stream.cpp
index becd51c5..3afa2457 100644
--- a/src/rpc-server/commands/trex_rpc_cmd_stream.cpp
+++ b/src/rpc-server/commands/trex_rpc_cmd_stream.cpp
@@ -241,14 +241,21 @@ TrexRpcCmdAddStream::parse_vm_instr_tuple_flow_var(const Json::Value &inst, std:
uint32_t limit_flows = parse_uint32(inst, "limit_flows", result);
uint16_t flags = parse_uint16(inst, "flags", result);
+ /* archiecture limitation - limit_flows must be greater or equal to DP core count */
+ if (limit_flows < get_stateless_obj()->get_dp_core_count()) {
+ std::stringstream ss;
+ ss << "cannot limit flows to less than " << (uint32_t)get_stateless_obj()->get_dp_core_count();
+ generate_execute_err(result, ss.str());
+ }
+
stream->m_vm.add_instruction(new StreamVmInstructionFlowClient(flow_var_name,
- ip_min,
- ip_max,
- port_min,
- port_max,
- limit_flows,
- flags
- ));
+ ip_min,
+ ip_max,
+ port_min,
+ port_max,
+ limit_flows,
+ flags
+ ));
}