[ovs-dev] [PATCH 10/12] ofp-print: Do not display flow mod cookie if it is UINT64_MAX

Simon Horman horms at verge.net.au
Mon Sep 17 00:26:57 UTC 2012


Internally UINT64_MAX is used to denote that the cookie
should not be changed, so it seems appropriate
to omit this value when pretty printing flow mods.

Signed-off-by: Simon Horman <horms at verge.net.au>

---

v13
* No change

v12
* No change

v11
* Initial post
---
 lib/ofp-print.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/lib/ofp-print.c b/lib/ofp-print.c
index 8166ab1..ce07b15 100644
--- a/lib/ofp-print.c
+++ b/lib/ofp-print.c
@@ -743,7 +743,7 @@ ofp_print_flow_mod(struct ds *s, const struct ofp_header *oh, int verbosity)
     if (ds_last(s) != ' ') {
         ds_put_char(s, ' ');
     }
-    if (fm.new_cookie != htonll(0)) {
+    if (fm.new_cookie != htonll(0) && fm.new_cookie != htonll(UINT64_MAX)) {
         ds_put_format(s, "cookie:0x%"PRIx64" ", ntohll(fm.new_cookie));
     }
     if (fm.cookie_mask != htonll(0)) {
-- 
1.7.10.4




More information about the dev mailing list