On Mon, Apr 15, 2013 at 04:20:04PM -0400, Eric S. Johnson wrote:
> 
> 
> Please forgive me if I miss a simple solution of have a 
> flawed analysis. I am new to both ryu and to python.
> 
> 
> Ive been using ryu to develop a controller algorithm. I make
> use of the Packet libs to process OF packet in data.
> 
> When my ofswitch is connected to "the real world"  it 
> receives LLDP frames from its upstream (non OF) HP switch
> that are 170 octets of payload. 
> 
> But the switch only sends 128 of those octets because thats
> what controller/ofp_handler.py says to do around line 198:
> 
>         set_config = ofproto_parser.OFPSetConfig(
>             datapath, ofproto.OFPC_FRAG_NORMAL,
>             128  # TODO:XXX
>         )
> 
> That is where miss_send_length is set to 128
> 
> 
> The trouble comes when lib/packet/lldp.py is parsing the lldp
> message. It is fine working through the tlvs until it runs out 
> of data then the assert len(buf) >= self.len + LLDP_TLV_SIZE 
> gets thrown. 
> 
> The TLV in this case says it is 90 octets long, but the buf 
> doesn't have that much left. 
> 
> So....
> 
> What would be the way to fix this?
> 
> - up the miss_send_length ? 
> - have lldp.py recognise it has run out of buf and stop parsing
>   in a somewhat gracefull fashion? (and only partially parse the packet)
> - Just have packet lib stop parsing lldp (comment out the register)

- don't rely on table-miss. install the rule that
  matches lldp with output action to controller, OFPP_CONTROLLER,
  and arbitrary needed max_len.

thanks,

> So far I have taken the last option (simple, and I don't need
> to parse lldp (yet :) ) 
> 
> Thoughts?
> 
> E
> 
> 
> ------------------------------------------------------------------------------
> Precog is a next-generation analytics platform capable of advanced
> analytics on semi-structured data. The platform includes APIs for building
> apps and a phenomenal toolset for data science. Developers can use
> our toolset for easy data analysis & visualization. Get a free account!
> http://www2.precog.com/precogplatform/slashdotnewsletter
> _______________________________________________
> Ryu-devel mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/ryu-devel
> 

-- 
yamahata

------------------------------------------------------------------------------
Precog is a next-generation analytics platform capable of advanced
analytics on semi-structured data. The platform includes APIs for building
apps and a phenomenal toolset for data science. Developers can use
our toolset for easy data analysis & visualization. Get a free account!
http://www2.precog.com/precogplatform/slashdotnewsletter
_______________________________________________
Ryu-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/ryu-devel

Reply via email to