> On Wed, 25 Sep 2013 11:14:40 -0400 > Changbin Liu <[email protected]> wrote: > >> We used Tcpdump to capture the packets and validated that it is an issue >> related to "malfold openflow packet" sent by Open vSwitch to the Ryu >> controller. We also used this patch ( >> http://www.mail-archive.com/[email protected]/msg02228.html) >> to dump the error msg, which is e.g., >> >> *Encounter an error during parsing OpenFlow packet from switch.This implies >> switch sending a malfold OpenFlow packet.version 0x01 msg_type 10 msg_len >> 18 xid 0 buf 0x1 0xa 0x0 0x12 0x0 0x0 0x0 0x0 0xff 0xff 0xff 0xff 0x0 0x2a >> 0x0 0x6 0x1 0x0* >> *Traceback (most recent call last):* >> * File >> "/usr/local/lib/python2.7/dist-packages/ryu/ofproto/ofproto_parser.py", >> line 58, in msg* >> * return msg_parser(datapath, version, msg_type, msg_len, xid, buf)* >> * File >> "/usr/local/lib/python2.7/dist-packages/ryu/ofproto/ofproto_v1_0_parser.py", >> line 53, in msg_parser* >> * return parser(datapath, version, msg_type, msg_len, xid, buf)* >> * File >> "/usr/local/lib/python2.7/dist-packages/ryu/ofproto/ofproto_v1_0_parser.py", >> line 1743, in parser* >> * msg.buf, ofproto_v1_0.OFP_HEADER_SIZE)* >> *error: unpack_from requires a buffer of at least 12 bytes* >> *Error in the datapath 000046c8c9b16440 from ('192.168.254.2', 48012)* > > I still think that this is an OVS bug (sending 18 bytes PacketIn > message) but I've attached a patch to workaround it. Can you try this?
i think that the comment about padding on ofp_packet_in in OF1.0 spec is talking about C structure padding and the following OFP_ASSERT. ie. bogus. i posted a patch with a comment. YAMAMOTO Takashi > >> We used Open vSwitch version 1.9.90 and most recent Ryu code in the master >> branch. Are there any known issues with compatibility between Ryu and Open >> vSwitch? Or any special configurations needed to be taken care of? In our >> expectation Ryu should be able to work with Open vSwitch smoothly just out >> of the box, and not sure why even the first packets (we tried ARP, DHCP, >> etc) crash Ryu abruptly. Btw, we are researchers from AT&T Labs Research >> and University of Pennsylvania, and are using Ryu to build large-scale >> virtual networks and also for OpenStack. We appreciate your help. Thanks. > > Sounds an interesting use case. Keep us updated! > > Thanks, > > diff --git a/ryu/ofproto/ofproto_v1_0.py b/ryu/ofproto/ofproto_v1_0.py > index b47d0a1..8cd7674 100644 > --- a/ryu/ofproto/ofproto_v1_0.py > +++ b/ryu/ofproto/ofproto_v1_0.py > @@ -164,10 +164,11 @@ assert calcsize(OFP_PORT_MOD_PACK_STR) + > OFP_HEADER_SIZE == OFP_PORT_MOD_SIZE > OFPR_NO_MATCH = 0 # No matching flow. > OFPR_ACTION = 1 # Action explicitly output to controller. > > -OFP_PACKET_IN_PACK_STR = '!IHHBx2x' # the last 2x is for ofp_packet_in::data > +OFP_PACKET_IN_PACK_STR = '!IHHBx' > OFP_PACKET_IN_SIZE = 20 > OFP_PACKET_IN_DATA_OFFSET = 18 > -assert calcsize(OFP_PACKET_IN_PACK_STR) + OFP_HEADER_SIZE == > OFP_PACKET_IN_SIZE > +assert (calcsize(OFP_PACKET_IN_PACK_STR) + OFP_HEADER_SIZE + 2 == > + OFP_PACKET_IN_SIZE) > > # enum ofp_action_type > OFPAT_OUTPUT = 0 # Output to switch port. > > ------------------------------------------------------------------------------ > October Webinars: Code for Performance > Free Intel webinars can help you accelerate application performance. > Explore tips for MPI, OpenMP, advanced profiling, and more. Get the most from > the latest Intel processors and coprocessors. See abstracts and register > > http://pubads.g.doubleclick.net/gampad/clk?id=60133471&iu=/4140/ostg.clktrk > _______________________________________________ > Ryu-devel mailing list > [email protected] > https://lists.sourceforge.net/lists/listinfo/ryu-devel ------------------------------------------------------------------------------ October Webinars: Code for Performance Free Intel webinars can help you accelerate application performance. Explore tips for MPI, OpenMP, advanced profiling, and more. Get the most from the latest Intel processors and coprocessors. See abstracts and register > http://pubads.g.doubleclick.net/gampad/clk?id=60133471&iu=/4140/ostg.clktrk _______________________________________________ Ryu-devel mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/ryu-devel
