-
Notifications
You must be signed in to change notification settings - Fork 187
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
L2BridgingComponent.java ternary match problem #93
Comments
The error message seems suggesting that we should omit the entire match field instead of using wildcard mask. |
I have removed In the result I have received this exception in onos logs: There is no way to omit entire object of PiMatchFieldID.of() because in PiCriterion which is used in L2BridingComponent.java all versions of matchTernary() function require 3 arguments. I really don't understand why it doesn't work despite it is a tutorial. |
I was suggesting skipping the entire ethernet dst match field. Something like this:
This should theoretically create a "catch all" match |
I checked your suggestion but I get: |
Hmm... alright, looks like it doesn't like it either. Will need to take a closer look to figure out why the original PiCriterion get rejected. |
Hi @makrofag1, you are describing the case where an app wants to modify a table's default action, which is equivalent to a flow rule with all match fields set to "don't care". To create such a flow rule, you simply need to omit adding a selector when invoking the flow rule builder. Unfortunately, in this tutorial we use the utility method ngsdn-tutorial/app/src/main/java/org/onosproject/ngsdn/tutorial/common/Utils.java Line 110 in 62705c3
You could solve this by creating a different utility method that looks like this: public static FlowRule buildFlowRuleDefaultAction(DeviceId switchId, ApplicationId appId,
String tableId, PiTableAction piAction) {
return DefaultFlowRule.builder()
.forDevice(switchId)
.forTable(PiTableId.of(tableId))
.fromApp(appId)
.withPriority(DEFAULT_FLOW_RULE_PRIORITY)
.makePermanent(
.withTreatment(DefaultTrafficTreatment.builder()
.piTableAction(piAction).build())
.build();
} |
Hi,
I have observed this ONOS warn in onos logs:
Unable to INSERT table entry on device:leaf2: OTHER_ERROR INVALID_ARGUMENT Invalid representation of 'don't care' ternary match, omit match field instead of using 0 mask (:3) [PiTableEntry{tableId=IngressPipeImpl.l2_ternary_table, matchKey={hdr.ethernet.dst_addr=0x0&&&0x0}, tableAction=IngressPipeImpl.set_multicast_group(gid=0xff), priority=11, timeout=PERMANENT}]
This warn lead me to L2BridgingComponent.java file where we can find criterion that should match any previously unmatched packet (lines 272 - 277). Could you explain me please what is the proper representation of the rule that matches anything? I use onos 2.2.2 and mentioned rule stays in pending add.
@bocon13 @ccascone
The text was updated successfully, but these errors were encountered: