net/ice/base: add common functions