NR_DISTANCE_VALUES
distance_map = bitmap_alloc(NR_DISTANCE_VALUES, GFP_KERNEL);
bitmap_zero(distance_map, NR_DISTANCE_VALUES);
if (distance < LOCAL_DISTANCE || distance >= NR_DISTANCE_VALUES) {
nr_levels = bitmap_weight(distance_map, NR_DISTANCE_VALUES);
j = find_next_bit(distance_map, NR_DISTANCE_VALUES, j);