changeset 958:ca6e969be6ee

rvinterf suite: raise MAX_PKT_FROM_TARGET to 1600
author Mychaela Falconia <falcon@freecalypso.org>
date Thu, 08 Jun 2023 02:47:48 +0000
parents e030327b6a9a
children c340f432cf03
files rvinterf/include/limits.h rvinterf/include/localsock.h
diffstat 2 files changed, 14 insertions(+), 5 deletions(-) [+]
line wrap: on
line diff
--- a/rvinterf/include/limits.h	Thu Jun 08 00:40:12 2023 +0000
+++ b/rvinterf/include/limits.h	Thu Jun 08 02:47:48 2023 +0000
@@ -20,11 +20,19 @@
  * rvt_send_trace_no_cpy(), or some higher-level API that reduces to
  * these functions, with a message of any size, subject only to memory
  * limits, which obviously aren't as strict as a #define'd maximum
- * message size.  Hence in this direction we use our own arbitrary
- * choice of size limit.
+ * message size.
+ *
+ * With current FreeCalypso fw, unchanged from classic TCS211 in this
+ * aspect, the largest RVTMUX packets emitted by the fw are G23M PS
+ * primitives forwarded externally via GPF routing mechanism, and some
+ * of them exceed our previous arbitrary limit of 512 bytes.  However,
+ * the largest output packet size that can be generated via this
+ * mechanism equals the largest partition size in GPF partition pool
+ * configuration, and that largest size is 1600 bytes.  Hence we have
+ * our answer as to what maximum packet size we need to support.
  */
 
-#define	MAX_PKT_FROM_TARGET	512
+#define	MAX_PKT_FROM_TARGET	1600
 
 /*
  * Both limit definitions above counts all bytes between the opening and
--- a/rvinterf/include/localsock.h	Thu Jun 08 00:40:12 2023 +0000
+++ b/rvinterf/include/localsock.h	Thu Jun 08 02:47:48 2023 +0000
@@ -7,10 +7,11 @@
  * We use the same trick that is used for DNS over TCP: every message in each
  * direction is preceded by a 2-byte length.  This length is sent MSB first
  * just like in DNS over TCP.  The limit on the size of these messages
- * (for sizing buffers etc) is:
+ * (for sizing buffers etc) needs to be the larger of MAX_PKT_TO_TARGET and
+ * MAX_PKT_FROM_TARGET plus 1, and currently equals:
  */
 
-#define	LOCALSOCK_MAX_MSG	1024
+#define	LOCALSOCK_MAX_MSG	1601
 
 /*
  * Each message in the client->rvinterf direction (can be seen as command)