Integration of Openflow with bmv2

Please see this recently-published example P4 program plus controller written in Python to see if it answers any of your questions: A simple P4 program plus controller in Python for demonstrating PacketIn messages from switch to controller