disable fc change if not supported
authorYaroslav Brustinov <[email protected]>
Sun, 23 Oct 2016 07:32:06 +0000 (09:32 +0200)
committerYaroslav Brustinov <[email protected]>
Fri, 28 Oct 2016 12:38:33 +0000 (14:38 +0200)
Signed-off-by: Yaroslav Brustinov <[email protected]>
src/main_dpdk.cpp

index cd4c782..8810880 100644 (file)
@@ -1504,6 +1504,9 @@ int TRexPortAttr::get_flow_ctrl(uint8_t port_id, int &mode) {
 }
 
 int TRexPortAttr::set_flow_ctrl(uint8_t port_id, int mode) {
+    if (!flag_is_fc_change_supported) {
+        return -ENOTSUP;
+    }
     int ret = rte_eth_dev_flow_ctrl_get(port_id, &fc_conf_tmp);
     if (ret) {
         return ret;