BugFix #958 in OVSDB setting LLDP length to 0xffff 44/7144/4
authorBrent Salisbury <brent.salisbury@gmail.com>
Sat, 17 May 2014 22:39:35 +0000 (18:39 -0400)
committerBrent Salisbury <brent.salisbury@gmail.com>
Fri, 30 May 2014 05:05:30 +0000 (01:05 -0400)
commita4c7d4e538bacb8c954023dad625ed472307a525
tree1976907d3de92963cecd58cc743c848a0be05a46
parenta511d953a46873d8a69494950dd0e662442a8eb7
BugFix #958 in OVSDB setting LLDP length to 0xffff

Patch4: rebase

Patch3: Setting the max length to the max value
to prevent truncation of the packets. The default
contrustor was (0). Packets are no longer being
truncated now.

-For the commentors here is the output of removing
maxlength():
-----------
OFPT_PACKET_IN (OF1.3) (xid=0x0): total_len=89
in_port=1 tun_src=172.16.86.129
tun_dst=172.16.86.128 (via action) data_len=0
(unbuffered) (***total_len != data_len***)

-With output.setMaxLength(0xffff); at max val
output is as follows:
--------------------
OFPT_PACKET_IN (OF1.3) (xid=0x0): total_len=90
in_port=LOCAL (via no_match) data_len=90
buffer=0x00000101

Patch2:
Pulling the max_len all together should solve
the truncating issue. Hard to tell as only half of
the flowmods are getting installed at the moment
and this creates lots of deserialization errors
from some IPv6 punts. It doesnt solve the issues
in the Neutron plugin at the moment. The original
error doesnt appear for me outside of OVS logs. There
isnt a need to send any packet payload which is what
the max_length field is for per the spec. I was thining
zero would send the whole payload but per the spec
and thought ofprovider had a good reason to use 40bits
but not so much. Will add comments there.

/*
From of1.3 spec section A.2.5
"The max_len indicates the maximum amount of data from
 a packet that should be sent when the port is
OFPP_CONTROLLER. If max_len is zero, the switch must
send zero bytes of the packet. A max_len of
OFPCML_NO_BUFFER means that the complete packet
should be sent, and it should not be buffered."
*/
Change-Id: Ifcbe22e38d599096a2e451144b461e128a41ee08
Signed-off-by: Brent Salisbury <brent.salisbury@gmail.com>
neutron/src/main/java/org/opendaylight/ovsdb/neutron/provider/OF13Provider.java