From: Ben Pfaff Date: Tue, 9 Nov 2010 00:36:44 +0000 (-0800) Subject: ofp-print: Avoid converting flow to ofp_match just to format it. X-Git-Tag: v1.1.0~826 X-Git-Url: http://git.onelab.eu/?a=commitdiff_plain;h=8321fb9c570bd25bb8925e7b5116ab90662113b5;p=sliver-openvswitch.git ofp-print: Avoid converting flow to ofp_match just to format it. These days we have a function to format a struct flow directly, so we might as well use it. --- diff --git a/lib/ofp-print.c b/lib/ofp-print.c index 507ed7db3..f6560747e 100644 --- a/lib/ofp-print.c +++ b/lib/ofp-print.c @@ -133,12 +133,11 @@ ofp_packet_in(struct ds *string, const void *oh, size_t len, int verbosity) if (verbosity > 0) { struct flow flow; struct ofpbuf packet; - struct ofp_match match; + packet.data = (void *) op->data; packet.size = data_len; flow_extract(&packet, 0, ntohs(op->in_port), &flow); - flow_to_match(&flow, 0, false, &match); - ofp_print_match(string, &match, verbosity); + flow_format(string, &flow); ds_put_char(string, '\n'); } if (verbosity > 1) {