[ovs-dev] [PATCH 14/32] ofproto: Handle monitor and delete commands in flow monitor requests
Simon Horman
horms at verge.net.au
Mon Jun 9 03:54:10 UTC 2014
Handle modify and delete commands in OpenFlow1.4 flow monitor requests.
These commands are not yet allowed by the decoder which
will be updated by a subsequent patch.
Signed-off-by: Simon Horman <horms at verge.net.au>
---
ofproto/ofproto.c | 19 +++++++++++++++----
1 file changed, 15 insertions(+), 4 deletions(-)
diff --git a/ofproto/ofproto.c b/ofproto/ofproto.c
index 4d4fad4..ff16e0e 100644
--- a/ofproto/ofproto.c
+++ b/ofproto/ofproto.c
@@ -4967,12 +4967,23 @@ handle_flow_monitor_request(struct ofconn *ofconn, const struct ofp_header *oh)
goto error;
}
- error = ofmonitor_create(&request, ofconn, &m);
- if (error) {
- goto error;
+ if (request.command == OFPFMC14_DELETE ||
+ request.command == OFPFMC14_MODIFY) {
+ error = flow_monitor_delete(ofconn, request.id);
+ if (error) {
+ goto error;
+ }
}
- list_insert(&monitor_list, &m->list_node);
+ if (request.command == OFPFMC14_ADD ||
+ request.command == OFPFMC14_MODIFY) {
+ error = ofmonitor_create(&request, ofconn, &m);
+ if (error) {
+ goto error;
+ }
+
+ list_insert(&monitor_list, &m->list_node);
+ }
}
rule_collection_init(&rules);
--
2.0.0.rc2
More information about the dev
mailing list