dpi: add_flows and del_flows, and clean