I have a P4 switch where it's connected to 2 hosts over mininet.
I have created the basic.p4 controller was within the ingress processing created a meter function, along with the topology file in python.
Everything within the SDN environment runs well, however, I am facing issues with the best practice on applying the metering function, mine is currently:
0.0001 > allow 100packets/sec, if each packet size is equal to 1000 bytes, then the obtained throughput can be 100 packets/sec * 1000 (bytes) *8 = 800 kbps.
I am setting the meter for the traffic that is destined to H2 (00:00:00:00:00:02).
Any advice on the approach?
Interesting, I will assume that your P4 SDN runs without any issues, so its a display of setting the meter, make sure you have defined your tables and set the meters after, here is an example:
(the line bellow, if you have it within your meter function)
You can have all of this in a text file and call it in your python run file.