-/* Copyright (c) 2011, 2012, 2013, 2014 Nicira, Inc.
+/* Copyright (c) 2011, 2012, 2013, 2014, 2015 Nicira, Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
#include "ofp-errors.h"
#include "ofp-util.h"
#include "openflow/nicira-ext.h"
-#include "vlog.h"
+#include "openvswitch/vlog.h"
VLOG_DEFINE_THIS_MODULE(bundle);
for (i = 0; i < bundle->n_slaves; i++) {
ofp_port_t ofp_port = bundle->slaves[i];
- enum ofperr error;
- error = ofpact_check_output_port(ofp_port, max_ports);
- if (error) {
- VLOG_WARN_RL(&rl, "invalid slave %"PRIu16, ofp_port);
- return error;
+ if (ofp_port != OFPP_NONE) {
+ enum ofperr error = ofpact_check_output_port(ofp_port, max_ports);
+ if (error) {
+ VLOG_WARN_RL(&rl, "invalid slave %"PRIu16, ofp_port);
+ return error;
+ }
}
-
/* Controller slaves are unsupported due to the lack of a max_len
* argument. This may or may not change in the future. There doesn't
* seem to be a real-world use-case for supporting it. */
*
* Returns NULL if successful, otherwise a malloc()'d string describing the
* error. The caller is responsible for freeing the returned string.*/
-static char * WARN_UNUSED_RESULT
+static char * OVS_WARN_UNUSED_RESULT
bundle_parse__(const char *s, char **save_ptr,
const char *fields, const char *basis, const char *algorithm,
const char *slave_type, const char *dst,
}
ofpbuf_put(ofpacts, &slave_port, sizeof slave_port);
- bundle = ofpacts->frame;
+ bundle = ofpacts->header;
bundle->n_slaves++;
}
- ofpact_update_len(ofpacts, &bundle->ofpact);
+ ofpact_finish(ofpacts, &bundle->ofpact);
bundle->basis = atoi(basis);
bundle->fields = NX_HASH_FIELDS_ETH_SRC;
} else if (!strcasecmp(fields, "symmetric_l4")) {
bundle->fields = NX_HASH_FIELDS_SYMMETRIC_L4;
+ } else if (!strcasecmp(fields, "symmetric_l3l4")) {
+ bundle->fields = NX_HASH_FIELDS_SYMMETRIC_L3L4;
+ } else if (!strcasecmp(fields, "symmetric_l3l4+udp")) {
+ bundle->fields = NX_HASH_FIELDS_SYMMETRIC_L3L4_UDP;
} else {
return xasprintf("%s: unknown fields `%s'", s, fields);
}
*
* Returns NULL if successful, otherwise a malloc()'d string describing the
* error. The caller is responsible for freeing the returned string. */
-char * WARN_UNUSED_RESULT
+char * OVS_WARN_UNUSED_RESULT
bundle_parse(const char *s, struct ofpbuf *ofpacts)
{
char *fields, *basis, *algorithm, *slave_type, *slave_delim;
*
* Returns NULL if successful, otherwise a malloc()'d string describing the
* error. The caller is responsible for freeing the returned string.*/
-char * WARN_UNUSED_RESULT
+char * OVS_WARN_UNUSED_RESULT
bundle_parse_load(const char *s, struct ofpbuf *ofpacts)
{
char *fields, *basis, *algorithm, *slave_type, *dst, *slave_delim;