- Clear contents of "pad" field port status messages.
if (!ops)
return -ENOMEM;
ops->reason = status;
+ memset(ops->pad, 0, sizeof ops->pad);
fill_port_desc(p, &ops->desc);
return send_openflow_skb(skb, NULL);
return -ENOMEM;
flow_fill_match(&ofe->match, &flow->key);
+
+ memset(ofe->pad, 0, sizeof ofe->pad);
+ ofe->priority = htons(flow->priority);
+
duration_j = (flow->timeout - HZ * flow->max_idle) - flow->init_time;
- ofe->duration = htonl(duration_j / HZ);
- ofe->packet_count = cpu_to_be64(flow->packet_count);
- ofe->byte_count = cpu_to_be64(flow->byte_count);
+ ofe->duration = htonl(duration_j / HZ);
+ ofe->packet_count = cpu_to_be64(flow->packet_count);
+ ofe->byte_count = cpu_to_be64(flow->byte_count);
+
return send_openflow_skb(skb, NULL);
}
/* The most significant bit being set in the version field indicates an
* experimental OpenFlow version.
*/
-#define OFP_VERSION 0x82
+#define OFP_VERSION 0x83
#define OFP_MAX_TABLE_NAME_LEN 32
#define OFP_MAX_PORT_NAME_LEN 16
struct ofp_header header;
struct ofp_match match; /* Description of fields */
+ uint16_t priority; /* Priority level of flow entry. */
+ uint8_t pad[2]; /* Align to 32-bits. */
+
uint32_t duration; /* Time flow was alive in seconds. */
uint64_t packet_count;
uint64_t byte_count;
ofp_print_match(string, &ofe->match);
ds_put_format(string,
- " secs%d pkts%lld bytes%lld\n", ntohl(ofe->duration),
- ntohll(ofe->packet_count), ntohll(ofe->byte_count));
+ " pri%d secs%d pkts%lld bytes%lld\n",
+ ofe->match.wildcards ? ntohs(ofe->priority) : (uint16_t)-1,
+ ntohl(ofe->duration), ntohll(ofe->packet_count),
+ ntohll(ofe->byte_count));
}
/* Pretty-print the OFPT_ERROR_MSG packet of 'len' bytes at 'oh' to 'string'
struct ofp_port_status *ops;
ops = alloc_openflow_buffer(p->dp, sizeof *ops, OFPT_PORT_STATUS, NULL,
&buffer);
- ops->reason = status;
+ ops->reason = status;
+ memset(ops->pad, 0, sizeof ops->pad);
fill_port_desc(p->dp, p, &ops->desc);
+
send_openflow_buffer(p->dp, buffer, NULL);
}
ofe = alloc_openflow_buffer(dp, sizeof *ofe, OFPT_FLOW_EXPIRED, NULL,
&buffer);
flow_fill_match(&ofe->match, &flow->key);
- ofe->duration = htonl(flow->timeout - flow->max_idle - flow->created);
- ofe->packet_count = htonll(flow->packet_count);
- ofe->byte_count = htonll(flow->byte_count);
+
+ memset(ofe->pad, 0, sizeof ofe->pad);
+ ofe->priority = htons(flow->priority);
+
+ ofe->duration = htonl(flow->timeout - flow->max_idle - flow->created);
+ ofe->packet_count = htonll(flow->packet_count);
+ ofe->byte_count = htonll(flow->byte_count);
send_openflow_buffer(dp, buffer, NULL);
}