@@ -678,7 +678,7 @@ static int dp_port_public_flow_meter_config(struct dp_port *port, uint64_t publi
678678
679679int dp_port_meter_config (struct dp_port * port , uint64_t total_flow_rate_cap , uint64_t public_flow_rate_cap )
680680{
681- int err ;
681+ int ret ;
682682
683683 if (dp_conf_get_nic_type () != DP_CONF_NIC_TYPE_MELLANOX ) {
684684 if (public_flow_rate_cap != 0 || total_flow_rate_cap != 0 )
@@ -693,26 +693,31 @@ int dp_port_meter_config(struct dp_port *port, uint64_t total_flow_rate_cap, uin
693693 return DP_ERROR ;
694694 }
695695
696- err = dp_port_total_flow_meter_config (port , total_flow_rate_cap );
697- if (DP_FAILED (err )) {
698- if (err == - ENOENT )
696+ // disabled - not supported by DPDK/Mellanox anymore
697+ #if 0
698+ ret = dp_port_total_flow_meter_config (port , total_flow_rate_cap );
699+ if (DP_FAILED (ret )) {
700+ if (ret == - ENOENT )
699701 DPS_LOG_WARNING ("Cannot find sysfs path or file to regulate traffic rate, thus total flow rate metering is ignored" , DP_LOG_PORT (port ));
700702 else {
701- DPS_LOG_ERR ("Cannot set total flow meter" , DP_LOG_PORT (port ));
702- return DP_ERROR ;
703+ DPS_LOG_ERR ("Cannot set total flow meter" , DP_LOG_PORT (port ), DP_LOG_RET ( ret ) );
704+ return ret ;
703705 }
704706 } else {
705707 port -> iface .total_flow_rate_cap = total_flow_rate_cap ;
706708 }
709+ #endif
707710
708- if (DP_FAILED (dp_port_public_flow_meter_config (port , public_flow_rate_cap ))) {
709- DPS_LOG_ERR ("Cannot set public flow meter" , DP_LOG_PORT (port ));
710- if (DP_FAILED (dp_port_total_flow_meter_config (port , 0 ))) {
711- DPS_LOG_ERR ("Cannot reset total flow meter" , DP_LOG_PORT (port ));
712- return DP_ERROR ;
711+ ret = dp_port_public_flow_meter_config (port , public_flow_rate_cap );
712+ if (DP_FAILED (ret )) {
713+ DPS_LOG_ERR ("Cannot set public flow meter" , DP_LOG_PORT (port ), DP_LOG_RET (ret ));
714+ ret = dp_port_total_flow_meter_config (port , 0 );
715+ if (DP_FAILED (ret )) {
716+ DPS_LOG_ERR ("Cannot reset total flow meter" , DP_LOG_PORT (port ), DP_LOG_RET (ret ));
717+ return ret ;
713718 }
714719 port -> iface .total_flow_rate_cap = 0 ;
715- return DP_ERROR ;
720+ return ret ;
716721 }
717722 port -> iface .public_flow_rate_cap = public_flow_rate_cap ;
718723
0 commit comments