Add a few 'const's.
authorBen Pfaff <blp@nicira.com>
Tue, 31 Jan 2012 20:56:49 +0000 (12:56 -0800)
committerBen Pfaff <blp@nicira.com>
Wed, 1 Feb 2012 18:16:28 +0000 (10:16 -0800)
These are useful hints, in these cases, that the caller retains ownership
of the passed-in packets.

Signed-off-by: Ben Pfaff <blp@nicira.com>
lib/dpif.c
lib/dpif.h
ofproto/ofproto-dpif.c

index 37c0012..56bb1ad 100644 (file)
@@ -675,7 +675,7 @@ dpif_port_poll_wait(const struct dpif *dpif)
  * arguments must have been initialized through a call to flow_extract().
  */
 void
-dpif_flow_stats_extract(const struct flow *flow, struct ofpbuf *packet,
+dpif_flow_stats_extract(const struct flow *flow, const struct ofpbuf *packet,
                         struct dpif_flow_stats *stats)
 {
     memset(stats, 0, sizeof(*stats));
index 3fd33f0..1a6ca05 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2008, 2009, 2010, 2011 Nicira Networks.
+ * Copyright (c) 2008, 2009, 2010, 2011, 2012 Nicira Networks.
  *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
@@ -128,7 +128,7 @@ struct dpif_flow_stats {
     uint8_t tcp_flags;
 };
 
-void dpif_flow_stats_extract(const struct flow *, struct ofpbuf *packet,
+void dpif_flow_stats_extract(const struct flow *, const struct ofpbuf *packet,
                              struct dpif_flow_stats *);
 void dpif_flow_stats_format(const struct dpif_flow_stats *, struct ds *);
 
index 51d3f3f..53d3c9f 100644 (file)
@@ -2424,7 +2424,7 @@ struct flow_miss_op {
  * OpenFlow controller as necessary according to their individual
  * configurations. */
 static void
-send_packet_in_miss(struct ofproto_dpif *ofproto, struct ofpbuf *packet,
+send_packet_in_miss(struct ofproto_dpif *ofproto, const struct ofpbuf *packet,
                     const struct flow *flow)
 {
     struct ofputil_packet_in pin;