#include "ofp-util.h"
#include "ofpbuf.h"
#include "openflow/openflow.h"
+#include "ovs-thread.h"
#include "packets.h"
#include "socket-util.h"
#include "vconn.h"
} else{
fm->new_cookie = htonll(0);
}
+ fm->modify_cookie = false;
fm->table_id = 0xff;
fm->command = command;
fm->idle_timeout = OFP_FLOW_PERMANENT;
return xstrdup("cannot set cookie");
}
error = str_to_be64(value, &fm->new_cookie);
+ fm->modify_cookie = true;
}
} else if (mf_from_name(name)) {
error = parse_field(mf_from_name(name), value, &fm->match);
parse_flow_monitor_request__(struct ofputil_flow_monitor_request *fmr,
const char *str_, char *string)
{
- static uint32_t id;
-
+ static atomic_uint32_t id = ATOMIC_VAR_INIT(0);
char *save_ptr = NULL;
char *name;
- fmr->id = id++;
+ atomic_add(&id, 1, &fmr->id);
+
fmr->flags = (NXFMF_INITIAL | NXFMF_ADD | NXFMF_DELETE | NXFMF_MODIFY
| NXFMF_OWN | NXFMF_ACTIONS);
fmr->out_port = OFPP_NONE;