openvswitch / ovs-issues

Issue tracker repo for Open vSwitch
10 stars 3 forks source link

Flow Matching Behavior Change After Commit 489553b1: High-Priority Wildcard vs. Low-Priority Exact Match #333

Closed hrllo closed 1 month ago

hrllo commented 1 month ago

When there are two flow entries, a high-priority wildcard flow entry and a low-priority exact match flow entry, if a packet first matches the high-priority wildcard flow entry and created dp flow。before the dp flow timeout , will subsequent packets that better match the exact flow entry hit the existing datapath flow entry and not trigger a miss upcall?

It appears that before the commit https://github.com/openvswitch/ovs/commit/489553b1c21692063931a9f50b6849b23128443c, such scenarios would result in an upcall, but after the commit, they no longer do.

igsilya commented 1 month ago

If you have a high-priority wildcard flow and a low-priority exact match that is a subset of the wildcard, the low-priority flow will never be matched. If it was matched before, it is a bug.

You need to swap priorities.

hrllo commented 1 month ago

If you have a high-priority wildcard flow and a low-priority exact match that is a subset of the wildcard, the low-priority flow will never be matched. If it was matched before, it is a bug.

You need to swap priorities.

Thank you for your response. Do you mean that if I have a high-priority flow entry defined by src and dst, and a low-priority flow entry defined by the same src and dst, but also specifying the port, then the flow entry that includes the port should not be matched?

igsilya commented 1 month ago

Thank you for your response. Do you mean that if I have a high-priority flow entry defined by src and dst, and a low-priority flow entry defined by the same src and dst, but also specifying the port, then the flow entry that includes the port should not be matched?

Correct. The more precise rule should have higher priority in order to be matched.

hrllo commented 1 month ago

Thank you for your response. Do you mean that if I have a high-priority flow entry defined by src and dst, and a low-priority flow entry defined by the same src and dst, but also specifying the port, then the flow entry that includes the port should not be matched?

Correct. The more precise rule should have higher priority in order to be matched.

thank you very much!