Send a patch that includes a test, and I'll apply it.
On Thu, Jul 24, 2014 at 11:33:56AM -0400, Anup Khadka wrote: > Ben, > It was more about sanity tests on OVS than anything else (and hardware > switches using OVS as its stack). Naturally, if a controller is trying to > negotiate version 0x00, there is something wrong with the controller, no > question about it. > > The issue is not that. The issue was more about how OVS should respond to a > request as such (or few other bad requests that I am testing), and if there > was anything in the standard that I could have missed that explains the > right behavior of the switch in such scenarios. > > 0x00 doesn't represent an OpenFlow version, no question, but there are > error codes for bad versions under bad request. When and why those codes > should be used isn't completely clear, at least to me, and I was seeking > insight. > > Just reading through the standard, the non-experimental versions are: > 0x01, 0x02, 0x03, 0x04, 0x05, and 0x06. The experimental versions are 0x81 > - 0x99. > > The OVS as currently constructed, I believe, sends a Hello failed with > incompatible error for every version 0x01 - 0xFF. > > Why does the switch silently ignore a Hello message with version 0, but > responds with a hello failed for version 0x01 - 0xFF even though its not > explicitly stated as a valid openflow version. In other words, why is a > version, say 0xFE, a valid version? > > If you think, the switch's current behavior is expected, then its alright. > I am trying to get a better insight, and make sure its consistent. > > Thanks, > Anup > > > > > > > On Thu, Jul 24, 2014 at 11:07 AM, Ben Pfaff <b...@nicira.com> wrote: > > > On Wed, Jul 23, 2014 at 07:59:10PM -0400, Anup Khadka wrote: > > > If OVS receives a Hello packet with version set to 0, it logs an error > > > "received message while expecting hello" and change's vconn's state > > without > > > sending any message back to the controller. > > > > > > Is this a desired behavior? The standard isn't really clear on how to > > > process a Hello packet with version == 0 (or if its even a valid OpenFlow > > > packet at that point), but I think its reasonable for a controller to > > > expect either one of the following two messages: > > > > > > 1. An OFPT_ERROR message with OFPET_HELLO_FAILED error type, and > > > OFPHFC_INCOMPATIBLE error code (this was the behavior of OVS 1.4.0 stack, > > > but the code base, and checks were significantly different then. The old > > > code didn't really check for version number range, simply transitioned to > > > VCS_SEND_ERROR state, and sent an error back to controller) > > > > > > 2. An OFPT_ERROR message with OFPET_BAD_REQUEST error type, and > > > OFPBRC_BAD_VERSION error code. > > > > It's not great behavior. > > > > I don't know how OVS would send OFPT_ERROR in this case, though, because > > 0x00 doesn't represent an OpenFlow version and so there aren't any error > > codes to use. > > > > If your controller is trying to negotiate version 0x00, it's buggy. Fix > > it. > > _______________________________________________ discuss mailing list discuss@openvswitch.org http://openvswitch.org/mailman/listinfo/discuss