Incorrect traffic treatment from link collection intent compiler

3 views
Skip to first unread message

Yi Tseng

unread,
Apr 13, 2017, 11:55:48 PM4/13/17
to Northbound brigade
Hello,

I found a bug from current LinkCollectionIntentCompiler.

It seems sometimes if we have multiple egress port on same device with different tag, the compiler will generate treatments like:

[VLAN_POP, OUTPUT:1, VLAN_ID:300, OUTPUT:2]




this treatment(instructions) will cause OFBadAction error

Luca Prete

unread,
Apr 14, 2017, 11:47:33 AM4/14/17
to Yi Tseng, Northbound brigade
Yi, thanks for reporting the bug. We should prioritize this asap.

-Luca

--
You received this message because you are subscribed to the Google Groups "Northbound brigade" group.
To unsubscribe from this group and stop receiving emails from it, send an email to brigade-northbound+unsub...@onosproject.org.
To post to this group, send email to brigade-northbound@onosproject.org.
Visit this group at https://groups.google.com/a/onosproject.org/group/brigade-northbound/.
To view this discussion on the web visit https://groups.google.com/a/onosproject.org/d/msgid/brigade-northbound/CANbTR4R06TQm7VQbS91%3D2D_GbaYyYb2wWNHsffz6%2B3JP2RnSUA%40mail.gmail.com.
For more options, visit https://groups.google.com/a/onosproject.org/d/optout.

Yi Tseng

unread,
Apr 14, 2017, 9:14:49 PM4/14/17
to Northbound brigade, Pier Luigi Ventre, Luca Prete
Guys,

I found that Pier already resolve this part. To resolve this problem, we need to set "useFlowOptimization" to true. And the compiler will fix this problem automatically.

-Yi

On Fri, Apr 14, 2017 at 8:47 AM, Luca Prete <lu...@onlab.us> wrote:
Yi, thanks for reporting the bug. We should prioritize this asap.

-Luca
On Thu, Apr 13, 2017 at 8:55 PM, Yi Tseng <y...@onlab.us> wrote:
Hello,

I found a bug from current LinkCollectionIntentCompiler.

It seems sometimes if we have multiple egress port on same device with different tag, the compiler will generate treatments like:

[VLAN_POP, OUTPUT:1, VLAN_ID:300, OUTPUT:2]




this treatment(instructions) will cause OFBadAction error

--
You received this message because you are subscribed to the Google Groups "Northbound brigade" group.
To unsubscribe from this group and stop receiving emails from it, send an email to brigade-northbound+unsubscribe@onosproject.org.

--
You received this message because you are subscribed to the Google Groups "Northbound brigade" group.
To unsubscribe from this group and stop receiving emails from it, send an email to brigade-northbound+unsub...@onosproject.org.
To post to this group, send email to brigade-northbound@onosproject.org.
Visit this group at https://groups.google.com/a/onosproject.org/group/brigade-northbound/.

Luca Prete

unread,
Apr 14, 2017, 11:00:51 PM4/14/17
to Yi Tseng, Northbound brigade, Pier Luigi Ventre
Yi, thanks as usual!

Pier, what's the purpose of "use FlowOptimization". I can't really remember..but it seems something that should be always true :) Plus, without it, we get that error..What should we do? Just remove the parameter and directly execute your code?

Thanks,

-Luca

Pier Luigi Ventre

unread,
Apr 15, 2017, 10:22:25 AM4/15/17
to Northbound brigade, y...@onlab.us, pl.v...@gmail.com
Luca,
useFlowOptimization enables several optimizations during the generation of the treatments. Some optimization are available only for the flow rules. 
I left as parameter and by default to false because if your are using the flow rules you may want these optimizations but if you are using flow objectives is wrong because the optimizations are applied leveraging on the fact the treatment will be a chain of actions. Moreover is disabled by default because can introduce computation overhead which may affect QA tests.

Pier


Il giorno sabato 15 aprile 2017 05:00:51 UTC+2, Luca Prete ha scritto:
Yi, thanks as usual!

Pier, what's the purpose of "use FlowOptimization". I can't really remember..but it seems something that should be always true :) Plus, without it, we get that error..What should we do? Just remove the parameter and directly execute your code?

Thanks,

-Luca
On Fri, Apr 14, 2017 at 6:14 PM, Yi Tseng <y...@onlab.us> wrote:
Guys,

I found that Pier already resolve this part. To resolve this problem, we need to set "useFlowOptimization" to true. And the compiler will fix this problem automatically.

-Yi
On Fri, Apr 14, 2017 at 8:47 AM, Luca Prete <lu...@onlab.us> wrote:
Yi, thanks for reporting the bug. We should prioritize this asap.

-Luca
On Thu, Apr 13, 2017 at 8:55 PM, Yi Tseng <y...@onlab.us> wrote:
Hello,

I found a bug from current LinkCollectionIntentCompiler.

It seems sometimes if we have multiple egress port on same device with different tag, the compiler will generate treatments like:

[VLAN_POP, OUTPUT:1, VLAN_ID:300, OUTPUT:2]




this treatment(instructions) will cause OFBadAction error

--
You received this message because you are subscribed to the Google Groups "Northbound brigade" group.
To unsubscribe from this group and stop receiving emails from it, send an email to brigade-northbound+unsub...@onosproject.org.
To post to this group, send email to brigade-n...@onosproject.org.

--
You received this message because you are subscribed to the Google Groups "Northbound brigade" group.
To unsubscribe from this group and stop receiving emails from it, send an email to brigade-northbound+unsub...@onosproject.org.
To post to this group, send email to brigade-n...@onosproject.org.

Luca Prete

unread,
Apr 15, 2017, 11:14:25 PM4/15/17
to Pier Luigi Ventre, Northbound brigade, Yi Tseng
Pier, I think very few people (maybe only you and me with my memory assisting me..) are aware of this option...is there any way we can drop the choice and just properly integrate the code in the different compilers?

Thanks!

-Luca

To unsubscribe from this group and stop receiving emails from it, send an email to brigade-northbound+unsubscribe@onosproject.org.

--
You received this message because you are subscribed to the Google Groups "Northbound brigade" group.
To unsubscribe from this group and stop receiving emails from it, send an email to brigade-northbound+unsubscribe@onosproject.org.

--
You received this message because you are subscribed to the Google Groups "Northbound brigade" group.
To unsubscribe from this group and stop receiving emails from it, send an email to brigade-northbound+unsub...@onosproject.org.
To post to this group, send email to brigade-northbound@onosproject.org.

Pier Luigi Ventre

unread,
Apr 16, 2017, 2:55:29 AM4/16/17
to Luca Prete, Northbound brigade, Yi Tseng
Luca,
we can just set to true the default.

Thanks
Pier

Luca Prete

unread,
Apr 16, 2017, 9:51:43 PM4/16/17
to Pier Luigi Ventre, Northbound brigade, Yi Tseng
You just said it will possibly bring improvements in some situations, but not in others...and that's why we left an option there..Why can't we just clean this out and remove the option putting the code in the right place depending on the compiler used?

-Luca

--
You received this message because you are subscribed to the Google Groups "Northbound brigade" group.
To unsubscribe from this group and stop receiving emails from it, send an email to brigade-northbound+unsub...@onosproject.org.
To post to this group, send email to brigade-northbound@onosproject.org.
Visit this group at https://groups.google.com/a/onosproject.org/group/brigade-northbound/.

Yi Tseng

unread,
Apr 17, 2017, 2:33:54 PM4/17/17
to Luca Prete, Pier Luigi Ventre, Northbound brigade
Luca, Pier,

Sorry for late reply

I think the optimization contains two part, one is provide correct traffic treatments (which we need), the other is to optimize TTL instructions.

However, as Pier mentioned, it only for FlowRule Intent.

If we want to use FlowObjective, we don't need compiler to correct traffic treatments.

Also, this part is implemented in LinkCollectionCompiler, which LinkCollectionIntentFlowObjectiveCompiler extended.

We can remove optimize directly, but we still need an option for different (FlowRule, FlowObjective) compilers.

I'll try submit new patch today.

-Yi





Yi Tseng

unread,
Apr 17, 2017, 7:27:04 PM4/17/17
to Pier Luigi Ventre, Luca Prete, Northbound brigade
Hi Pier,

I tried to modify the compiler

Basically is to put new abstract function "optimizeTreatments" in LinkCollectionCompiler

LinkCollectionIntentCompiler and LinkCollectionIntentFlowObjectiveCompiler will implement this function to return true or false to let LinkCollectionCompiler knows it need to optimize treatments or not.
-Yi
Reply all
Reply to author
Forward
0 new messages