projects
/
openvswitch
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Fix up usage of flow_wildcards_t.
[openvswitch]
/
lib
/
ofp-parse.c
diff --git
a/lib/ofp-parse.c
b/lib/ofp-parse.c
index de7cd9c72e17603dc096a21c330e7113baf2ab67..f45c450c65ca4b07cfed86fa554d3c753e9cf568 100644
(file)
--- a/
lib/ofp-parse.c
+++ b/
lib/ofp-parse.c
@@
-22,6
+22,7
@@
#include <errno.h>
#include <stdlib.h>
#include <errno.h>
#include <stdlib.h>
+#include "autopath.h"
#include "byte-order.h"
#include "dynamic-string.h"
#include "netdev.h"
#include "byte-order.h"
#include "dynamic-string.h"
#include "netdev.h"
@@
-453,6
+454,10
@@
str_to_action(char *str, struct ofpbuf *b)
struct nx_action_multipath *nam;
nam = ofpbuf_put_uninit(b, sizeof *nam);
multipath_parse(nam, arg);
struct nx_action_multipath *nam;
nam = ofpbuf_put_uninit(b, sizeof *nam);
multipath_parse(nam, arg);
+ } else if (!strcasecmp(act, "autopath")) {
+ struct nx_action_autopath *naa;
+ naa = ofpbuf_put_uninit(b, sizeof *naa);
+ autopath_parse(naa, arg);
} else if (!strcasecmp(act, "output")) {
put_output_action(b, str_to_u32(arg));
} else if (!strcasecmp(act, "enqueue")) {
} else if (!strcasecmp(act, "output")) {
put_output_action(b, str_to_u32(arg));
} else if (!strcasecmp(act, "enqueue")) {
@@
-820,7
+825,8
@@
parse_ofp_str(struct flow_mod *fm, uint8_t *table_idx,
} else {
parse_field_value(&fm->cr, f->index, value);
}
} else {
parse_field_value(&fm->cr, f->index, value);
}
- } else if (!strncmp(name, "reg", 3) && isdigit(name[3])) {
+ } else if (!strncmp(name, "reg", 3)
+ && isdigit((unsigned char) name[3])) {
unsigned int reg_idx = atoi(name + 3);
if (reg_idx >= FLOW_N_REGS) {
ovs_fatal(0, "only %d registers supported", FLOW_N_REGS);
unsigned int reg_idx = atoi(name + 3);
if (reg_idx >= FLOW_N_REGS) {
ovs_fatal(0, "only %d registers supported", FLOW_N_REGS);
@@
-853,7
+859,7
@@
parse_ofp_flow_mod_str(struct list *packets, enum nx_flow_format *cur_format,
parse_ofp_str(&fm, NULL, is_del ? NULL : &actions, string);
fm.command = command;
parse_ofp_str(&fm, NULL, is_del ? NULL : &actions, string);
fm.command = command;
- min_format = ofputil_min_flow_format(&fm.cr
, true, fm.cookie
);
+ min_format = ofputil_min_flow_format(&fm.cr);
next_format = MAX(*cur_format, min_format);
if (next_format != *cur_format) {
struct ofpbuf *sff = ofputil_make_set_flow_format(next_format);
next_format = MAX(*cur_format, min_format);
if (next_format != *cur_format) {
struct ofpbuf *sff = ofputil_make_set_flow_format(next_format);