Rewrite compute_distance2inner to use rpacket_t and storage_model_t arguments