> 2013/10/24 YAMAMOTO Takashi <[email protected]> > >> > 2013/10/24 Chen Chen <[email protected]> >> > >> >> The max_len is not really a bug. But I suggest one line of warning can >> be >> >> added in __init__ of OFPActionOutput: >> >> >> >> if (port == OFPP_CONTROLLER and max_len == 0): >> >> LOG.warning("Port is set to controller but max_len is 0.") >> >> >> >> To give a clue about what's going on if developers accidentally forget >> to >> >> set the max_len. >> >> >> >> >> > I guess that it is a good idea to output a log. >> >> i disagree. >> the use of port=controller max_len=0 is perfectly valid. >> besides that, as that max_len=0 isn't the default anymore, >> it's likely intentional. >> >> > Yes. I think that it will be the following if it inserts now. > > if (port != OFPP_CONTROLLER and max_len != 0): > LOG.info('max_len is non-zero but port is not set to a controller')
this one looks ok to me. LOG.debug is more appropriate though. YAMAMOTO Takashi > > >> YAMAMOTO Takashi >> >> > >> > >> >> On Wed, Oct 23, 2013 at 3:53 AM, YAMAMOTO Takashi < >> [email protected]>wrote: >> >> >> >>> > 2013/10/23 FUJITA Tomonori <[email protected]> >> >>> > >> >>> >> On Wed, 23 Oct 2013 11:33:53 +0900 (JST) >> >>> >> [email protected] (YAMAMOTO Takashi) wrote: >> >>> >> >> >>> >> >> 2013/10/21 FUJITA Tomonori <[email protected]> >> >>> >> >> >> >>> >> >>> On Mon, 21 Oct 2013 18:45:23 +0900 >> >>> >> >>> Satoshi Kobayashi <[email protected]> wrote: >> >>> >> >>> >> >>> >> >>> > I was also mistaken in it and made time useless. >> >>> >> >>> > Therefore I feel that it is better to change a default value. >> >>> >> >>> > >> >>> >> >>> > Is it like this\x85? (RFC because I do not know that this is >> >>> >> excellent) >> >>> >> >>> > ------------------------------ >> >>> >> >>> > def __init__(self, port, >> >>> max_len=ofproto_v1_3.OFPCML_NO_BUFFER, >> >>> >> >>> > type_=None, len_=None): >> >>> >> >>> > super(OFPActionOutput, self).__init__() >> >>> >> >>> > self.port = port >> >>> >> >>> > self.max_len = max_len if port == >> >>> >> ofproto_v1_3.OFPP_CONTROLLER >> >>> >> >>> else >> >>> >> >>> > 0 >> >>> >> >>> >> >>> >> >>> Changing the default to non zero value is fine by me. However, >> >>> using >> >>> >> >>> OFPCML_NO_BUFFER has big side effects (could be harmful), the >> >>> packet >> >>> >> >>> is not buffered anymore? >> >>> >> >>> >> >>> >> >> >> >>> >> >> I agree. >> >>> >> >> How is it that uses OFPCML_MAX? I want to set the default size >> large >> >>> >> >> enough. If it is a fixed number, it is nice. >> >>> >> > >> >>> >> > how about 128, which is the default miss_send_len? >> >>> >> >> >>> >> My hunch says that we would get reports "corrupted packets are sent >> to >> >>> >> a controller" even with that. >> >>> >> >> >>> >> I guess that OFPCML_MAX is "safer". Let's use it for both 1.2 and >> 1.3 >> >>> >> >> >>> > >> >>> > I sent the patch. But I stop that if the port is OFPP_CONTROLLER, >> >>> max_len >> >>> > is set to 0. >> >>> > >> >>> >>From the following reasons: >> >>> > 1. It modifies a content without expecting when parsing a message >> >>> > 2. It requires many fixes to unit test >> >>> > >> >>> > Probably it will be ignored by a switch if the port is not >> >>> OFPP_CONTROLLER >> >>> > and max_len is not 0. >> >>> > (I was not able to find behavior at that time from OpenFlow switch >> >>> > specification) >> >>> >> >>> afaik, the meaning of max_len is defined only for port=controller. >> >>> >> >>> YAMAMOTO Takashi >> >>> >> >>> > >> >>> > Thanks, >> >>> > Satoshi >> >>> >> >> >> >> >> >> >> >> -- >> >> Thanks, >> >> Chen >> >> >> > >> > >> > >> > -- >> > Satoshi Kobayashi <[email protected]> >> > > > > -- > Satoshi Kobayashi <[email protected]> ------------------------------------------------------------------------------ Android is increasing in popularity, but the open development platform that developers love is also attractive to malware creators. Download this white paper to learn more about secure code signing practices that can help keep Android apps secure. http://pubads.g.doubleclick.net/gampad/clk?id=65839951&iu=/4140/ostg.clktrk _______________________________________________ Ryu-devel mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/ryu-devel
