When Open vSwitch sends (part of or all of) a packet to the controller, it
keeps a copy around for a while, so that if the controller wants to send
that packet it can refer to it by a buffer index instead of having to
send back the entire contents.  Until now, it has kept the packet around
for no more than 5 seconds, but a user reported that this is not long
enough in some conditions in the thread starting here:
    https://mailman.stanford.edu/pipermail/openflow-discuss/2011-May/002265.html

I am not certain that packet buffers are actually useful at all, so it
might be best to remove support for them.  This patch takes the more
conservative approach of just increasing the expiration time from 5 seconds
to 60 seconds.

Reported-by: Jose Luis Franco Arza <[email protected]>
---
 AUTHORS          |    1 +
 ofproto/pktbuf.c |    4 +++-
 2 files changed, 4 insertions(+), 1 deletions(-)

diff --git a/AUTHORS b/AUTHORS
index b7f6cf5..c4f092e 100644
--- a/AUTHORS
+++ b/AUTHORS
@@ -66,6 +66,7 @@ Jan Medved              [email protected]
 Jeongkeun Lee           [email protected]
 Joan Cirer              [email protected]
 John Galgay             [email protected]
+Jose Luis Franco Arza   [email protected]
 Koichi Yagishita        [email protected]
 Krishna Miriyala        [email protected]
 Luiz Henrique Ozaki     [email protected]
diff --git a/ofproto/pktbuf.c b/ofproto/pktbuf.c
index 02c590c..91f8887 100644
--- a/ofproto/pktbuf.c
+++ b/ofproto/pktbuf.c
@@ -45,7 +45,9 @@ COVERAGE_DEFINE(pktbuf_reuse_error);
 #define COOKIE_BITS     (32 - PKTBUF_BITS)
 #define COOKIE_MAX      ((1u << COOKIE_BITS) - 1)
 
-#define OVERWRITE_MSECS 5000
+/* Number of milliseconds before a buffered packet is considered to have
+ * "expired", which means that a new packet is allowed to overwrite it. */
+#define OVERWRITE_MSECS (60 * 1000)
 
 struct packet {
     struct ofpbuf *buffer;
-- 
1.7.4.4

_______________________________________________
dev mailing list
[email protected]
http://openvswitch.org/mailman/listinfo/dev

Reply via email to