CPqD / ofsoftswitch13

OpenFlow 1.3 switch.
http://cpqd.github.com/ofsoftswitch13
304 stars 192 forks source link

Meter on ofsoftswitch #216

Closed mutalip closed 6 years ago

mutalip commented 8 years ago

I was able to create meter (speed=5000)as following, and implented on port 1, however, it still shows default speed 10M. Am i missing something here?

floodlight@floodlight:~$ dpctl tcp:127.0.0.1:6634 meter-mod cmd=add,flags=1,meter=1 drop:rate=5000

SENDING (xid=0xF0FF00F0): meter_mod{cmd="add", flags="0x1"", meter_id="1"", bands=[{type = drop, rate="5000", burst_size="0"}]}

OK.

I implemented meter on port 1 successfully, floodlight@floodlight:~$ dpctl tcp:127.0.0.1:6634 flow-mod table=1,cmd=add in_port=1 meter:1

SENDING (xid=0xF0FF00F0): flow_mod{table="1", cmd="add", cookie="0x0", mask="0x0", idle="0", hard="0", prio="32768", buf="none", port="any", group="any", flags="0x0", match=oxm{in_port="1"}, insts=[meter{meter="1"}]}

OK.

However, it still shows default speed 10M. Am i missing something here? floodlight@floodlight:~$ ethtool s1-eth1 Settings for s1-eth1: Supported ports: [ ] Supported link modes: Not reported Supported pause frame use: No Supports auto-negotiation: No Advertised link modes: Not reported Advertised pause frame use: No Advertised auto-negotiation: No Speed: 10000Mb/s Duplex: Full Port: Twisted Pair PHYAD: 0 Transceiver: internal Auto-negotiation: off MDI-X: Unknown Cannot get wake-on-lan settings: Operation not permitted Link detected: yes

Thank you, Mutalip

ederlf commented 8 years ago

Meter does not change the port speed. It limits the bandwidth per flow. So, only packets matching a rate limited flow will be dropped or dscp marked.