Skip to content

Commit

Permalink
ofp-util: Support OFPP_LOCAL in enqueue actions.
Browse files Browse the repository at this point in the history
According to the specification the enqueue action should refer to
"a valid physical port", or OFPP_IN_PORT.  It would be strange to
attach a queueing discipline to the local port, but I see no reason
to restrict it.
  • Loading branch information
ejj committed Nov 21, 2011
1 parent 5fe0ec3 commit 8217263
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 1 deletion.
10 changes: 10 additions & 0 deletions DESIGN
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,16 @@ successful deployment. The end of this document contains contact
information that can be used to let us know how we can make Open vSwitch
more generally useful.

OpenFlow
========

The OpenFlow 1.0 specification requires the output port of the OFPAT_ENQUEUE
action to "refer to a valid physical port (i.e. < OFPP_MAX) or OFPP_IN_PORT".
Although OFPP_LOCAL is not less than OFPP_MAX, it is an 'internal' port which
can have QoS applied to it in Linux. Since we allow the OFPAT_ENQUEUE to apply
to 'internal' ports whose port numbers are less than OFPP_MAX, we interpret
OFPP_LOCAL as a physical port and support OFPAT_ENQUEUE on it as well.


Multiple Table Support
======================
Expand Down
3 changes: 2 additions & 1 deletion lib/ofp-util.c
Original file line number Diff line number Diff line change
Expand Up @@ -2211,7 +2211,8 @@ validate_actions(const union ofp_action *actions, size_t n_actions,

case OFPUTIL_OFPAT_ENQUEUE:
port = ntohs(((const struct ofp_action_enqueue *) a)->port);
if (port >= max_ports && port != OFPP_IN_PORT) {
if (port >= max_ports && port != OFPP_IN_PORT
&& port != OFPP_LOCAL) {
error = ofp_mkerr(OFPET_BAD_ACTION, OFPBAC_BAD_OUT_PORT);
}
break;
Expand Down

0 comments on commit 8217263

Please sign in to comment.