On Tue, Jan 03, 2012 at 05:13:46PM -0800, Justin Pettit wrote: > Both mirroring and "normal" processing make use of the input bundle to > perform various sanity checks. Controller-generated traffic typically > uses an ingress port of OFPP_NONE, which doesn't have a corresponding > input bundle. This commit fakes one up well enough that mirroring and > "normal" processing succeed. > > We looked at creating an actual bundle based on the "real" OFPP_NONE. > This was even uglier, since there were even more special-cases that > needed to be handled, including having to hide it from port queries. > > Reported-by: Jesse Gross <je...@nicira.com> > Signed-off-by: Justin Pettit <jpet...@nicira.com>
ofpp_none_bundle should be "static". CodingStyle says not to use C99 designated initializers: * Don't use designated initializers (e.g. don't write "struct foo foo = {.a = 1};" or "int a[] = {[2] = 5};"). However, I've wanted to use them in many places and C99 is now about 13 years old, so maybe we should remove this restriction. "git grep '^ *\..*='" shows that designated initializers have already crept in in a few non-Linux-specific places already, such as lib/ovsdb-types.h. What do you think? The only part of this that gives me much pause is input_vid_is_valid(). This function refers to in_bundle->ofproto->up.name, but only in cases that we can't hit. It still makes me a bit nervous, though. The test checks the mirroring case, but I think that "normal" was broken too. Can we add a test for that too? Thanks, Ben. _______________________________________________ dev mailing list dev@openvswitch.org http://openvswitch.org/mailman/listinfo/dev