[PATCH v2 11/13] flow: Abstract helpers for allocating new flows