summaryrefslogtreecommitdiffstats
path: root/src/rpc-server
diff options
context:
space:
mode:
authorimarom <imarom@cisco.com>2016-09-27 09:08:41 +0300
committerimarom <imarom@cisco.com>2016-09-27 09:23:47 +0300
commitffff2512ebbd65773a784565ce78d51d2ceb9a8d (patch)
treed6aae90ae98a1016168b829512de34157af4c32e /src/rpc-server
parent1e6b2bf6001275bdd2ab0691f335bbb7966bf619 (diff)
fix regression issues with step/init values
TODO: random limit currently does not support limit less than core count - it is possible to solve this by giving redundant cores the same seed and limit (currently it is blocked)
Diffstat (limited to 'src/rpc-server')
-rw-r--r--src/rpc-server/commands/trex_rpc_cmd_stream.cpp11
1 files changed, 6 insertions, 5 deletions
diff --git a/src/rpc-server/commands/trex_rpc_cmd_stream.cpp b/src/rpc-server/commands/trex_rpc_cmd_stream.cpp
index bf48931a..f0eadef6 100644
--- a/src/rpc-server/commands/trex_rpc_cmd_stream.cpp
+++ b/src/rpc-server/commands/trex_rpc_cmd_stream.cpp
@@ -359,11 +359,12 @@ TrexRpcCmdAddStream::parse_vm_instr_flow_var_rand_limit(const Json::Value &inst,
uint64_t min_value = parse_uint64(inst, "min_value", result);
uint64_t max_value = parse_uint64(inst, "max_value", result);
- if (limit < 1 ) {
- std::stringstream ss;
- ss << "VM: request random flow var variable with limit of zero '";
- generate_parse_err(result, ss.str());
- }
+ /* archiecture limitation - limit_flows must be greater or equal to DP core count */
+ if (limit < get_stateless_obj()->get_dp_core_count()) {
+ std::stringstream ss;
+ ss << "VM limit random: cannot specify limit less than " << (uint32_t)get_stateless_obj()->get_dp_core_count();
+ generate_parse_err(result, ss.str());
+ }
check_min_max(flow_var_size, 0, 1, min_value, max_value, result);