Hi, On 2016年10月04日 11:04, illlusioner77367 . wrote: > Hi > > Recently I find out some problems during the development of a Ryu's > application. > > The first problem I found out is I don't know how to enable the buffering > in the SDN switch. > > Basically most of the time when adding a rule we use OFP_NO_BUFFER to tell > the switch not to buffer the packet .
"buffer_id=OFP_NO_BUFFER" in OFPFlowMod is not used for telling the switch not to buffer the packets. According to "7.3.4.1 Modify Flow Entry Message" in the OpenFlow Spec 1.3.5, The buffer_id is used to refer to the buffered packet when OFPFlowMod is received. > > I try to change the OFP_NO_BUFFER to the number of byte the switch can > transmit. > > However I found out when the number is small like 60~70 bytes, the switch > will send an incomplete packet to the controller. But the effect I want is > the switch will add the packet into its own buffer and will only send the > buffer id and the packet header to the controller without any payload. Is > there something I miss or need to add in the .EventOFPSwitchFeature handler > ? If you want to specify the packet data length that should be sent, please specify the "max_len" in OFPActionOutput for Packet-In. http://ryu.readthedocs.io/en/latest/ofproto_v1_3_ref.html#ryu.ofproto.ofproto_v1_3_parser.OFPActionOutput > > > The second problem I need to know is the cookie in the SDN flow table. I > can only guess that, every SDN flow rule in the SDN switch will have a > cookie, and when we want to modify or delete the flow rule, we basically > can use the cookie mask to filter out some flow rules. But how does this > work, what is the maximum number of the cookie mask ? An example will be > appreciated. The cookie field is chosen by the controller (not the switch side). You can set the arbitrary value/mask by sending OFPFlowMod. http://ryu.readthedocs.io/en/latest/ofproto_v1_3_ref.html#ryu.ofproto.ofproto_v1_3_parser.OFPFlowMod And the max value of the cookie is 0xffffffffffffffe. (0xfffffffffffffff is reserved and must not be used.) Thanks, Iwase > > BR > > > > ------------------------------------------------------------------------------ > Check out the vibrant tech community on one of the world's most > engaging tech sites, SlashDot.org! http://sdm.link/slashdot > > > > _______________________________________________ > Ryu-devel mailing list > [email protected] > https://lists.sourceforge.net/lists/listinfo/ryu-devel > ------------------------------------------------------------------------------ Check out the vibrant tech community on one of the world's most engaging tech sites, SlashDot.org! http://sdm.link/slashdot _______________________________________________ Ryu-devel mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/ryu-devel
