Fix v12 support

Fixes v12 support 

I have tested flower with OVS, and simple switch looks not working for v1.2.
I found mistake of constants, and added some helper functions.