From: Ben Pfaff Date: Fri, 13 Jun 2008 17:20:12 +0000 (-0700) Subject: Allow priority to be specified in dpctl del-flows command. X-Git-Url: https://pintos-os.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=24ff8279e78fea5756fcca93bb2a41bd9f2db9fb;p=openvswitch Allow priority to be specified in dpctl del-flows command. --- diff --git a/utilities/dpctl.c b/utilities/dpctl.c index f0c34be0..c0f40587 100644 --- a/utilities/dpctl.c +++ b/utilities/dpctl.c @@ -701,6 +701,7 @@ static void do_add_flows(int argc, char *argv[]) static void do_del_flows(int argc, char *argv[]) { struct vconn *vconn; + uint16_t priority; run(vconn_open_block(argv[1], &vconn), "connecting to %s", argv[1]); struct buffer *buffer; @@ -711,12 +712,12 @@ static void do_del_flows(int argc, char *argv[]) /* Parse and send. */ size = sizeof *ofm; ofm = alloc_openflow_buffer(size, OFPT_FLOW_MOD, &buffer); + str_to_flow(argc > 2 ? argv[2] : "", &ofm->match, NULL, NULL, &priority); ofm->command = htons(OFPFC_DELETE); ofm->max_idle = htons(0); ofm->buffer_id = htonl(UINT32_MAX); - ofm->priority = htons(0); + ofm->priority = htons(priority); ofm->reserved = htonl(0); - str_to_flow(argc > 2 ? argv[2] : "", &ofm->match, NULL, NULL, NULL); send_openflow_buffer(vconn, buffer);