projects
/
openvswitch
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
ChangeLog: Rename NEWS.
[openvswitch]
/
lib
/
ofp-util.c
diff --git
a/lib/ofp-util.c
b/lib/ofp-util.c
index 00f9ce8bf124db73e5934522b9328a1880d0ad6a..df3377ae90e9315310d6934f0354a0189e1ed34e 100644
(file)
--- a/
lib/ofp-util.c
+++ b/
lib/ofp-util.c
@@
-21,6
+21,7
@@
#include <netinet/icmp6.h>
#include <stdlib.h>
#include "autopath.h"
#include <netinet/icmp6.h>
#include <stdlib.h>
#include "autopath.h"
+#include "bundle.h"
#include "byte-order.h"
#include "classifier.h"
#include "dynamic-string.h"
#include "byte-order.h"
#include "classifier.h"
#include "dynamic-string.h"
@@
-1944,8
+1945,8
@@
make_echo_reply(const struct ofp_header *rq)
/* Checks that 'port' is a valid output port for the OFPAT_OUTPUT action, given
* that the switch will never have more than 'max_ports' ports. Returns 0 if
* 'port' is valid, otherwise an ofp_mkerr() return code. */
/* Checks that 'port' is a valid output port for the OFPAT_OUTPUT action, given
* that the switch will never have more than 'max_ports' ports. Returns 0 if
* 'port' is valid, otherwise an ofp_mkerr() return code. */
-
static
int
-check_output_port(uint16_t port, int max_ports)
+int
+
ofputil_
check_output_port(uint16_t port, int max_ports)
{
switch (port) {
case OFPP_IN_PORT:
{
switch (port) {
case OFPP_IN_PORT:
@@
-1994,7
+1995,8
@@
validate_actions(const union ofp_action *actions, size_t n_actions,
error = 0;
switch ((enum ofputil_action_code) code) {
case OFPUTIL_OFPAT_OUTPUT:
error = 0;
switch ((enum ofputil_action_code) code) {
case OFPUTIL_OFPAT_OUTPUT:
- error = check_output_port(ntohs(a->output.port), max_ports);
+ error = ofputil_check_output_port(ntohs(a->output.port),
+ max_ports);
break;
case OFPUTIL_OFPAT_SET_VLAN_VID:
break;
case OFPUTIL_OFPAT_SET_VLAN_VID:
@@
-2027,11
+2029,19
@@
validate_actions(const union ofp_action *actions, size_t n_actions,
break;
case OFPUTIL_NXAST_MULTIPATH:
break;
case OFPUTIL_NXAST_MULTIPATH:
- error = multipath_check((const struct nx_action_multipath *) a);
+ error = multipath_check((const struct nx_action_multipath *) a,
+ flow);
break;
case OFPUTIL_NXAST_AUTOPATH:
break;
case OFPUTIL_NXAST_AUTOPATH:
- error = autopath_check((const struct nx_action_autopath *) a);
+ error = autopath_check((const struct nx_action_autopath *) a,
+ flow);
+ break;
+
+ case OFPUTIL_NXAST_BUNDLE:
+ case OFPUTIL_NXAST_BUNDLE_LOAD:
+ error = bundle_check((const struct nx_action_bundle *) a,
+ max_ports, flow);
break;
case OFPUTIL_OFPAT_STRIP_VLAN:
break;
case OFPUTIL_OFPAT_STRIP_VLAN:
@@
-2106,6
+2116,8
@@
static const struct ofputil_nxast_action nxast_actions[] = {
{ OFPUTIL_NXAST_SET_TUNNEL64, 24, 24 },
{ OFPUTIL_NXAST_MULTIPATH, 32, 32 },
{ OFPUTIL_NXAST_AUTOPATH, 24, 24 },
{ OFPUTIL_NXAST_SET_TUNNEL64, 24, 24 },
{ OFPUTIL_NXAST_MULTIPATH, 32, 32 },
{ OFPUTIL_NXAST_AUTOPATH, 24, 24 },
+ { OFPUTIL_NXAST_BUNDLE, 32, UINT_MAX },
+ { OFPUTIL_NXAST_BUNDLE_LOAD, 32, UINT_MAX },
};
static int
};
static int