net/ice/base: add helper functions for flow management