[OPNFLWPLUG-222] MD-SAL app cannot create a flow entry which adds a VLAN tag with the specified VLAN ID into untagged frame. Created: 24/Jul/14  Updated: 27/Sep/21  Resolved: 11/Sep/14

Status: Resolved
Project: OpenFlowPlugin
Component/s: General
Affects Version/s: None
Fix Version/s: None

Type: Bug
Reporter: Hideyuki Tai Assignee: Michal Rehak
Resolution: Done Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified
Environment:

Operating System: All
Platform: All


Issue Links:
Blocks
blocks OPNFLWPLUG-262 OF plugin incorrectly converted a MD-... Resolved
External issue ID: 1421

 Description   

MD-SAL applications cannot correctly create a flow entry which adds a VLAN tag with the specified VLAN ID into untagged ethernet frame.
I mean that there is no MD-SAL action which is translated by the MD-SAL OF plugin into the above semantic for both OF 1.0 and OF 1.3.

If a MD-SAL application uses set-vlan-id-action, the MD-SAL OF plugin translates it into SET_VLAN_ID action for OF 1.0 switch (this is OK), and translates it SET_FIELD(VLAN_VID) action for OF 1.3 switch (this is NG).
It means that the MD-SAL application successfully create a flow entry into OF 1.0 switches as intended, but MD-SAL application fails on OF 1.3 switches.

(Please note that OF 1.3 flow entry that adds a VLAN tag with the specified VLAN ID into untagged ethernet frame needs to contain PUSH_VLAN action before SET_FIELD(VLAN_VID) action.)

I pointed out this issue in the mail on openflowplugin-dev ML.
https://lists.opendaylight.org/pipermail/openflowplugin-dev/2014-July/001617.html

Consequently VTN Manager does not work correctly with OF 1.3 switches.
It fails to install a flow entry that adds a VLAN tag with the specified VLAN ID into untagged ethernet frame.
(Please note that VTN Manager is a AD-SAL application, but it indirectly uses the MD-SAL OF plugin via sal-compaitbility. So VTN Manager is an indirect MD-SAL application)

VTN project requests that this issue is fixed by Milestone 5 of Helium release.



 Comments   
Comment by Hideyuki Tai [ 24/Jul/14 ]

One possible solution for this problem is that the MD-SAL OF plugin handles a MD-SAL action as a semantic equivalent to SET_VLAN_VID action of OF 1.0.
However, I think it is difficult to translate the action for OF 1.3, because OF 1.3 does not define an action equivalent to SET_VLAN_VID of OF 1.0.
I think the MD-SAL OF plugin cannot decide whether to add a PUSH_VLAN action or not, when it translate the above action.

(The semantic of SET_VLAN_VID of OF 1.0 action is explained in the first line of the table in page 7 of OpenFlow spec v1.0.0.
https://www.opennetworking.org/images/stories/downloads/sdn-resources/onf-specifications/openflow/openflow-spec-v1.0.0.pdf)

Other possible solution is that the MD-SAL OF plugin provides information of supported actions for switches.
That is a proposal given by Shigeru in the following mail.
https://lists.opendaylight.org/pipermail/openflowplugin-dev/2014-July/001535.html
"supported-actions" field in flow-node can be used by an application to determine actions to be configured.
The idea here is that the OF plugin cannot decide whether to need to add "PUSH_VLAN" or not, only an application knows it, so let the application determine.

Comment by Kamal Rameshan [ 19/Aug/14 ]

The scenario which I am trying to implement is as below:

Use-case: Configure openflow 1.3+ switch as a openflow 1.0 switch using openflow 1.0 instructions (e.g existing AD-SAL application using compatibility layer )

A. Client creates flow
==========================
1. with action set-vlan-id
2. No vlan match '

OFP-1.3
--------------------------------------
Add 2 flows to the switch

Flow-1: (to take care of pkts with no vlan header)
oxm-field: OFPXMT_OFB_VLAN_VID
oxm-value: OFPVID_NONE
oxm-mask : absent/null
action(0): OFPAT_PUSH_VLAN
action(1): OFPAT_SET_FIELD

Flow-2: (to take care of pkts with vlan header)
oxm-field: OFPXMT_OFB_VLAN_VID
oxm-value: OFPVID_PRESENT
oxm-mask : OFPVID_PRESENT
action(0): OFPAT_PUSH_VLAN
action(1): OFPAT_SET_FIELD

When a set-vlan-id is executed for OF1.3, we need to apply 2 flows, Flow-1 and Flow-2.

Now in the code, the stack trace of a flow mod is as follows:

ModelDrivenSwitchImpl.addFlow(AddFlowInput input)
----OFRpcTaskFactory.createAddFlowTask(AddFlowInput input)
--------FlowConvertor.toFlowModInput(Flow input)
------------ActionConvertor.getActions(Action)

Its in ActionConvertor.getActions() , we convert a set-vlan-id (OF1.3) to PushVlan+SetField. This would take care of Flow-1 .

Converted Flow-1 will get returned to OFRpcTaskFactory.createAddFlowTask() which would then sent to switch.

But to generate Flow-2, I could see only the following options.

1. Somehow let OFRpcTaskFactory.createAddFlowTask() know that it has to generate a flow2. One way is to embed a flag in the returned converted flow, but that would be polluting it.

2. In FlowConverter , check to see if the input flow has a SetVlanIdActionCase. If yes, add a flag to Flow input (by augmenting the SetVlanIdActionCase in OFP) when initiating the 2nd flow. Check for the flag in ActionConverter to convert to pushvlan/setfield with the masks.

With the 2nd option, the FlowConverter will return 2 flows (Flow-1 and Flow-2) to the OFRpcTaskFactory, which will then perform flowMods for both (with different xids).

But it would/could return RpcResult to the caller only for one of the two.

If you can think of better/simpler design , let me know.

Comment by Kamal Rameshan [ 26/Aug/14 ]

Gerrit review submitted: https://git.opendaylight.org/gerrit/#/c/10280/

Comment by Michal Rehak [ 26/Aug/14 ]

Sorry to react so late - after merge. I noticed 2 things:

  • in case we have 2 flows then the future results should be chained. In this change there first flow sent, future result is stored then notification is hooked and right after that the other flow is flushed and local result variable is overwritten, second notification gets hooked and future is returned. If the first flow send fails then we just wont get corresponding notification
  • how does it work in case of updateFlow? Shouldn't it be covered too?
Comment by Kamal Rameshan [ 26/Aug/14 ]

Hi Michal,

I guess i missed updateFlow, although i had it in my radar.

I will submit a patch for that asap. I do have to improve the tests as well.

I will also look into future result chaining.

Thanks
Kamal

Comment by Kamal Rameshan [ 27/Aug/14 ]

https://git.opendaylight.org/gerrit/#/c/10348/ submitted for review

Comment by Hideyuki Tai [ 29/Aug/14 ]

It seems that the patch has a problem.
https://git.opendaylight.org/gerrit/10280

At FlowConvertor.java, you can see how the OpenFlow plugin handles SET_VLAN_ID action.

public static List<FlowModInputBuilder> toFlowModInputs(Flow srcFlow, short version, BigInteger datapathId) {
List<FlowModInputBuilder> list = new ArrayList<>();

if (version >= OFConstants.OFP_VERSION_1_3 && isSetVlanIdActionCasePresent(srcFlow))

{ list.addAll(handleSetVlanIdForOF13(srcFlow, version, datapathId)); }

else

{ list.add(toFlowModInput(srcFlow, version, datapathId)); }

return list;
}

handleSetVlanIdForOF13() method ignores original match condition and change the match condition incorrectly.

For example, when VTN Manager tries to install a flow entry which matches untagged frame, the OF plugin incorrectly deletes in_port match field, source/destination MAC Address match field, and change VLAN match field.

[Flow entry which VTN Mamanager tries to install]

  • Match
    + source MAC address
    + destination MAC address
    + in_port
    + untagged
  • Action
    + SET_VLAN_ID(100)
    + OUTPUT:2

[Flow entry which the OF Plugin set to a switch]

  • Match
    + vlan_tci=0x1000/0x1000
  • Action
    + SET_FIELD(4196->vlan_vid)
    + OUTPUT:2

My colleague said that a similar issue occurs when VTN Manager tries to install a flow entry which has set-vlan-id action to frames with a VLAN tag.

Comment by Hideyuki Tai [ 03/Sep/14 ]

We've found another issue.

When a controller with the OF plugin connected to a OpenFlow 1.0 switch and I tried to install a flow entry with push-vlan action into the switch, NullPointerException occured.

I used the latest code on September 2nd, 2014.

You can reproduce this issue using RESTCONF API.

URL: http://192.168.2.56:8080/restconf/config/opendaylight-inventory:nodes/node/openflow:1/table/0/flow/9

Method: PUT

Body:
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<flow xmlns="urn:opendaylight:flow:inventory">
<priority>29</priority>
<flow-name>Foo8</flow-name>
<match>
<ethernet-match>
<ethernet-type>
<type>2048</type>
</ethernet-type>
</ethernet-match>
<ipv4-destination>10.0.10.9/24</ipv4-destination>
</match>
<id>9</id>
<table_id>0</table_id>
<instructions>
<instruction>
<order>0</order>
<apply-actions>
<action>
<order>0</order>
<push-vlan-action>
<vlan-id>156</vlan-id>
<ethernet-type>33024</ethernet-type>
</push-vlan-action>
</action>
</apply-actions>
</instruction>
</instructions>
</flow>

The output what I saw:

2014-09-02 22:13:08.662 EDT [nioEventLoopGroup-11-1] WARN o.o.o.protocol.impl.core.OFEncoder - Message serialization failed
java.lang.NullPointerException: null
at org.opendaylight.openflowjava.protocol.impl.util.TypeKeyMakerFactory$2.make(TypeKeyMakerFactory.java:64) ~[bundlefile:na]
at org.opendaylight.openflowjava.protocol.impl.util.TypeKeyMakerFactory$2.make(TypeKeyMakerFactory.java:61) ~[bundlefile:na]
at org.opendaylight.openflowjava.protocol.impl.util.ListSerializer.serializeList(ListSerializer.java:38) ~[bundlefile:na]
at org.opendaylight.openflowjava.protocol.impl.serialization.factories.OF10FlowModInputMessageFactory.serialize(OF10FlowModInputMessageFactory.java:52) ~[bundlefile:na]
at org.opendaylight.openflowjava.protocol.impl.serialization.factories.OF10FlowModInputMessageFactory.serialize(OF10FlowModInputMessageFactory.java:31) ~[bundlefile:na]
at org.opendaylight.openflowjava.protocol.impl.serialization.SerializationFactory.messageToBuffer(SerializationFactory.java:36) ~[bundlefile:na]
at org.opendaylight.openflowjava.protocol.impl.core.OFEncoder.encode(OFEncoder.java:41) [bundlefile:na]
at org.opendaylight.openflowjava.protocol.impl.core.OFEncoder.encode(OFEncoder.java:26) [bundlefile:na]
at io.netty.handler.codec.MessageToByteEncoder.write(MessageToByteEncoder.java:111) [bundlefile:4.0.19.Final]
at io.netty.channel.DefaultChannelHandlerContext.invokeWrite(DefaultChannelHandlerContext.java:666) [bundlefile:4.0.19.Final]
at io.netty.channel.DefaultChannelHandlerContext.write(DefaultChannelHandlerContext.java:724) [bundlefile:4.0.19.Final]
at io.netty.channel.DefaultChannelHandlerContext.write(DefaultChannelHandlerContext.java:659) [bundlefile:4.0.19.Final]
at io.netty.channel.DefaultChannelHandlerContext.write(DefaultChannelHandlerContext.java:645) [bundlefile:4.0.19.Final]
at io.netty.channel.DefaultChannelPipeline.write(DefaultChannelPipeline.java:878) [bundlefile:4.0.19.Final]
at io.netty.channel.AbstractChannel.write(AbstractChannel.java:231) [bundlefile:4.0.19.Final]
at org.opendaylight.openflowjava.protocol.impl.connection.ChannelOutboundQueue.flush(ChannelOutboundQueue.java:189) [bundlefile:na]
at org.opendaylight.openflowjava.protocol.impl.connection.ChannelOutboundQueue.access$000(ChannelOutboundQueue.java:40) [bundlefile:na]
at org.opendaylight.openflowjava.protocol.impl.connection.ChannelOutboundQueue$1.run(ChannelOutboundQueue.java:84) [bundlefile:na]
at io.netty.util.concurrent.SingleThreadEventExecutor.runAllTasks(SingleThreadEventExecutor.java:341) [bundlefile:4.0.19.Final]
at io.netty.channel.nio.NioEventLoop.run(NioEventLoop.java:346) [bundlefile:4.0.19.Final]
at io.netty.util.concurrent.SingleThreadEventExecutor$2.run(SingleThreadEventExecutor.java:116) [bundlefile:4.0.19.Final]
at java.lang.Thread.run(Thread.java:745) [na:1.7.0_65]

When I applied the following patch, the above NPE didn't occur.

diff --git a/openflowplugin/src/main/java/org/opendaylight/openflowplugin/openflow/md/core/sal/convertor/ActionConvertor.java b/openflowplugin/src/main/java/org/opendaylight/openflowplugin/openflow/md/core/sal/convertor/ActionConvertor.java
index 4938e41..541ef92 100644
— a/openflowplugin/src/main/java/org/opendaylight/openflowplugin/openflow/md/core/sal/convertor/ActionConvertor.java
+++ b/openflowplugin/src/main/java/org/opendaylight/openflowplugin/openflow/md/core/sal/convertor/ActionConvertor.java
@@ -359,7 +359,7 @@ public final class ActionConvertor {
if (version == OFConstants.OFP_VERSION_1_0)

{ // if client configure openflow 1.0 switch as a openflow 1.3 switch using openflow 1.3 instructions // then we can ignore PUSH_VLAN as set-vlan-id will push a vlan header if not present - return emtpyAction(actionBuilder); + return null; }

PushVlanActionCase pushVlanActionCase = (PushVlanActionCase) action;

Comment by Hideyuki Tai [ 05/Sep/14 ]

(In reply to Hideyuki Tai from comment #8)
> We've found another issue.

I've filed the issue I mentioned comment #8 as OPNFLWPLUG-261.

Comment by Hideyuki Tai [ 05/Sep/14 ]

(In reply to Hideyuki Tai from comment #7)
> It seems that the patch has a problem.
> https://git.opendaylight.org/gerrit/10280
>

I've filed the issue which I mentioned in comment #7 as OPNFLWPLUG-262.

Comment by Michal Rehak [ 08/Sep/14 ]

https://git.opendaylight.org/gerrit/#/c/10916/
fix missing unrelated match and action

Comment by Hideyuki Tai [ 09/Sep/14 ]

I've tested the patch set 1 of Gerrit 10916, and I've found out that it's getting better, but the patch doesn't fix the entire problem.
https://git.opendaylight.org/gerrit/#/c/10916/1

Firstly, I tried to install a flow entry with a vlan match (vlan-id=10) and actions (set-vlan-id and output) for an OpenFlow 1.3 switch via RESTCONF of a OpenDaylight controller.

Method: PUT

URL: http://192.168.2.56:8080/restconf/config/opendaylight-inventory:nodes/node/openflow:1/table/0/flow/2

Body:

<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<flow xmlns="urn:opendaylight:flow:inventory">
<priority>2</priority>
<flow-name>Foo2</flow-name>
<match>
<in-port>10</in-port>
<ethernet-match>
<ethernet-source>
<address>3a:72:f1:02:1a:d0</address>
</ethernet-source>
<ethernet-destination>
<address>16:58:21:81:bc:43</address>
</ethernet-destination>
</ethernet-match>
<vlan-match>
<vlan-id>
<vlan-id-present>true</vlan-id-present>
<vlan-id>10</vlan-id>
</vlan-id>
<vlan-pcp>7</vlan-pcp>
</vlan-match>
</match>
<id>2</id>
<table_id>0</table_id>
<instructions>
<instruction>
<order>0</order>
<apply-actions>
<action>
<order>0</order>
<set-vlan-id-action>
<vlan-id>55</vlan-id>
</set-vlan-id-action>
</action>
<action>
<order>1</order>
<output-action>
<output-node-connector>2</output-node-connector>
</output-action>
</action>
</apply-actions>
</instruction>
</instructions>
</flow>

The flow entry installed in the switch was as follows:

cookie=0x0, duration=5.588s, table=0, n_packets=0, n_bytes=0, idle_timeout=300, hard_timeout=600, send_flow_rem priority=2,in_port=10,dl_vlan=10,dl_src=3a:72:f1:02:1a:d0,dl_dst=16:58:21:81:bc:43 actions=set_field:4151->vlan_vid,output:2

That did not contain a match field for VLAN PCP.
The value for set_filed was 4151, though I specified 55 in the RESTCONF request.

Next, I tried to install a flow entry with a vlan match (for untagged frame) and actions (push-vlan, set-vlan-id, and output) for an OpenFlow 1.3 switch via RESTCONF of a OpenDaylight controller.

<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<flow xmlns="urn:opendaylight:flow:inventory">
<priority>2</priority>
<flow-name>Foo</flow-name>
<match>
<in-port>1</in-port>
<ethernet-match>
<ethernet-source>
<address>3a:72:f1:02:1a:d0</address>
</ethernet-source>
<ethernet-destination>
<address>16:58:21:81:bc:43</address>
</ethernet-destination>
</ethernet-match>
<vlan-match>
<vlan-id>
<vlan-id-present>false</vlan-id-present>
</vlan-id>
</vlan-match>
</match>
<id>21</id>
<table_id>0</table_id>
<instructions>
<instruction>
<order>0</order>
<apply-actions>
<action>
<order>0</order>
<push-vlan-action>
<ethernet-type>33024</ethernet-type>
</push-vlan-action>
</action>
<action>
<order>1</order>
<set-vlan-id-action>
<vlan-id>55</vlan-id>
</set-vlan-id-action>
</action>
<action>
<order>2</order>
<output-action>
<output-node-connector>2</output-node-connector>
</output-action>
</action>
</apply-actions>
</instruction>
</instructions>
</flow>

I checked the flow entry table of the switch, but no flow entry was newly added.

Comment by Michal Rehak [ 09/Sep/14 ]

I pushed PS2 which fixed the missing vlan-pcp match part.

I also inspected the flowMod message in wireshark - looks ok. OVS reports unfortunately "clean" value of vlan-id in match and flagged value (cfi) in action/set-field. But good news is that in statistics - both values are reported as flagged form and we translate those to clean values. So in statistics you can see correct match and action.

The second flow works only on cpqd. Ovs (2.1.3 an 2.3.0) responded with error message containing "unsupported tag/encap". I guess this might be matter of input validation. No idea which virtual switch is doing it better.

Could you please retest current PS2 at least for vlan-pcp? Regarding the second flow it is a topic for discussion probably. Anyway - can be tested on cpqd switch.

Michal

Comment by Hideyuki Tai [ 09/Sep/14 ]

(In reply to michal rehak from comment #13)
> I pushed PS2 which fixed the missing vlan-pcp match part.
>

Hi Michal,

Thank you for updating the patch.
I'll test the patch.

Comment by Hideyuki Tai [ 09/Sep/14 ]

(In reply to michal rehak from comment #13)
> I pushed PS2 which fixed the missing vlan-pcp match part.
>

(snip)

> Could you please retest current PS2 at least for vlan-pcp? Regarding the
> second flow it is a topic for discussion probably. Anyway - can be tested on
> cpqd switch.
>
> Michal

Hi Michal,

I retested the patch set 2 for vlan-pcp.
https://git.opendaylight.org/gerrit/#/c/10916/2

I sent the following PUT request (which is the same request I mentioned in comment 12) to a OpenDaylight controller and checked the OFPT_FLOW_MOD.
I've confirmed that it is ok.

Method: PUT

URL: http://192.168.2.56:8080/restconf/config/opendaylight-inventory:nodes/node/openflow:1/table/0/flow/2

Body:

<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<flow xmlns="urn:opendaylight:flow:inventory">
<priority>2</priority>
<flow-name>Foo2</flow-name>
<match>
<in-port>10</in-port>
<ethernet-match>
<ethernet-source>
<address>3a:72:f1:02:1a:d0</address>
</ethernet-source>
<ethernet-destination>
<address>16:58:21:81:bc:43</address>
</ethernet-destination>
</ethernet-match>
<vlan-match>
<vlan-id>
<vlan-id-present>true</vlan-id-present>
<vlan-id>10</vlan-id>
</vlan-id>
<vlan-pcp>7</vlan-pcp>
</vlan-match>
</match>
<id>2</id>
<table_id>0</table_id>
<instructions>
<instruction>
<order>0</order>
<apply-actions>
<action>
<order>0</order>
<set-vlan-id-action>
<vlan-id>55</vlan-id>
</set-vlan-id-action>
</action>
<action>
<order>1</order>
<output-action>
<output-node-connector>2</output-node-connector>
</output-action>
</action>
</apply-actions>
</instruction>
</instructions>
</flow>

Comment by Hideyuki Tai [ 09/Sep/14 ]

(In reply to michal rehak from comment #13)
> I pushed PS2 which fixed the missing vlan-pcp match part.
>
(snip)
>
> The second flow works only on cpqd. Ovs (2.1.3 an 2.3.0) responded with
> error message containing "unsupported tag/encap". I guess this might be
> matter of input validation. No idea which virtual switch is doing it better.
>

Hi Michal,

I retested the send flow request with Wireshark.
I meant that I tried to install a flow entry with a VLAN match (for untagged frames) and actions (push-vlan, set-vlan-id, and output) for an OpenFlow 1.3 switch via RESTCONF of a OpenDaylight controller.

The OFPT_FLOW_MOD message sent by the OpenDaylight controller was wrong.
It contained a OXM field which represented OFPVID_PRESENT was "True", although I specified "False".

  • OXM field
    + Class: OFPXMC_OPENFLOW_BASIC (0x8000)
    + Field: OFPXMT_OFB_VLAN_VID
    + Has mask: True
    + Length: 4
    + OFPVID_PRESENT: True
    + Value: 0

It meant that the OFPT_FLOW_MOD message tried to install a flow entry which pushed a VLAN tag to frames which had already VLAN tag.
I think that is why OVS responded with error message.

It seems to me that FlowConvertor.java does not take "vlan match is OFPVID_NONE" case into consideration.

Method: PUT

URL: http://192.168.2.56:8080/restconf/config/opendaylight-inventory:nodes/node/openflow:1/table/0/flow/21

Body:
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<flow xmlns="urn:opendaylight:flow:inventory">
<priority>2</priority>
<flow-name>Foo</flow-name>
<match>
<in-port>1</in-port>
<ethernet-match>
<ethernet-source>
<address>3a:72:f1:02:1a:d0</address>
</ethernet-source>
<ethernet-destination>
<address>16:58:21:81:bc:43</address>
</ethernet-destination>
</ethernet-match>
<vlan-match>
<vlan-id>
<vlan-id-present>false</vlan-id-present>
</vlan-id>
</vlan-match>
</match>
<id>21</id>
<table_id>0</table_id>
<instructions>
<instruction>
<order>0</order>
<apply-actions>
<action>
<order>0</order>
<push-vlan-action>
<ethernet-type>33024</ethernet-type>
</push-vlan-action>
</action>
<action>
<order>1</order>
<set-vlan-id-action>
<vlan-id>55</vlan-id>
</set-vlan-id-action>
</action>
<action>
<order>2</order>
<output-action>
<output-node-connector>2</output-node-connector>
</output-action>
</action>
</apply-actions>
</instruction>
</instructions>
</flow>

Comment by Hideyuki Tai [ 10/Sep/14 ]

(In reply to Hideyuki Tai from comment #16)
> (In reply to michal rehak from comment #13)

(snip)

> Hi Michal,
>
> I retested the send flow request with Wireshark.
> I meant that I tried to install a flow entry with a VLAN match (for untagged
> frames) and actions (push-vlan, set-vlan-id, and output) for an OpenFlow 1.3
> switch via RESTCONF of a OpenDaylight controller.
>

Hi Michal,

I retested the patch set 3 of Gerrit 10916.
https://git.opendaylight.org/gerrit/#/c/10916/

I've confirmed that I can successfully install a flow entry with a VLAN match for untagged frames ans actions (push-vlan, set-vlan-id, and output) for OpenFlow 1.3 which is the test case I mentioned in comment #13.

I'm going to test the patch set with VTN Manager.

Comment by Michal Rehak [ 10/Sep/14 ]

https://git.opendaylight.org/gerrit/#/c/10916/

Comment by Sam Hague [ 10/Sep/14 ]

I tested ps3 and it seems to work, but I have add the OFPVID_PRESENT value and set it to false. Is that the expected behaviour? My test case is to add a tag for packets that are currently untagged.

Here is the JAVA code I am using to set the value. Notice I also had to set a vid of 0 for it to take.

public static MatchBuilder createVlanIdPresentMatch(MatchBuilder matchBuilder, boolean present)

{ VlanMatchBuilder vlanMatchBuilder = new VlanMatchBuilder(); VlanIdBuilder vlanIdBuilder = new VlanIdBuilder(); vlanIdBuilder.setVlanIdPresent(present); vlanIdBuilder.setVlanId(new VlanId(0)); vlanMatchBuilder.setVlanId(vlanIdBuilder.build()); matchBuilder.setVlanMatch(vlanMatchBuilder.build()); return matchBuilder; }
Comment by Hideyuki Tai [ 10/Sep/14 ]

(In reply to Hideyuki Tai from comment #17)
> (In reply to Hideyuki Tai from comment #16)
> > (In reply to michal rehak from comment #13)
>

(snip)

>
> I retested the patch set 3 of Gerrit 10916.
> https://git.opendaylight.org/gerrit/#/c/10916/
>
> I've confirmed that I can successfully install a flow entry with a VLAN
> match for untagged frames ans actions (push-vlan, set-vlan-id, and output)
> for OpenFlow 1.3 which is the test case I mentioned in comment #13.
>
>
> I'm going to test the patch set with VTN Manager.

I've tested the patch set 3 with VTN Manager, and confirmed that the patch set works fine.

When I deleted flow entries, I saw the following ERROR message.
However, it seems to me that it is not related the patch set, because it happens even when I deletes flow entries which does not use set-vlan-id action.

2014-09-10 13:24:39.874 EDT [CommitFutures-5] ERROR o.o.c.m.s.b.i.ForwardedBackwardsCompatibleDataBroker - Transaction DOM-207 failed to complete
org.opendaylight.controller.md.sal.common.api.data.TransactionCommitFailedException: Data did not pass validation.
at org.opendaylight.controller.md.sal.dom.store.impl.InMemoryDOMDataStore$ThreePhaseCommitImpl$1.call(InMemoryDOMDataStore.java:396) ~[na:na]
at org.opendaylight.controller.md.sal.dom.store.impl.InMemoryDOMDataStore$ThreePhaseCommitImpl$1.call(InMemoryDOMDataStore.java:380) ~[na:na]
at java.util.concurrent.FutureTask.run(FutureTask.java:262) ~[na:1.7.0_65]
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145) [na:1.7.0_65]
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615) [na:1.7.0_65]
at java.lang.Thread.run(Thread.java:745) [na:1.7.0_65]

I put all messages I saw when I deleted a flow entry at gist:
https://gist.github.com/anonymous/660cd0afec9f3dd30f01

Generated at Wed Feb 07 20:31:53 UTC 2024 using Jira 8.20.10#820010-sha1:ace47f9899e9ee25d7157d59aa17ab06aee30d3d.