* More extensible wire protocol
Many on-wire structures got TLVs.
- Already implemented: port desc properties, port mod properties,
- port stats properties, table mod properties,
- queue stats, unified property errors, queue desc.
- Remaining required: set-async
+ All required features are now supported.
Remaining optional: table desc, table-status
[EXT-262]
[required for OF1.4+]
}
} else if (raw == OFPRAW_OFPT14_SET_ASYNC ||
raw == OFPRAW_OFPT14_GET_ASYNC_REPLY) {
- struct ofputil_async_cfg ac = OFPUTIL_ASYNC_CFG_INIT;
+ struct ofputil_async_cfg basis = OFPUTIL_ASYNC_CFG_INIT;
+ struct ofputil_async_cfg ac;
+
bool is_reply = raw == OFPRAW_OFPT14_GET_ASYNC_REPLY;
- enum ofperr error = ofputil_decode_set_async_config(oh, is_reply, &ac);
+ enum ofperr error = ofputil_decode_set_async_config(oh, is_reply,
+ &basis, &ac);
if (error) {
ofp_print_error(string, error);
return;
/* Decodes the OpenFlow "set async config" request and "get async config
* reply" message in '*oh' into an abstract form in 'ac'.
*
+ * Some versions of the "set async config" request change only some of the
+ * settings and leave the others alone. This function uses 'basis' as the
+ * initial state for decoding these. Other versions of the request change all
+ * the settings; this function ignores 'basis' when decoding these.
+ *
* If 'loose' is true, this function ignores properties and values that it does
* not understand, as a controller would want to do when interpreting
* capabilities provided by a switch. If 'loose' is false, this function
* supported.*/
enum ofperr
ofputil_decode_set_async_config(const struct ofp_header *oh, bool loose,
+ const struct ofputil_async_cfg *basis,
struct ofputil_async_cfg *ac)
{
enum ofpraw raw;
raw == OFPRAW_OFPT13_GET_ASYNC_REPLY) {
const struct nx_async_config *msg = ofpmsg_body(oh);
+ *ac = OFPUTIL_ASYNC_CFG_INIT;
decode_legacy_async_masks(msg->packet_in_mask, OAM_PACKET_IN,
oh->version, ac);
decode_legacy_async_masks(msg->port_status_mask, OAM_PORT_STATUS,
oh->version, ac);
} else if (raw == OFPRAW_OFPT14_SET_ASYNC ||
raw == OFPRAW_OFPT14_GET_ASYNC_REPLY) {
+ *ac = *basis;
while (b.size > 0) {
struct ofpbuf property;
enum ofperr error;
enum ofperr ofputil_decode_set_async_config(const struct ofp_header *,
bool loose,
+ const struct ofputil_async_cfg *,
struct ofputil_async_cfg *);
struct ofpbuf *ofputil_encode_get_async_config(
static enum ofperr
handle_nxt_set_async_config(struct ofconn *ofconn, const struct ofp_header *oh)
{
- struct ofputil_async_cfg ac = OFPUTIL_ASYNC_CFG_INIT;
+ struct ofputil_async_cfg basis = ofconn_get_async_config(ofconn);
+ struct ofputil_async_cfg ac;
enum ofperr error;
- error = ofputil_decode_set_async_config(oh, false, &ac);
+ error = ofputil_decode_set_async_config(oh, false, &basis, &ac);
if (error) {
return error;
}