[ovs-dev] [generic tci mask 2/8] ofp-print: Avoid converting flow to ofp_match just to format it.
Ben Pfaff
blp at nicira.com
Wed Nov 10 23:37:57 UTC 2010
These days we have a function to format a struct flow directly, so we might
as well use it.
---
lib/ofp-print.c | 5 ++---
1 files changed, 2 insertions(+), 3 deletions(-)
diff --git a/lib/ofp-print.c b/lib/ofp-print.c
index bc77756..c48c5fd 100644
--- a/lib/ofp-print.c
+++ b/lib/ofp-print.c
@@ -132,12 +132,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) {
--
1.7.1
More information about the dev
mailing list