What if there are multiple forwarding rules for the same flow in the Openflow switch?
Asked Answered
C

1

6

I am trying to use the POX controller to control the path of flows. I know that the Open vSwitch will choose the forwarding rules that have the highest priority. But what will happen if I insert a new forwarding rule for the existing flow with the same priority. Will the Open vSwitch randomly choose one rule to match?

Cutting answered 19/7, 2017 at 15:37 Comment(2)
Did you try it?Gilus
Yes, I did. The OVS will match the new rule, but I don't know why.Cutting
F
4

The OpenFlow 1.3 specification says:

If there are multiple matching flow entries with the same highest priority, the selected flow entry is explicitly undefined.

The older OpenFlow 1.0 specification states that:

If multiple entries have the same priority, the switch is free to choose any ordering.

Open vSwitch docs and this other source here says:

OpenFlow leaves behavior undefined when two or more flows with the same priority can match a single packet. Some users expect "sensible" behavior, such as more specific flows taking precedence over less specific flows, but OpenFlow does not specify this and Open vSwitch does not implement it. Users should therefore take care to use priorities to ensure the behavior that they expect.

It is unclear, I know, but based on these sources, it is up to the user to deal with situations where a flow entry overlap with same priorities occurs. The user should take care of setting the right priorities and the switch is free to implement a way to deal with this as the vendor desires. The switch may, for instance, select the newest flow entry, as you said it happened in your case.

Fattal answered 20/7, 2017 at 14:27 Comment(2)
The question was on how Open vSwitch specifically handles this situation.Finnougric
The question title refers to OpenFlow in general, but you are right about the question content. I added an link pointing to Open vSwitch source info in my answer.Fattal

© 2022 - 2024 — McMap. All rights reserved.