summaryrefslogtreecommitdiffstats
path: root/src/rpc-server
diff options
context:
space:
mode:
authorimarom <imarom@cisco.com>2017-01-30 13:56:01 +0200
committerimarom <imarom@cisco.com>2017-01-30 13:56:01 +0200
commit1369c6a44b622df3577223ce68ff16a1ea7cc8aa (patch)
tree588ad4f4e3b7a7b860684d3102bac7cdeccaeed9 /src/rpc-server
parent78a3270eda09ba24a7f9f795800df3337f8953bf (diff)
move service mode check to RX queue enable
Signed-off-by: imarom <imarom@cisco.com>
Diffstat (limited to 'src/rpc-server')
-rw-r--r--src/rpc-server/commands/trex_rpc_cmd_general.cpp10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/rpc-server/commands/trex_rpc_cmd_general.cpp b/src/rpc-server/commands/trex_rpc_cmd_general.cpp
index 54798abb..60180659 100644
--- a/src/rpc-server/commands/trex_rpc_cmd_general.cpp
+++ b/src/rpc-server/commands/trex_rpc_cmd_general.cpp
@@ -682,10 +682,6 @@ TrexRpcCmdSetRxFeature::_run(const Json::Value &params, Json::Value &result) {
uint8_t port_id = parse_port(params, result);
TrexStatelessPort *port = get_stateless_obj()->get_port_by_id(port_id);
- if (!port->is_service_mode_on()) {
- generate_execute_err(result, "rx_feature - available only under service mode");
- }
-
/* decide which feature is being set */
const std::string type = parse_choice(params, "type", {"queue", "server"}, result);
@@ -707,6 +703,10 @@ TrexRpcCmdSetRxFeature::parse_queue_msg(const Json::Value &msg, TrexStatelessPor
bool enabled = parse_bool(msg, "enabled", result);
if (enabled) {
+
+ if (!port->is_service_mode_on()) {
+ generate_execute_err(result, "setting RX queue is only available under service mode");
+ }
uint64_t size = parse_uint32(msg, "size", result);
@@ -745,7 +745,7 @@ TrexRpcCmdGetRxQueuePkts::_run(const Json::Value &params, Json::Value &result) {
TrexStatelessPort *port = get_stateless_obj()->get_port_by_id(port_id);
if (!port->is_service_mode_on()) {
- generate_execute_err(result, "get_rx_queue_pkts - available only under service mode");
+ generate_execute_err(result, "fetching RX queue packets is only available under service mode");
}