An efficient data exchange mechanism for chained network functions