diff options
author | Ben Pfaff <blp@nicira.com> | 2012-07-16 09:37:22 -0700 |
---|---|---|
committer | Ben Pfaff <blp@nicira.com> | 2012-07-16 14:46:22 -0700 |
commit | 13f894b1f04f116a51e9dd7ac1a4485bd6057366 (patch) | |
tree | edbaf4e546aa9abdb2c595712709900334b4f2b9 | |
parent | 296ed880132c5d3f20d84b1ffea9959d8d6be76b (diff) | |
download | openvswitch-13f894b1f04f116a51e9dd7ac1a4485bd6057366.tar.gz |
ofp-actions: Improve comments.
Reported-by: Joe Stringer <joe@wand.net.nz>
Signed-off-by: Ben Pfaff <blp@nicira.com>
-rw-r--r-- | lib/ofp-actions.c | 14 |
1 files changed, 10 insertions, 4 deletions
diff --git a/lib/ofp-actions.c b/lib/ofp-actions.c index 93f6bf77b..582b5aea6 100644 --- a/lib/ofp-actions.c +++ b/lib/ofp-actions.c @@ -505,8 +505,11 @@ ofpacts_pull_actions(struct ofpbuf *openflow, unsigned int actions_len, * in 'ofpacts' by the converted ofpacts; on failure, clears 'ofpacts'. * Returns 0 if successful, otherwise an OpenFlow error. * - * This function does not check that the actions are valid in a given context. - * The caller should do so, with ofpacts_check(). */ + * The parsed actions are valid generically, but they may not be valid in a + * specific context. For example, port numbers up to OFPP_MAX are valid + * generically, but specific datapaths may only support port numbers in a + * smaller range. Use ofpacts_check() to additional check whether actions are + * valid in a specific context. */ enum ofperr ofpacts_pull_openflow10(struct ofpbuf *openflow, unsigned int actions_len, struct ofpbuf *ofpacts) @@ -826,8 +829,11 @@ get_actions_from_instruction(const struct ofp11_instruction *inst, * instructions, so you should call ofpacts_pull_openflow11_instructions() * instead of this function. * - * This function does not check that the actions are valid in a given context. - * The caller should do so, with ofpacts_check(). */ + * The parsed actions are valid generically, but they may not be valid in a + * specific context. For example, port numbers up to OFPP_MAX are valid + * generically, but specific datapaths may only support port numbers in a + * smaller range. Use ofpacts_check() to additional check whether actions are + * valid in a specific context. */ enum ofperr ofpacts_pull_openflow11_actions(struct ofpbuf *openflow, unsigned int actions_len, |