[MINOR] add the splice_len member to the buffer struct in preparation of splice support
In preparation of splice support, let's add the splice_len member
to the buffer struct. An earlier implementation made it conditional,
which made the whole logics very complex due to a large number of
ifdefs.
Now BF_EMPTY is only set once both buf->l and buf->splice_len are
null. Splice_len is initialized to zero during buffer creation and
is currently not changed, so the whole logics remains unaffected.
When splice gets merged, splice_len will reflect the number of bytes
in flight out of the buffer but not yet sent, typically in a pipe for
the Linux case.
diff --git a/include/proto/buffers.h b/include/proto/buffers.h
index ab0de11..edb3973 100644
--- a/include/proto/buffers.h
+++ b/include/proto/buffers.h
@@ -48,6 +48,7 @@
buf->send_max = 0;
buf->to_forward = 0;
buf->l = buf->total = 0;
+ buf->splice_len = 0;
buf->analysers = 0;
buf->cons = NULL;
buf->flags = BF_EMPTY;