summaryrefslogtreecommitdiff
path: root/lib9p/include
diff options
context:
space:
mode:
Diffstat (limited to 'lib9p/include')
-rw-r--r--lib9p/include/lib9p/9p.generated.h47
1 files changed, 34 insertions, 13 deletions
diff --git a/lib9p/include/lib9p/9p.generated.h b/lib9p/include/lib9p/9p.generated.h
index e3f4d01..881d2e3 100644
--- a/lib9p/include/lib9p/9p.generated.h
+++ b/lib9p/include/lib9p/9p.generated.h
@@ -20,6 +20,13 @@
#ifndef CONFIG_9P_ENABLE_9P2000_e
#error config.h must define CONFIG_9P_ENABLE_9P2000_e
+#else
+ #if CONFIG_9P_ENABLE_9P2000_e
+ #ifndef(CONFIG_9P_MAX_9P2000_e_WELEM)
+ #error if CONFIG_9P_ENABLE_9P2000_e then config.h must define CONFIG_9P_MAX_9P2000_e_WELEM
+ #endif
+ static_assert(CONFIG_9P_MAX_9P2000_e_WELEM > 0);
+ #endif
#endif
#ifndef CONFIG_9P_ENABLE_9P2000_p9p
@@ -742,7 +749,7 @@ struct lib9p_msg_Tunlinkat {
#endif /* CONFIG_9P_ENABLE_9P2000_L */
#if CONFIG_9P_ENABLE_9P2000_e
-/* min_size = 13 ; exp_size = 477 ; max_size = 4,294,967,308 (warning: >UINT32_MAX) ; max_iov = 131,070 ; max_copy = 131,083 */
+/* min_size = 13 ; exp_size = 477 ; max_size = 4,294,967,308 (warning: >UINT32_MAX) ; max_iov = 0 + (CONFIG_9P_MAX_9P2000_e_WELEM * 2) ; max_copy = 13 + (CONFIG_9P_MAX_9P2000_e_WELEM * 2) */
struct lib9p_msg_Tsread {
lib9p_tag_t tag;
uint32_t fid;
@@ -750,7 +757,7 @@ struct lib9p_msg_Tsread {
struct lib9p_s *wname;
};
-/* min_size = 17 ; exp_size = 8,673 ; max_size = 8,589,934,607 (warning: >UINT32_MAX) ; max_iov = 131,072 ; max_copy = 131,087 */
+/* min_size = 17 ; exp_size = 8,673 ; max_size = 8,589,934,607 (warning: >UINT32_MAX) ; max_iov = 2 + (CONFIG_9P_MAX_9P2000_e_WELEM * 2) ; max_copy = 17 + (CONFIG_9P_MAX_9P2000_e_WELEM * 2) */
struct lib9p_msg_Tswrite {
lib9p_tag_t tag;
uint32_t fid;
@@ -1066,20 +1073,34 @@ struct lib9p_msg_Twstat {
/* sizes **********************************************************************/
-#if CONFIG_9P_ENABLE_9P2000_e
- #define LIB9P_TMSG_MAX_IOV 131072
-#elif CONFIG_9P_ENABLE_9P2000 || CONFIG_9P_ENABLE_9P2000_L || CONFIG_9P_ENABLE_9P2000_p9p || CONFIG_9P_ENABLE_9P2000_u
- #define LIB9P_TMSG_MAX_IOV 32
+#define _LIB9P_MAX(a, b) ((a) > (b)) ? (a) : (b)
+
+#if CONFIG_9P_ENABLE_9P2000 || CONFIG_9P_ENABLE_9P2000_L || CONFIG_9P_ENABLE_9P2000_e || CONFIG_9P_ENABLE_9P2000_p9p || CONFIG_9P_ENABLE_9P2000_u
+ #if CONFIG_9P_ENABLE_9P2000_e
+ #define LIB9P_TMSG_MAX_IOV _LIB9P_MAX(32, 2 + (CONFIG_9P_MAX_9P2000_e_WELEM * 2))
+ #else
+ #define LIB9P_TMSG_MAX_IOV 32
+ #endif
#endif
-#if CONFIG_9P_ENABLE_9P2000_e
- #define LIB9P_TMSG_MAX_COPY 131087
-#elif CONFIG_9P_ENABLE_9P2000_u
- #define LIB9P_TMSG_MAX_COPY 76
+#if CONFIG_9P_ENABLE_9P2000_u
+ #if CONFIG_9P_ENABLE_9P2000_e
+ #define LIB9P_TMSG_MAX_COPY _LIB9P_MAX(76, 17 + (CONFIG_9P_MAX_9P2000_e_WELEM * 2))
+ #else
+ #define LIB9P_TMSG_MAX_COPY 76
+ #endif
#elif CONFIG_9P_ENABLE_9P2000_L
- #define LIB9P_TMSG_MAX_COPY 67
-#elif CONFIG_9P_ENABLE_9P2000 || CONFIG_9P_ENABLE_9P2000_p9p
- #define LIB9P_TMSG_MAX_COPY 62
+ #if CONFIG_9P_ENABLE_9P2000_e
+ #define LIB9P_TMSG_MAX_COPY _LIB9P_MAX(67, 17 + (CONFIG_9P_MAX_9P2000_e_WELEM * 2))
+ #else
+ #define LIB9P_TMSG_MAX_COPY 67
+ #endif
+#elif CONFIG_9P_ENABLE_9P2000 || CONFIG_9P_ENABLE_9P2000_e || CONFIG_9P_ENABLE_9P2000_p9p
+ #if CONFIG_9P_ENABLE_9P2000_e
+ #define LIB9P_TMSG_MAX_COPY _LIB9P_MAX(62, 17 + (CONFIG_9P_MAX_9P2000_e_WELEM * 2))
+ #else
+ #define LIB9P_TMSG_MAX_COPY 62
+ #endif
#endif
#if CONFIG_9P_ENABLE_9P2000_u