[master] 361dba0c6 Update comment about VSL layout

Poul-Henning Kamp phk at FreeBSD.org
Mon Jan 23 13:50:07 UTC 2023


commit 361dba0c6e7206b9e8b2498f4e1a3cd0ab8beb4b
Author: Poul-Henning Kamp <phk at FreeBSD.org>
Date:   Mon Jan 23 13:49:25 2023 +0000

    Update comment about VSL layout

diff --git a/include/vapi/vsl_int.h b/include/vapi/vsl_int.h
index a40158e04..b3378d103 100644
--- a/include/vapi/vsl_int.h
+++ b/include/vapi/vsl_int.h
@@ -50,10 +50,20 @@
  * The log member points to an array of 32bit unsigned integers containing
  * log records.
  *
- * Each logrecord consist of:
- *	[n]		= ((type & 0xff) << 24) | (length & 0xffff)
- *	[n + 1]		= ((marker & 0x03) << 30) | (identifier & 0x3fffffff)
- *	[n + 2] ... [m]	= content (NUL-terminated)
+ * Each logrecord consist of four or more 32 bit words, stored in
+ * native endiansess:
+ *
+ *   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
+ *   |     TAG       |  unused   |ver|          length               |
+ *   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
+ *   |                   32 lower bits of VXID                       |
+ *   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
+ *   |B|C|    unused (zero)    |        19 upper bits of VXID        |
+ *   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
+ *   | content ... (NUL-terminated)                                  |
+ *   +-+-+                                                       +-+-+
+ *   | ...							     |
+ *   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
  *
  * Logrecords are NUL-terminated so that string functions can be run
  * directly on the shmlog data.


More information about the varnish-commit mailing list