wdp_rule->client_data = xzalloc(sizeof(struct ofproto_rule));
}
-
static inline bool
rule_is_hidden(const struct wdp_rule *rule)
{
put.idle_timeout = idle_timeout;
put.hard_timeout = 0;
put.ofp_table_id = 0xff;
+ put.cookie = htonll(0);
+ put.xid = htonl(0);
if (!wdp_flow_put(p->wdp, &put, NULL, &rule)) {
ofproto_rule_init(rule);
put.idle_timeout = ntohs(ofm->idle_timeout);
put.hard_timeout = ntohs(ofm->hard_timeout);
put.ofp_table_id = flow_mod_table_id(ofconn, ofm);
+ put.cookie = ofm->cookie;
+ put.xid = ofm->header.xid;
error = wdp_flow_put(p->wdp, &put, NULL, &rule);
if (error) {
/* XXX wdp_flow_put should return OpenFlow error code. */
put.n_actions = n_actions;
put.idle_timeout = put.hard_timeout = 0;
put.ofp_table_id = rule->ofp_table_id;
+ put.cookie = ofm->cookie;
+ put.xid = ofm->header.xid;
return wdp_flow_put(p->wdp, &put, NULL, NULL);
}
\f
/* OpenFlow 'table_id' to which a new flow is to be added. Value 0xff
* means that the WDP implementation should select a table. */
uint8_t ofp_table_id;
+
+ /* If this is a new flow being created due to an OpenFlow OFPT_FLOW_MOD
+ * request, these values are copied from the ofp_header and ofp_flow_mod,
+ * respectively, in network byte order. Otherwise they are zero.
+ *
+ * These values are provided to enable better logging. The WDP provider
+ * may otherwise ignore them. */
+ uint64_t cookie;
+ uint32_t xid;
};
int wdp_flow_put(struct wdp *, struct wdp_flow_put *,