[ovs-dev] [PATCH 2/2] ofp-util: Treat a packet-out in_port of OFPP_CONTROLLER as OFPP_NONE.

Ben Pfaff blp at nicira.com
Mon Apr 30 21:59:51 UTC 2012


On Mon, Apr 30, 2012 at 02:53:16PM -0700, Ethan Jackson wrote:
> > +    if (po->in_port == OFPP_CONTROLLER) {
> > +        /* The OpenFlow 1.0 spec says OFPP_NONE is the correct in_port for a
> > +         * packet generated by the controller, but a lot of controllers
> > +         * mistakenly use OFPP_CONTROLLER instead.  Fix it up for them. */
> > +        po->in_port = OFPP_NONE;
> 
> My only question with this patch is whether we should be setting the
> in_port to OFPP_NONE, or letting it go through with an in_port of
> OFPP_CONTROLLER.  Assuming a controller mistakenly uses
> OFPP_CONTROLLER as its in_port, I would think that it would reasonably
> assume that if it wanted to match on packets coming from itself, it
> would match on OFPP_CONTROLLER as the in_port.  Thoughts on this?

Hmm, you mean something like a packet-out whose actions output to
OFPP_TABLE or which use a resubmit action?  (Otherwise, the packet
will not go through the flow table.)  I had not considered that.  It's
a weird thing to do, but I don't know that we should silently break
it.

I'll think about this.



More information about the dev mailing list