[ovs-dev] [PATCH] netflow: Use macro for constant instead of static const int.

Ben Pfaff blp at nicira.com
Wed May 19 17:04:52 UTC 2010


It's just bizarre to put a static const int in a header file, at least in
C.
---
 ofproto/netflow.h |    7 ++++++-
 1 files changed, 6 insertions(+), 1 deletions(-)

diff --git a/ofproto/netflow.h b/ofproto/netflow.h
index 701ffd4..f3099a1 100644
--- a/ofproto/netflow.h
+++ b/ofproto/netflow.h
@@ -21,7 +21,12 @@
 #include "flow.h"
 #include "svec.h"
 
-static const int NF_ACTIVE_TIMEOUT_DEFAULT = 600;
+/* Default active timeout interval, in seconds.
+ *
+ * (The active timeout interval is the interval at which NetFlow records are
+ * sent for flows that do not expire, so that such flows are still
+ * accounted.) */
+#define NF_ACTIVE_TIMEOUT_DEFAULT 600
 
 struct ofexpired;
 
-- 
1.7.1





More information about the dev mailing list