reset pdr_missing early in port_nrate_calculate(), implement ratio_valid flag