Embedding and Batch-Scheduling Data Flow Graphs in Software Switches