[OPNFLWPLUG-300] change INPORT action to IN_PORT (spec-wise) Created: 25/Sep/14  Updated: 27/Sep/21  Resolved: 16/Jun/17

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

Type: Improvement
Reporter: Jamo Luhrsen Assignee: Jamo Luhrsen
Resolution: Done Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified
Environment:

Operating System: All
Platform: All



 Description   

Originally filed as OPNFLWPLUG-263
https://bugs.opendaylight.org/show_bug.cgi?id=1725 in Helium, and the request was to make this an enhancement for Lithium.

------------------------------------
When I try to create a flow via restconf with IN_PORT as the action I see that no flow mod is sent to the corresponding switch (via pkt capture on mininet vm running OVS). Also in the OSGI console, the following errors are seen:

2014-09-05 14:58:33.456 PDT [OFRpc-2] ERROR o.o.o.o.m.c.s.c.ActionConvertor - Invalid Port specified null for Output Action for OF version:OF13
2014-09-05 14:58:33.456 PDT [OFRpc-2] ERROR o.o.o.o.m.c.s.c.ActionConvertor - Invalid Port specified null for Output Action for OF version:OF13
2014-09-05 14:58:33.456 PDT [nioEventLoopGroup-12-6] WARN o.o.o.protocol.impl.core.OFEncoder - Message serialization failed: null

Here is the flow_mod XML:

<flow xmlns="urn:opendaylight:flow:inventory"><instructions><instruction><order>0</order><apply-actions><action><order>0</order><output-action><output-node-connector>IN_PORT</output-node-connector></output-action></action></apply-actions></instruction></instructions><match><ethernet-match><ethernet-type><type>0x800</type></ethernet-type><ethernet-source><address>00:ab:cd:ef:01:23</address></ethernet-source><ethernet-destination><address>ff:ff:ff:ff:ff:ff</address></ethernet-destination></ethernet-match><ipv4-source>11.3.0.0/16</ipv4-source><ipv4-destination>99.0.0.0/8</ipv4-destination></match><strict>false</strict><hard-timeout>60</hard-timeout><idle-timeout>30</idle-timeout><flow-name>No Name</flow-name><priority>0</priority><barrier>false</barrier><cookie>0</cookie><cookie_mask>0</cookie_mask><table_id>22</table_id><id>161</id></flow>

If it matters, the REST details are a PUT @ /restconf/config/opendaylight-inventory:nodes/node/openflow:1/table/22/flow/161

Attached are some robot test logs if it helps.



 Comments   
Comment by subhash kumar singh [ 01/Dec/14 ]

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

output action for the inport is implemented using the "INPORT" string. So the "IN_PORT" is invalid port no to install the flow.

Comment by Michal Rehak [ 15/Apr/15 ]

merged

Comment by Jamo Luhrsen [ 27/May/15 ]

re-opening this bug. I think the original bug's intention was lost. The issue I brought up was that spec-wise, ovs-wise the port string is "IN_PORT" and the request was to change opendaylights representation from INPORT to IN_PORT. That was not done here.

If it's decided that we have to stay with INPORT for some reason, it's fine.

However, we are still throwing NPE's when IN_PORT is used.

to summarize:

1. we should use IN_PORT instead of INPORT
2. we should not throw NPEs.

Comment by Luis Gomez [ 03/Jun/15 ]

I am confused here, is this not implemented through loopback-action in the yang models?

Comment by Jamo Luhrsen [ 03/Jun/15 ]

Luis,

are you saying that you expect that we can use INPORT OR IN_PORT?

JamO

Comment by Luis Gomez [ 03/Jun/15 ]

I am just saying I thought the set-loopback action was in the model to resend a packet to a port but I am not sure anymore. Michal can clarify I guess.

Comment by Jamo Luhrsen [ 03/Jun/15 ]

(In reply to Luis Gomez from comment #6)
> I am just saying I thought the set-loopback action was in the model to
> resend a packet to a port but I am not sure anymore. Michal can clarify I
> guess.

This is a bug just to say that I cannot push a flow if I use the string
"IN_PORT" in the action. the string "INPORT" works fine. It's a syntactical
thing, not a functional thing.

Comment by Michal Rehak [ 08/Jun/15 ]

Hi Luis - yes - set-loopback action is defined in yang but it is not implemented.

We can change INPORT to IN_PORT or IN-PORT or whatever for Beryllium.

Regarding NPE - yes - there should be some better explanation and some more appropriate expcetion (like illegalArgumentException).

Comment by Abhijit Kumbhare [ 10/Nov/15 ]

Subhash - are you planning to fix it?

Comment by Andrej Leitner [ 17/Aug/16 ]

no life here, but still reasonable enhancement - updating summary and importance

Comment by Jozef Bacigal [ 09/Jun/17 ]

https://git.opendaylight.org/gerrit/#/c/58600/3

This issue is at wrong implementation of translation of name from enumeration. This patch fix this but still is possible to use INPORT for legacy reasons. Also fix NPE by using wrong port name.

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