Re: [nox-dev] get_route event in PyRouting
Hi Natasha, After some more debugging I discovered the error message was caused by a minor typo in our code. Instead of assigning to the attribute "outport" of a FullRoute instance, we were inadvertently assigning to "output" (this is in Python code). Could you add generating an error message when users do this as a low-priority feature request please :-) Also, while I understand the logic of wanting to prevent the inport and outport from being the same at either end of the link, what happens when someone uses NOX on a wireless AP in which case it may be the case that the input and output should be the same? Thanks again, Glen Natasha Gude wrote: > The message means that if the found route were to be installed, the > flow would be sent out the same port that it came in on at either the > source or destination access point switch. NOX state-wise, it means > we have a link connected to the same port as a switch, which is > incorrect. In the test code, the inport/outport fields of the > FullRoute object describe where the endhosts are connected, not where > the links are connected (which is on port 0). > > Natasha > > On Jul 18, 2008, at 8:16 PM, Glen Gibb wrote: > >> Hi all, >> >> Perhaps I'm misunderstanding the get_route event but I'm getting error >> messages like the following at times: >> 8|routing|ERR:Invalid route between aps 1731efa639:3 and >> 1731ed8d28:0 (inport == outport) >> >> Can someone clarify what this error means? As far as I can tell this >> error doesn't make sense for the scenario in which I'm trying to use it. >> I have three OF switches connected effectively in a line -- the two aps >> listed above are on opposite ends of this line. >> >> >> Also, looking through the examples for sample code I saw the following >> in pyunittests/routing_test.py: >> def post_events(self): >> e = Link_event(netinet.datapathid.from_host(2), >> netinet.datapathid.from_host(3), >> 0, 0, Link_event.ADD) >> self.post(e) >> e = Link_event(netinet.datapathid.from_host(1), >> netinet.datapathid.from_host(2), >> 0, 1, Link_event.ADD) >> self.post(e) >> self.d = defer.Deferred() >> return self.d >> >> def handle_link_event(self, event): >> if self.n_received == 0: >> self.n_received = 1 >> return CONTINUE >> >> route = pyrouting.PyFullRoute() >> route.id.src = src = netinet.datapathid.from_host(1) >> route.id.dst = dst = netinet.datapathid.from_host(3) >> route.inport = route.outport = 1 >> >> if not self.routing.get_route(route): >> >> Reading the above I would have thought that 1 and 3 would have been >> connected on port 0, but in the get_route it looks like you're querying >> from port 1? >> >> >> >> Thanks, >> Glen >> >> ___ >> nox-dev mailing list >> nox-dev@noxrepo.org >> http://noxrepo.org/mailman/listinfo/nox-dev_noxrepo.org > > ___ nox-dev mailing list nox-dev@noxrepo.org http://noxrepo.org/mailman/listinfo/nox-dev_noxrepo.org
Re: [nox-dev] get_route event in PyRouting
The message means that if the found route were to be installed, the flow would be sent out the same port that it came in on at either the source or destination access point switch. NOX state-wise, it means we have a link connected to the same port as a switch, which is incorrect. In the test code, the inport/outport fields of the FullRoute object describe where the endhosts are connected, not where the links are connected (which is on port 0). Natasha On Jul 18, 2008, at 8:16 PM, Glen Gibb wrote: > Hi all, > > Perhaps I'm misunderstanding the get_route event but I'm getting error > messages like the following at times: > 8|routing|ERR:Invalid route between aps 1731efa639:3 and > 1731ed8d28:0 (inport == outport) > > Can someone clarify what this error means? As far as I can tell this > error doesn't make sense for the scenario in which I'm trying to use > it. > I have three OF switches connected effectively in a line -- the two > aps > listed above are on opposite ends of this line. > > > Also, looking through the examples for sample code I saw the following > in pyunittests/routing_test.py: > def post_events(self): > e = Link_event(netinet.datapathid.from_host(2), > netinet.datapathid.from_host(3), > 0, 0, Link_event.ADD) > self.post(e) > e = Link_event(netinet.datapathid.from_host(1), > netinet.datapathid.from_host(2), > 0, 1, Link_event.ADD) > self.post(e) > self.d = defer.Deferred() > return self.d > > def handle_link_event(self, event): > if self.n_received == 0: > self.n_received = 1 > return CONTINUE > > route = pyrouting.PyFullRoute() > route.id.src = src = netinet.datapathid.from_host(1) > route.id.dst = dst = netinet.datapathid.from_host(3) > route.inport = route.outport = 1 > > if not self.routing.get_route(route): > > Reading the above I would have thought that 1 and 3 would have been > connected on port 0, but in the get_route it looks like you're > querying > from port 1? > > > > Thanks, > Glen > > ___ > nox-dev mailing list > nox-dev@noxrepo.org > http://noxrepo.org/mailman/listinfo/nox-dev_noxrepo.org ___ nox-dev mailing list nox-dev@noxrepo.org http://noxrepo.org/mailman/listinfo/nox-dev_noxrepo.org
Re: [nox-dev] get_route event in PyRouting
To follow up on my own e-mail I should point out that I looked at the documentation in routing.cc: // Main API method. Given a FullRoute struct with the 'id', src access // point port 'inport', and dst access point port 'outport' set, fills in // 'route' with the route between the two datapaths. Returns 'true' if // successful, else 'false'. Returns 'false' when either no route between // the two datapaths exists, or the access point ports cause for a packet // to be sent out on the same port it was received on (error!) When would "the access point ports cause for a packet to be sent out on the same port it was received on (error!)"? Glen Gibb wrote: > Hi all, > > Perhaps I'm misunderstanding the get_route event but I'm getting error > messages like the following at times: > 8|routing|ERR:Invalid route between aps 1731efa639:3 and > 1731ed8d28:0 (inport == outport) > > Can someone clarify what this error means? As far as I can tell this > error doesn't make sense for the scenario in which I'm trying to use it. > I have three OF switches connected effectively in a line -- the two aps > listed above are on opposite ends of this line. > > > Also, looking through the examples for sample code I saw the following > in pyunittests/routing_test.py: > def post_events(self): > e = Link_event(netinet.datapathid.from_host(2), >netinet.datapathid.from_host(3), >0, 0, Link_event.ADD) > self.post(e) > e = Link_event(netinet.datapathid.from_host(1), >netinet.datapathid.from_host(2), >0, 1, Link_event.ADD) > self.post(e) > self.d = defer.Deferred() > return self.d > > def handle_link_event(self, event): > if self.n_received == 0: > self.n_received = 1 > return CONTINUE > > route = pyrouting.PyFullRoute() > route.id.src = src = netinet.datapathid.from_host(1) > route.id.dst = dst = netinet.datapathid.from_host(3) > route.inport = route.outport = 1 > > if not self.routing.get_route(route): > > Reading the above I would have thought that 1 and 3 would have been > connected on port 0, but in the get_route it looks like you're querying > from port 1? > > > > Thanks, > Glen > > ___ > nox-dev mailing list > nox-dev@noxrepo.org > http://noxrepo.org/mailman/listinfo/nox-dev_noxrepo.org > > ___ nox-dev mailing list nox-dev@noxrepo.org http://noxrepo.org/mailman/listinfo/nox-dev_noxrepo.org
[nox-dev] get_route event in PyRouting
Hi all, Perhaps I'm misunderstanding the get_route event but I'm getting error messages like the following at times: 8|routing|ERR:Invalid route between aps 1731efa639:3 and 1731ed8d28:0 (inport == outport) Can someone clarify what this error means? As far as I can tell this error doesn't make sense for the scenario in which I'm trying to use it. I have three OF switches connected effectively in a line -- the two aps listed above are on opposite ends of this line. Also, looking through the examples for sample code I saw the following in pyunittests/routing_test.py: def post_events(self): e = Link_event(netinet.datapathid.from_host(2), netinet.datapathid.from_host(3), 0, 0, Link_event.ADD) self.post(e) e = Link_event(netinet.datapathid.from_host(1), netinet.datapathid.from_host(2), 0, 1, Link_event.ADD) self.post(e) self.d = defer.Deferred() return self.d def handle_link_event(self, event): if self.n_received == 0: self.n_received = 1 return CONTINUE route = pyrouting.PyFullRoute() route.id.src = src = netinet.datapathid.from_host(1) route.id.dst = dst = netinet.datapathid.from_host(3) route.inport = route.outport = 1 if not self.routing.get_route(route): Reading the above I would have thought that 1 and 3 would have been connected on port 0, but in the get_route it looks like you're querying from port 1? Thanks, Glen ___ nox-dev mailing list nox-dev@noxrepo.org http://noxrepo.org/mailman/listinfo/nox-dev_noxrepo.org