[OPNFLWPLUG-338] Buffer ID set to 0 instead of OFP_NO_BUFFER in PACKET_OUT messages Created: 19/Jan/15  Updated: 27/Sep/21  Resolved: 18/Mar/15

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

Type: Bug
Reporter: Colin Dixon 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


Attachments: File flow_mod_with_buffer_id_0.pcap    
Issue Links:
Blocks
blocks L2SWITCH-30 Buffer ID set to 0 instead of OFP_NO_... Resolved
External issue ID: 2608

 Description   

As reported here: https://lists.opendaylight.org/pipermail/l2switch-dev/2014-November/000347.html



 Comments   
Comment by Colin Dixon [ 19/Jan/15 ]

Should be fixed by these two patches:
https://git.opendaylight.org/gerrit/#/c/14253/

Comment by Jamo Luhrsen [ 17/Mar/15 ]

re-opening as this was seen in the LLDP packet-outs being used for link discovery.

packet capture attached.

this patch may fix the issue, but until it's merged or a better one is made I wanted
to open this to track it:

https://git.opendaylight.org/gerrit/#/c/16677/1

Comment by Jamo Luhrsen [ 17/Mar/15 ]

Attachment flow_mod_with_buffer_id_0.pcap has been added with description: flow mod using buffer_id == 0

Comment by Michal Rehak [ 17/Mar/15 ]

Hi,
your patch is fine but there is later used a default value in case when bufferId is missing (FlowConvertor).

I guess that the flow you are referring to is the one with xid=8 from the attached pcap file. This looks like flow from l2switch (table-miss-enforcer currently uses empty match).

I tried to find some code and first dive gave me this:
loopremover/implementation/src/main/java/org/opendaylight/l2switch/loopremover/flow/InitialFlowWriter.java; line 215

Could you try to fix this locally and if it works, please file new bug to l2switch (and eventually push fix).

Thank you.

Comment by Michal Rehak [ 17/Mar/15 ]

merged

Comment by Michal Rehak [ 17/Mar/15 ]

Jamo, do you use up-to-date sources? It looks like l2switch is already fixed - see L2SWITCH-30.

Comment by Jamo Luhrsen [ 17/Mar/15 ]

Michal,

I actually never pulled l2switch locally yet, so I have to assume I'm using latest code for that.

But, this one issue (I thought) was just missed with the fix for L2SWITCH-30 and only applies to the flow_mod for punting LLDP's to controller. I wonder if there is a higher level to make this change that buffer_id takes -1 every time by default (instead of default 0 for Long()) so it's not neccessary to force it to -1.

Let me know what I can do though, if anything.

Comment by Michal Rehak [ 18/Mar/15 ]

Hi Jamo,
I just tried with odl-l2switch-loopremover feature and it looks like the flow covering LLDP contains bufferId = 0xffff. Could you try with latest integration-karaf build?
https://nexus.opendaylight.org/content/repositories/opendaylight.snapshot/org/opendaylight/integration/distribution-karaf/0.3.0-SNAPSHOT/

Regarding the default value for bufferId - currently if there is null input, we use OFConstants.OFP_NO_BUFFER.

Comment by Colin Dixon [ 18/Mar/15 ]

I'm pretty sure I hunted this down and fixed it everywhere in L2 Switch.

Comment by Jamo Luhrsen [ 18/Mar/15 ]

I must have confused my setups with an older (probably Helium) instance when
I found the buffer_id to be 0. I've tried with lithium builds before and after
this patch (https://git.opendaylight.org/gerrit/#/c/16677/1) was merged and I do
see -1 being used in buffer_id.

we can back out that patch if you think it's necessary.

sorry for adding confusion here. Marking this bug closed.

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