diff options
-rwxr-xr-x | lib9p/idl.gen | 200 | ||||
-rw-r--r-- | lib9p/include/lib9p/9p.generated.h | 248 |
2 files changed, 332 insertions, 116 deletions
diff --git a/lib9p/idl.gen b/lib9p/idl.gen index adb15ce..ead9bc5 100755 --- a/lib9p/idl.gen +++ b/lib9p/idl.gen @@ -5,6 +5,7 @@ # Copyright (C) 2024-2025 Luke T. Shumaker <lukeshu@lukeshu.com> # SPDX-License-Identifier: AGPL-3.0-or-later +import enum import graphlib import os.path import sys @@ -145,6 +146,9 @@ def ifdef_pop(n: int) -> str: return ret +# topo_sorted() ################################################################ + + def topo_sorted(typs: list[idl.Type]) -> typing.Iterable[idl.Type]: ts: graphlib.TopologicalSorter[idl.Type] = graphlib.TopologicalSorter() for typ in typs: @@ -163,6 +167,142 @@ def topo_sorted(typs: list[idl.Type]) -> typing.Iterable[idl.Type]: return ts.static_order() +# walk() ####################################################################### + + +class Path: + root: idl.Type + elems: list[idl.StructMember] + + def __init__( + self, root: idl.Type, elems: list[idl.StructMember] | None = None + ) -> None: + self.root = root + self.elems = elems if elems is not None else [] + + def add(self, elem: idl.StructMember) -> "Path": + return Path(self.root, self.elems + [elem]) + + +class WalkCmd(enum.Enum): + KEEP_GOING = 1 + DONT_RECURSE = 2 + ABORT = 3 + + +def _walk(path: Path, handle: typing.Callable[[Path], WalkCmd]) -> WalkCmd: + typ = path.elems[-1].typ if path.elems else path.root + + ret = handle(path) + + if isinstance(typ, idl.Struct): + match ret: + case WalkCmd.KEEP_GOING: + for member in typ.members: + if _walk(path.add(member), handle) == WalkCmd.ABORT: + ret = WalkCmd.ABORT + break + case WalkCmd.DONT_RECURSE: + ret = WalkCmd.KEEP_GOING + case WalkCmd.ABORT: + ret = WalkCmd.ABORT + case _: + assert False, f"invalid cmd: {ret}" + + return ret + + +def walk(typ: idl.Type, handle: typing.Callable[[Path], WalkCmd]) -> None: + _walk(Path(typ), handle) + + +# get_buffer_size() ############################################################ + + +class BufferSize: + min_size: int # really just here to sanity-check against typ.min_size(version) + exp_size: int # "expected" or max-reasonable size + max_size: int # really just here to sanity-check against typ.max_size(version) + max_copy: int + max_iov: int + _starts_with_copy: bool + _ends_with_copy: bool + + def __init__(self) -> None: + self.min_size = 0 + self.exp_size = 0 + self.max_size = 0 + self.max_copy = 0 + self.max_iov = 0 + self._starts_with_copy = False + self._ends_with_copy = False + + +def get_buffer_size(typ: idl.Type, version: str) -> BufferSize: + assert isinstance(typ, idl.Primitive) or (version in typ.in_versions) + + ret = BufferSize() + + if not isinstance(typ, idl.Struct): + assert typ.static_size + ret.min_size = typ.static_size + ret.exp_size = typ.static_size + ret.max_size = typ.static_size + ret.max_copy = typ.static_size + ret.max_iov = 1 + ret._starts_with_copy = True + ret._ends_with_copy = True + return ret + + def handle(path: Path) -> WalkCmd: + nonlocal ret + if path.elems: + child = path.elems[-1] + if version not in child.in_versions: + return WalkCmd.DONT_RECURSE + if child.cnt: + if child.typ.static_size == 1: # SPECIAL (zerocopy) + ret.max_iov += 1 + # HEURISTIC: 27 for strings (max-strlen from 9P1), 8KiB for other data + ret.exp_size += 27 if child.name == "utf8" else 8192 + ret.max_size += child.max_cnt + ret._ends_with_copy = False + return WalkCmd.DONT_RECURSE + sub = get_buffer_size(child.typ, version) + ret.exp_size += sub.exp_size * 16 # HEURISTIC: MAXWELEM + ret.max_size += sub.max_size * child.max_cnt + ret.max_copy += sub.max_copy * child.max_cnt + if sub.max_iov == 1 and sub._starts_with_copy: # is purely copy + ret.max_iov += 1 + else: # contains zero-copy segments + ret.max_iov += sub.max_iov * child.max_cnt + if ret._ends_with_copy and sub._starts_with_copy: + # we can merge this one + ret.max_iov -= 1 + if sub._ends_with_copy and sub._starts_with_copy and sub.max_iov > 1: + # we can merge these + ret.max_iov -= child.max_cnt - 1 + ret._ends_with_copy = sub._ends_with_copy + return WalkCmd.DONT_RECURSE + elif not isinstance(child.typ, idl.Struct): + assert child.typ.static_size + if not ret._ends_with_copy: + if ret.max_size == 0: + ret._starts_with_copy = True + ret.max_iov += 1 + ret._ends_with_copy = True + ret.min_size += child.typ.static_size + ret.exp_size += child.typ.static_size + ret.max_size += child.typ.static_size + ret.max_copy += child.typ.static_size + return WalkCmd.KEEP_GOING + + walk(typ, handle) + assert ret.min_size == typ.min_size(version) + assert ret.max_size == typ.max_size(version) + return ret + + # Generate .h ################################################################## @@ -251,16 +391,20 @@ enum {idprefix}version {{ ret += ifdef_push(1, c_ver_ifdef(typ.in_versions)) def sum_size(typ: idl.Type, version: str) -> str: - min_size = typ.min_size(version) - max_size = typ.max_size(version) - assert min_size <= max_size and max_size < u64max + sz = get_buffer_size(typ, version) + assert ( + sz.min_size <= sz.exp_size + and sz.exp_size <= sz.max_size + and sz.max_size < u64max + ) ret = "" - if min_size == max_size: - ret += f"size = {min_size:,}" + if sz.min_size == sz.max_size: + ret += f"size = {sz.min_size:,}" else: - ret += f"min_size = {min_size:,} ; max_size = {max_size:,}" - if max_size > u32max: + ret += f"min_size = {sz.min_size:,} ; exp_size = {sz.exp_size:,} ; max_size = {sz.max_size:,}" + if sz.max_size > u32max: ret += " (warning: >UINT32_MAX)" + ret += f" ; max_iov = {sz.max_iov:,} ; max_copy = {sz.max_copy:,}" return ret ret += per_version_comment(typ, sum_size) @@ -331,6 +475,48 @@ enum {idprefix}version {{ ret += "};\n" ret += ifdef_pop(0) + ret += """ +/* sizes **********************************************************************/ +""" + tmsg_max_iov: dict[str, int] = {} + tmsg_max_copy: dict[str, int] = {} + rmsg_max_iov: dict[str, int] = {} + rmsg_max_copy: dict[str, int] = {} + for typ in typs: + if not isinstance(typ, idl.Message): + continue + max_iov = tmsg_max_iov if typ.msgid % 2 == 0 else rmsg_max_iov + max_copy = tmsg_max_copy if typ.msgid % 2 == 0 else rmsg_max_copy + for version in typ.in_versions: + if version not in max_iov: + max_iov[version] = 0 + max_copy[version] = 0 + sz = get_buffer_size(typ, version) + if sz.max_iov > max_iov[version]: + max_iov[version] = sz.max_iov + if sz.max_copy > max_copy[version]: + max_copy[version] = sz.max_copy + + for name, table in [ + ("tmsg_max_iov", tmsg_max_iov), + ("tmsg_max_copy", tmsg_max_copy), + ("rmsg_max_iov", rmsg_max_iov), + ("rmsg_max_copy", rmsg_max_copy), + ]: + inv: dict[int, set[str]] = {} + for version, maxval in table.items(): + if maxval not in inv: + inv[maxval] = set() + inv[maxval].add(version) + + ret += "\n" + directive = "if" + for maxval in sorted(inv, reverse=True): + ret += f"#{directive} {c_ver_ifdef(inv[maxval])}\n" + ret += f"\t#define {idprefix.upper()}{name.upper()} {maxval}\n" + directive = "elif" + ret += "#endif\n" + return ret diff --git a/lib9p/include/lib9p/9p.generated.h b/lib9p/include/lib9p/9p.generated.h index a5b719e..e3f4d01 100644 --- a/lib9p/include/lib9p/9p.generated.h +++ b/lib9p/include/lib9p/9p.generated.h @@ -148,15 +148,15 @@ enum lib9p_msg_type { /* uint8_t */ /* payload types **************************************************************/ #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 -/* size = 2 */ +/* size = 2 ; max_iov = 1 ; max_copy = 2 */ typedef uint16_t lib9p_tag_t; #define LIB9P_TAG_NOTAG ((lib9p_tag_t)UINT16_C(~0)) -/* size = 4 */ +/* size = 4 ; max_iov = 1 ; max_copy = 4 */ typedef uint32_t lib9p_fid_t; #define LIB9P_FID_NOFID ((lib9p_fid_t)UINT32_C(~0)) -/* min_size = 2 ; max_size = 65,537 */ +/* min_size = 2 ; exp_size = 29 ; max_size = 65,537 ; max_iov = 2 ; max_copy = 2 */ struct lib9p_s { uint16_t len; [[gnu::nonstring]] char *utf8; @@ -164,7 +164,7 @@ struct lib9p_s { #endif /* 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 || CONFIG_9P_ENABLE_9P2000_e || CONFIG_9P_ENABLE_9P2000_p9p || CONFIG_9P_ENABLE_9P2000_u -/* size = 4 */ +/* size = 4 ; max_iov = 1 ; max_copy = 4 */ typedef uint32_t lib9p_dm_t; #define LIB9P_DM_DIR ((lib9p_dm_t)(1<<31)) @@ -208,7 +208,7 @@ typedef uint32_t lib9p_dm_t; #endif /* CONFIG_9P_ENABLE_9P2000 || CONFIG_9P_ENABLE_9P2000_e || CONFIG_9P_ENABLE_9P2000_p9p || CONFIG_9P_ENABLE_9P2000_u */ #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 -/* size = 1 */ +/* size = 1 ; max_iov = 1 ; max_copy = 1 */ typedef uint8_t lib9p_qt_t; #define LIB9P_QT_DIR ((lib9p_qt_t)(1<<7)) @@ -226,13 +226,13 @@ typedef uint8_t lib9p_qt_t; #endif /* 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_L || CONFIG_9P_ENABLE_9P2000_u -/* size = 4 */ +/* size = 4 ; max_iov = 1 ; max_copy = 4 */ typedef uint32_t lib9p_nuid_t; #define LIB9P_NUID_NONUID ((lib9p_nuid_t)UINT32_C(~0)) #endif /* CONFIG_9P_ENABLE_9P2000_L || CONFIG_9P_ENABLE_9P2000_u */ #if CONFIG_9P_ENABLE_9P2000 || CONFIG_9P_ENABLE_9P2000_e || CONFIG_9P_ENABLE_9P2000_p9p || CONFIG_9P_ENABLE_9P2000_u -/* size = 1 */ +/* size = 1 ; max_iov = 1 ; max_copy = 1 */ typedef uint8_t lib9p_o_t; /* unused ((lib9p_o_t)(1<<7)) */ @@ -253,7 +253,7 @@ typedef uint8_t lib9p_o_t; #endif /* CONFIG_9P_ENABLE_9P2000 || CONFIG_9P_ENABLE_9P2000_e || CONFIG_9P_ENABLE_9P2000_p9p || CONFIG_9P_ENABLE_9P2000_u */ #if CONFIG_9P_ENABLE_9P2000_L -/* size = 8 */ +/* size = 8 ; max_iov = 1 ; max_copy = 8 */ typedef uint64_t lib9p_getattr_t; /* unused ((lib9p_getattr_t)(1<<63)) */ @@ -324,7 +324,7 @@ typedef uint64_t lib9p_getattr_t; #define LIB9P_GETATTR_BASIC ((lib9p_getattr_t)(0x000007ff)) #define LIB9P_GETATTR_ALL ((lib9p_getattr_t)(0x00003fff)) -/* size = 4 */ +/* size = 4 ; max_iov = 1 ; max_copy = 4 */ typedef uint32_t lib9p_setattr_t; /* unused ((lib9p_setattr_t)(1<<31)) */ @@ -360,13 +360,13 @@ typedef uint32_t lib9p_setattr_t; #define LIB9P_SETATTR_UID ((lib9p_setattr_t)(1<<1)) #define LIB9P_SETATTR_MODE ((lib9p_setattr_t)(1<<0)) -/* size = 1 */ +/* size = 1 ; max_iov = 1 ; max_copy = 1 */ typedef uint8_t lib9p_lock_type_t; #define LIB9P_LOCK_TYPE_RDLCK ((lib9p_lock_type_t)UINT8_C(0)) #define LIB9P_LOCK_TYPE_WRLCK ((lib9p_lock_type_t)UINT8_C(1)) #define LIB9P_LOCK_TYPE_UNLCK ((lib9p_lock_type_t)UINT8_C(2)) -/* size = 4 */ +/* size = 4 ; max_iov = 1 ; max_copy = 4 */ typedef uint32_t lib9p_lock_flags_t; /* unused ((lib9p_lock_flags_t)(1<<31)) */ @@ -402,7 +402,7 @@ typedef uint32_t lib9p_lock_flags_t; #define LIB9P_LOCK_FLAGS_RECLAIM ((lib9p_lock_flags_t)(1<<1)) #define LIB9P_LOCK_FLAGS_BLOCK ((lib9p_lock_flags_t)(1<<0)) -/* size = 1 */ +/* size = 1 ; max_iov = 1 ; max_copy = 1 */ typedef uint8_t lib9p_lock_status_t; #define LIB9P_LOCK_STATUS_SUCCESS ((lib9p_lock_status_t)UINT8_C(0)) #define LIB9P_LOCK_STATUS_BLOCKED ((lib9p_lock_status_t)UINT8_C(1)) @@ -411,56 +411,56 @@ typedef uint8_t lib9p_lock_status_t; #endif /* CONFIG_9P_ENABLE_9P2000_L */ #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 -/* size = 9 */ +/* size = 9 ; max_iov = 1 ; max_copy = 9 */ struct lib9p_msg_Tflush { lib9p_tag_t tag; uint16_t oldtag; }; -/* size = 7 */ +/* size = 7 ; max_iov = 1 ; max_copy = 7 */ struct lib9p_msg_Rflush { lib9p_tag_t tag; }; -/* min_size = 11 ; max_size = 2,147,483,658 */ +/* min_size = 11 ; exp_size = 8,203 ; max_size = 2,147,483,658 ; max_iov = 2 ; max_copy = 11 */ struct lib9p_msg_Rread { lib9p_tag_t tag; uint32_t count; [[gnu::nonstring]] char *data; }; -/* size = 11 */ +/* size = 11 ; max_iov = 1 ; max_copy = 11 */ struct lib9p_msg_Rwrite { lib9p_tag_t tag; uint32_t count; }; -/* size = 7 */ +/* size = 7 ; max_iov = 1 ; max_copy = 7 */ struct lib9p_msg_Rclunk { lib9p_tag_t tag; }; -/* size = 7 */ +/* size = 7 ; max_iov = 1 ; max_copy = 7 */ struct lib9p_msg_Rremove { lib9p_tag_t tag; }; #endif /* 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 || CONFIG_9P_ENABLE_9P2000_e || CONFIG_9P_ENABLE_9P2000_p9p || CONFIG_9P_ENABLE_9P2000_u -/* size = 7 */ +/* size = 7 ; max_iov = 1 ; max_copy = 7 */ struct lib9p_msg_Rwstat { lib9p_tag_t tag; }; #endif /* CONFIG_9P_ENABLE_9P2000 || CONFIG_9P_ENABLE_9P2000_e || CONFIG_9P_ENABLE_9P2000_p9p || CONFIG_9P_ENABLE_9P2000_u */ #if CONFIG_9P_ENABLE_9P2000_L -/* size = 11 */ +/* size = 11 ; max_iov = 1 ; max_copy = 11 */ struct lib9p_msg_Rlerror { lib9p_tag_t tag; uint32_t ecode; }; -/* size = 67 */ +/* size = 67 ; max_iov = 1 ; max_copy = 67 */ struct lib9p_msg_Rstatfs { lib9p_tag_t tag; uint32_t type; @@ -474,75 +474,75 @@ struct lib9p_msg_Rstatfs { uint32_t namelen; }; -/* size = 7 */ +/* size = 7 ; max_iov = 1 ; max_copy = 7 */ struct lib9p_msg_Rrename { lib9p_tag_t tag; }; -/* size = 7 */ +/* size = 7 ; max_iov = 1 ; max_copy = 7 */ struct lib9p_msg_Rsetattr { lib9p_tag_t tag; }; -/* size = 15 */ +/* size = 15 ; max_iov = 1 ; max_copy = 15 */ struct lib9p_msg_Rxattrwalk { lib9p_tag_t tag; uint64_t attr_size; }; -/* size = 7 */ +/* size = 7 ; max_iov = 1 ; max_copy = 7 */ struct lib9p_msg_Rxattrcreate { lib9p_tag_t tag; }; -/* min_size = 11 ; max_size = 4,294,967,306 (warning: >UINT32_MAX) */ +/* min_size = 11 ; exp_size = 8,203 ; max_size = 4,294,967,306 (warning: >UINT32_MAX) ; max_iov = 2 ; max_copy = 11 */ struct lib9p_msg_Rreaddir { lib9p_tag_t tag; uint32_t count; [[gnu::nonstring]] char *data; }; -/* size = 7 */ +/* size = 7 ; max_iov = 1 ; max_copy = 7 */ struct lib9p_msg_Rfsync { lib9p_tag_t tag; }; -/* size = 7 */ +/* size = 7 ; max_iov = 1 ; max_copy = 7 */ struct lib9p_msg_Rlink { lib9p_tag_t tag; }; -/* size = 7 */ +/* size = 7 ; max_iov = 1 ; max_copy = 7 */ struct lib9p_msg_Rrenameat { lib9p_tag_t tag; }; -/* size = 7 */ +/* size = 7 ; max_iov = 1 ; max_copy = 7 */ struct lib9p_msg_Runlinkat { lib9p_tag_t tag; }; #endif /* CONFIG_9P_ENABLE_9P2000_L */ #if CONFIG_9P_ENABLE_9P2000_e -/* size = 15 */ +/* size = 15 ; max_iov = 1 ; max_copy = 15 */ struct lib9p_msg_Tsession { lib9p_tag_t tag; uint64_t key; }; -/* size = 7 */ +/* size = 7 ; max_iov = 1 ; max_copy = 7 */ struct lib9p_msg_Rsession { lib9p_tag_t tag; }; -/* min_size = 11 ; max_size = 4,294,967,306 (warning: >UINT32_MAX) */ +/* min_size = 11 ; exp_size = 8,203 ; max_size = 4,294,967,306 (warning: >UINT32_MAX) ; max_iov = 2 ; max_copy = 11 */ struct lib9p_msg_Rsread { lib9p_tag_t tag; uint32_t count; [[gnu::nonstring]] char *data; }; -/* size = 11 */ +/* size = 11 ; max_iov = 1 ; max_copy = 11 */ struct lib9p_msg_Rswrite { lib9p_tag_t tag; uint32_t count; @@ -550,7 +550,7 @@ struct lib9p_msg_Rswrite { #endif /* CONFIG_9P_ENABLE_9P2000_e */ #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 -/* size = 23 */ +/* size = 23 ; max_iov = 1 ; max_copy = 23 */ struct lib9p_msg_Tread { lib9p_tag_t tag; lib9p_fid_t fid; @@ -558,7 +558,7 @@ struct lib9p_msg_Tread { uint32_t count; }; -/* min_size = 23 ; max_size = 2,147,483,670 */ +/* min_size = 23 ; exp_size = 8,215 ; max_size = 2,147,483,670 ; max_iov = 2 ; max_copy = 23 */ struct lib9p_msg_Twrite { lib9p_tag_t tag; lib9p_fid_t fid; @@ -567,13 +567,13 @@ struct lib9p_msg_Twrite { [[gnu::nonstring]] char *data; }; -/* size = 11 */ +/* size = 11 ; max_iov = 1 ; max_copy = 11 */ struct lib9p_msg_Tclunk { lib9p_tag_t tag; lib9p_fid_t fid; }; -/* size = 11 */ +/* size = 11 ; max_iov = 1 ; max_copy = 11 */ struct lib9p_msg_Tremove { lib9p_tag_t tag; lib9p_fid_t fid; @@ -581,7 +581,7 @@ struct lib9p_msg_Tremove { #endif /* 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 || CONFIG_9P_ENABLE_9P2000_e || CONFIG_9P_ENABLE_9P2000_p9p || CONFIG_9P_ENABLE_9P2000_u -/* size = 11 */ +/* size = 11 ; max_iov = 1 ; max_copy = 11 */ struct lib9p_msg_Tstat { lib9p_tag_t tag; lib9p_fid_t fid; @@ -589,26 +589,26 @@ struct lib9p_msg_Tstat { #endif /* CONFIG_9P_ENABLE_9P2000 || CONFIG_9P_ENABLE_9P2000_e || CONFIG_9P_ENABLE_9P2000_p9p || CONFIG_9P_ENABLE_9P2000_u */ #if CONFIG_9P_ENABLE_9P2000_L -/* size = 11 */ +/* size = 11 ; max_iov = 1 ; max_copy = 11 */ struct lib9p_msg_Tstatfs { lib9p_tag_t tag; lib9p_fid_t fid; }; -/* size = 15 */ +/* size = 15 ; max_iov = 1 ; max_copy = 15 */ struct lib9p_msg_Tlopen { lib9p_tag_t tag; lib9p_fid_t fid; uint32_t flags; }; -/* size = 11 */ +/* size = 11 ; max_iov = 1 ; max_copy = 11 */ struct lib9p_msg_Treadlink { lib9p_tag_t tag; lib9p_fid_t fid; }; -/* size = 23 */ +/* size = 23 ; max_iov = 1 ; max_copy = 23 */ struct lib9p_msg_Treaddir { lib9p_tag_t tag; lib9p_fid_t fid; @@ -616,7 +616,7 @@ struct lib9p_msg_Treaddir { uint32_t count; }; -/* size = 15 */ +/* size = 15 ; max_iov = 1 ; max_copy = 15 */ struct lib9p_msg_Tfsync { lib9p_tag_t tag; lib9p_fid_t fid; @@ -625,25 +625,25 @@ struct lib9p_msg_Tfsync { #endif /* CONFIG_9P_ENABLE_9P2000_L */ #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 -/* min_size = 13 ; max_size = 65,548 */ +/* min_size = 13 ; exp_size = 40 ; max_size = 65,548 ; max_iov = 2 ; max_copy = 13 */ struct lib9p_msg_Tversion { lib9p_tag_t tag; uint32_t max_msg_size; struct lib9p_s version; }; -/* min_size = 13 ; max_size = 65,548 */ +/* min_size = 13 ; exp_size = 40 ; max_size = 65,548 ; max_iov = 2 ; max_copy = 13 */ struct lib9p_msg_Rversion { lib9p_tag_t tag; uint32_t max_msg_size; struct lib9p_s version; }; -/* LIB9P_VER_9P2000 : min_size = 9 ; max_size = 65,544 */ -/* LIB9P_VER_9P2000_L : min_size = 9 ; max_size = 65,544 */ -/* LIB9P_VER_9P2000_e : min_size = 9 ; max_size = 65,544 */ -/* LIB9P_VER_9P2000_p9p: min_size = 9 ; max_size = 65,544 */ -/* LIB9P_VER_9P2000_u : min_size = 13 ; max_size = 65,548 */ +/* LIB9P_VER_9P2000 : min_size = 9 ; exp_size = 36 ; max_size = 65,544 ; max_iov = 2 ; max_copy = 9 */ +/* LIB9P_VER_9P2000_L : min_size = 9 ; exp_size = 36 ; max_size = 65,544 ; max_iov = 2 ; max_copy = 9 */ +/* LIB9P_VER_9P2000_e : min_size = 9 ; exp_size = 36 ; max_size = 65,544 ; max_iov = 2 ; max_copy = 9 */ +/* LIB9P_VER_9P2000_p9p: min_size = 9 ; exp_size = 36 ; max_size = 65,544 ; max_iov = 2 ; max_copy = 9 */ +/* LIB9P_VER_9P2000_u : min_size = 13 ; exp_size = 40 ; max_size = 65,548 ; max_iov = 3 ; max_copy = 13 */ struct lib9p_msg_Rerror { lib9p_tag_t tag; struct lib9p_s ename; @@ -652,7 +652,7 @@ struct lib9p_msg_Rerror { #endif /* CONFIG_9P_ENABLE_9P2000_u */ }; -/* min_size = 17 ; max_size = 1,048,609 */ +/* min_size = 17 ; exp_size = 481 ; max_size = 1,048,609 ; max_iov = 32 ; max_copy = 49 */ struct lib9p_msg_Twalk { lib9p_tag_t tag; lib9p_fid_t fid; @@ -663,7 +663,7 @@ struct lib9p_msg_Twalk { #endif /* 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_L -/* min_size = 17 ; max_size = 65,552 */ +/* min_size = 17 ; exp_size = 44 ; max_size = 65,552 ; max_iov = 2 ; max_copy = 17 */ struct lib9p_msg_Trename { lib9p_tag_t tag; lib9p_fid_t fid; @@ -671,13 +671,13 @@ struct lib9p_msg_Trename { struct lib9p_s name; }; -/* min_size = 9 ; max_size = 65,544 */ +/* min_size = 9 ; exp_size = 36 ; max_size = 65,544 ; max_iov = 2 ; max_copy = 9 */ struct lib9p_msg_Rreadlink { lib9p_tag_t tag; struct lib9p_s target; }; -/* min_size = 17 ; max_size = 65,552 */ +/* min_size = 17 ; exp_size = 44 ; max_size = 65,552 ; max_iov = 2 ; max_copy = 17 */ struct lib9p_msg_Txattrwalk { lib9p_tag_t tag; lib9p_fid_t fid; @@ -685,7 +685,7 @@ struct lib9p_msg_Txattrwalk { struct lib9p_s name; }; -/* min_size = 25 ; max_size = 65,560 */ +/* min_size = 25 ; exp_size = 52 ; max_size = 65,560 ; max_iov = 3 ; max_copy = 25 */ struct lib9p_msg_Txattrcreate { lib9p_tag_t tag; lib9p_fid_t fid; @@ -694,7 +694,7 @@ struct lib9p_msg_Txattrcreate { uint32_t flags; }; -/* min_size = 34 ; max_size = 65,569 */ +/* min_size = 34 ; exp_size = 61 ; max_size = 65,569 ; max_iov = 2 ; max_copy = 34 */ struct lib9p_msg_Tgetlock { lib9p_tag_t tag; lib9p_fid_t fid; @@ -705,7 +705,7 @@ struct lib9p_msg_Tgetlock { struct lib9p_s client_id; }; -/* min_size = 30 ; max_size = 65,565 */ +/* min_size = 30 ; exp_size = 57 ; max_size = 65,565 ; max_iov = 2 ; max_copy = 30 */ struct lib9p_msg_Rgetlock { lib9p_tag_t tag; uint8_t type; @@ -715,7 +715,7 @@ struct lib9p_msg_Rgetlock { struct lib9p_s client_id; }; -/* min_size = 17 ; max_size = 65,552 */ +/* min_size = 17 ; exp_size = 44 ; max_size = 65,552 ; max_iov = 2 ; max_copy = 17 */ struct lib9p_msg_Tlink { lib9p_tag_t tag; lib9p_fid_t dfid; @@ -723,7 +723,7 @@ struct lib9p_msg_Tlink { struct lib9p_s name; }; -/* min_size = 19 ; max_size = 131,089 */ +/* min_size = 19 ; exp_size = 73 ; max_size = 131,089 ; max_iov = 4 ; max_copy = 19 */ struct lib9p_msg_Trenameat { lib9p_tag_t tag; lib9p_fid_t olddirfid; @@ -732,7 +732,7 @@ struct lib9p_msg_Trenameat { struct lib9p_s newname; }; -/* min_size = 17 ; max_size = 65,552 */ +/* min_size = 17 ; exp_size = 44 ; max_size = 65,552 ; max_iov = 3 ; max_copy = 17 */ struct lib9p_msg_Tunlinkat { lib9p_tag_t tag; lib9p_fid_t dirfd; @@ -742,7 +742,7 @@ struct lib9p_msg_Tunlinkat { #endif /* CONFIG_9P_ENABLE_9P2000_L */ #if CONFIG_9P_ENABLE_9P2000_e -/* min_size = 13 ; max_size = 4,294,967,308 (warning: >UINT32_MAX) */ +/* min_size = 13 ; exp_size = 477 ; max_size = 4,294,967,308 (warning: >UINT32_MAX) ; max_iov = 131,070 ; max_copy = 131,083 */ struct lib9p_msg_Tsread { lib9p_tag_t tag; uint32_t fid; @@ -750,7 +750,7 @@ struct lib9p_msg_Tsread { struct lib9p_s *wname; }; -/* min_size = 17 ; max_size = 8,589,934,607 (warning: >UINT32_MAX) */ +/* min_size = 17 ; exp_size = 8,673 ; max_size = 8,589,934,607 (warning: >UINT32_MAX) ; max_iov = 131,072 ; max_copy = 131,087 */ struct lib9p_msg_Tswrite { lib9p_tag_t tag; uint32_t fid; @@ -762,18 +762,18 @@ struct lib9p_msg_Tswrite { #endif /* CONFIG_9P_ENABLE_9P2000_e */ #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 -/* size = 13 */ +/* size = 13 ; max_iov = 1 ; max_copy = 13 */ struct lib9p_qid { lib9p_qt_t type; uint32_t vers; uint64_t path; }; -/* LIB9P_VER_9P2000 : min_size = 15 ; max_size = 131,085 */ -/* LIB9P_VER_9P2000_L : min_size = 19 ; max_size = 131,089 */ -/* LIB9P_VER_9P2000_e : min_size = 15 ; max_size = 131,085 */ -/* LIB9P_VER_9P2000_p9p: min_size = 15 ; max_size = 131,085 */ -/* LIB9P_VER_9P2000_u : min_size = 19 ; max_size = 131,089 */ +/* LIB9P_VER_9P2000 : min_size = 15 ; exp_size = 69 ; max_size = 131,085 ; max_iov = 4 ; max_copy = 15 */ +/* LIB9P_VER_9P2000_L : min_size = 19 ; exp_size = 73 ; max_size = 131,089 ; max_iov = 5 ; max_copy = 19 */ +/* LIB9P_VER_9P2000_e : min_size = 15 ; exp_size = 69 ; max_size = 131,085 ; max_iov = 4 ; max_copy = 15 */ +/* LIB9P_VER_9P2000_p9p: min_size = 15 ; exp_size = 69 ; max_size = 131,085 ; max_iov = 4 ; max_copy = 15 */ +/* LIB9P_VER_9P2000_u : min_size = 19 ; exp_size = 73 ; max_size = 131,089 ; max_iov = 5 ; max_copy = 19 */ struct lib9p_msg_Tauth { lib9p_tag_t tag; lib9p_fid_t afid; @@ -784,11 +784,11 @@ struct lib9p_msg_Tauth { #endif /* CONFIG_9P_ENABLE_9P2000_L || CONFIG_9P_ENABLE_9P2000_u */ }; -/* LIB9P_VER_9P2000 : min_size = 19 ; max_size = 131,089 */ -/* LIB9P_VER_9P2000_L : min_size = 23 ; max_size = 131,093 */ -/* LIB9P_VER_9P2000_e : min_size = 19 ; max_size = 131,089 */ -/* LIB9P_VER_9P2000_p9p: min_size = 19 ; max_size = 131,089 */ -/* LIB9P_VER_9P2000_u : min_size = 23 ; max_size = 131,093 */ +/* LIB9P_VER_9P2000 : min_size = 19 ; exp_size = 73 ; max_size = 131,089 ; max_iov = 4 ; max_copy = 19 */ +/* LIB9P_VER_9P2000_L : min_size = 23 ; exp_size = 77 ; max_size = 131,093 ; max_iov = 5 ; max_copy = 23 */ +/* LIB9P_VER_9P2000_e : min_size = 19 ; exp_size = 73 ; max_size = 131,089 ; max_iov = 4 ; max_copy = 19 */ +/* LIB9P_VER_9P2000_p9p: min_size = 19 ; exp_size = 73 ; max_size = 131,089 ; max_iov = 4 ; max_copy = 19 */ +/* LIB9P_VER_9P2000_u : min_size = 23 ; exp_size = 77 ; max_size = 131,093 ; max_iov = 5 ; max_copy = 23 */ struct lib9p_msg_Tattach { lib9p_tag_t tag; lib9p_fid_t fid; @@ -802,7 +802,7 @@ struct lib9p_msg_Tattach { #endif /* 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_L -/* min_size = 25 ; max_size = 65,560 */ +/* min_size = 25 ; exp_size = 52 ; max_size = 65,560 ; max_iov = 3 ; max_copy = 25 */ struct lib9p_msg_Tlcreate { lib9p_tag_t tag; lib9p_fid_t fid; @@ -812,7 +812,7 @@ struct lib9p_msg_Tlcreate { lib9p_nuid_t gid; }; -/* min_size = 19 ; max_size = 131,089 */ +/* min_size = 19 ; exp_size = 73 ; max_size = 131,089 ; max_iov = 5 ; max_copy = 19 */ struct lib9p_msg_Tsymlink { lib9p_tag_t tag; lib9p_fid_t fid; @@ -821,7 +821,7 @@ struct lib9p_msg_Tsymlink { lib9p_nuid_t gid; }; -/* min_size = 29 ; max_size = 65,564 */ +/* min_size = 29 ; exp_size = 56 ; max_size = 65,564 ; max_iov = 3 ; max_copy = 29 */ struct lib9p_msg_Tmknod { lib9p_tag_t tag; lib9p_fid_t dfid; @@ -832,7 +832,7 @@ struct lib9p_msg_Tmknod { lib9p_nuid_t gid; }; -/* min_size = 21 ; max_size = 65,556 */ +/* min_size = 21 ; exp_size = 48 ; max_size = 65,556 ; max_iov = 3 ; max_copy = 21 */ struct lib9p_msg_Tmkdir { lib9p_tag_t tag; lib9p_fid_t dfid; @@ -843,14 +843,14 @@ struct lib9p_msg_Tmkdir { #endif /* CONFIG_9P_ENABLE_9P2000_L */ #if CONFIG_9P_ENABLE_9P2000 || CONFIG_9P_ENABLE_9P2000_e || CONFIG_9P_ENABLE_9P2000_p9p || CONFIG_9P_ENABLE_9P2000_u -/* size = 12 */ +/* size = 12 ; max_iov = 1 ; max_copy = 12 */ struct lib9p_msg_Topen { lib9p_tag_t tag; lib9p_fid_t fid; lib9p_o_t mode; }; -/* min_size = 18 ; max_size = 65,553 */ +/* min_size = 18 ; exp_size = 45 ; max_size = 65,553 ; max_iov = 3 ; max_copy = 18 */ struct lib9p_msg_Tcreate { lib9p_tag_t tag; lib9p_fid_t fid; @@ -861,7 +861,7 @@ struct lib9p_msg_Tcreate { #endif /* CONFIG_9P_ENABLE_9P2000 || CONFIG_9P_ENABLE_9P2000_e || CONFIG_9P_ENABLE_9P2000_p9p || CONFIG_9P_ENABLE_9P2000_u */ #if CONFIG_9P_ENABLE_9P2000_p9p -/* size = 12 */ +/* size = 12 ; max_iov = 1 ; max_copy = 12 */ struct lib9p_msg_Topenfd { lib9p_tag_t tag; lib9p_fid_t fid; @@ -870,14 +870,14 @@ struct lib9p_msg_Topenfd { #endif /* CONFIG_9P_ENABLE_9P2000_p9p */ #if CONFIG_9P_ENABLE_9P2000_L -/* size = 19 */ +/* size = 19 ; max_iov = 1 ; max_copy = 19 */ struct lib9p_msg_Tgetattr { lib9p_tag_t tag; lib9p_fid_t fid; lib9p_getattr_t request_mask; }; -/* size = 67 */ +/* size = 67 ; max_iov = 1 ; max_copy = 67 */ struct lib9p_msg_Tsetattr { lib9p_tag_t tag; lib9p_fid_t fid; @@ -892,7 +892,7 @@ struct lib9p_msg_Tsetattr { uint64_t mtime_nsec; }; -/* min_size = 38 ; max_size = 65,573 */ +/* min_size = 38 ; exp_size = 65 ; max_size = 65,573 ; max_iov = 2 ; max_copy = 38 */ struct lib9p_msg_Tlock { lib9p_tag_t tag; lib9p_fid_t fid; @@ -904,7 +904,7 @@ struct lib9p_msg_Tlock { struct lib9p_s client_id; }; -/* size = 8 */ +/* size = 8 ; max_iov = 1 ; max_copy = 8 */ struct lib9p_msg_Rlock { lib9p_tag_t tag; lib9p_lock_status_t status; @@ -912,10 +912,10 @@ struct lib9p_msg_Rlock { #endif /* CONFIG_9P_ENABLE_9P2000_L */ #if CONFIG_9P_ENABLE_9P2000 || CONFIG_9P_ENABLE_9P2000_e || CONFIG_9P_ENABLE_9P2000_p9p || CONFIG_9P_ENABLE_9P2000_u -/* LIB9P_VER_9P2000 : min_size = 49 ; max_size = 262,189 */ -/* LIB9P_VER_9P2000_e : min_size = 49 ; max_size = 262,189 */ -/* LIB9P_VER_9P2000_p9p: min_size = 49 ; max_size = 262,189 */ -/* LIB9P_VER_9P2000_u : min_size = 63 ; max_size = 327,738 */ +/* LIB9P_VER_9P2000 : min_size = 49 ; exp_size = 157 ; max_size = 262,189 ; max_iov = 8 ; max_copy = 49 */ +/* LIB9P_VER_9P2000_e : min_size = 49 ; exp_size = 157 ; max_size = 262,189 ; max_iov = 8 ; max_copy = 49 */ +/* LIB9P_VER_9P2000_p9p: min_size = 49 ; exp_size = 157 ; max_size = 262,189 ; max_iov = 8 ; max_copy = 49 */ +/* LIB9P_VER_9P2000_u : min_size = 63 ; exp_size = 198 ; max_size = 327,738 ; max_iov = 11 ; max_copy = 63 */ struct lib9p_stat { uint16_t kern_type; uint32_t kern_dev; @@ -938,19 +938,19 @@ struct lib9p_stat { #endif /* CONFIG_9P_ENABLE_9P2000 || CONFIG_9P_ENABLE_9P2000_e || CONFIG_9P_ENABLE_9P2000_p9p || CONFIG_9P_ENABLE_9P2000_u */ #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 -/* size = 20 */ +/* size = 20 ; max_iov = 1 ; max_copy = 20 */ struct lib9p_msg_Rauth { lib9p_tag_t tag; struct lib9p_qid aqid; }; -/* size = 20 */ +/* size = 20 ; max_iov = 1 ; max_copy = 20 */ struct lib9p_msg_Rattach { lib9p_tag_t tag; struct lib9p_qid qid; }; -/* min_size = 9 ; max_size = 217 */ +/* min_size = 9 ; exp_size = 217 ; max_size = 217 ; max_iov = 1 ; max_copy = 217 */ struct lib9p_msg_Rwalk { lib9p_tag_t tag; uint16_t nwqid; @@ -959,14 +959,14 @@ struct lib9p_msg_Rwalk { #endif /* 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 || CONFIG_9P_ENABLE_9P2000_e || CONFIG_9P_ENABLE_9P2000_p9p || CONFIG_9P_ENABLE_9P2000_u -/* size = 24 */ +/* size = 24 ; max_iov = 1 ; max_copy = 24 */ struct lib9p_msg_Ropen { lib9p_tag_t tag; struct lib9p_qid qid; uint32_t iounit; }; -/* size = 24 */ +/* size = 24 ; max_iov = 1 ; max_copy = 24 */ struct lib9p_msg_Rcreate { lib9p_tag_t tag; struct lib9p_qid qid; @@ -975,7 +975,7 @@ struct lib9p_msg_Rcreate { #endif /* CONFIG_9P_ENABLE_9P2000 || CONFIG_9P_ENABLE_9P2000_e || CONFIG_9P_ENABLE_9P2000_p9p || CONFIG_9P_ENABLE_9P2000_u */ #if CONFIG_9P_ENABLE_9P2000_p9p -/* size = 28 */ +/* size = 28 ; max_iov = 1 ; max_copy = 28 */ struct lib9p_msg_Ropenfd { lib9p_tag_t tag; struct lib9p_qid qid; @@ -985,33 +985,33 @@ struct lib9p_msg_Ropenfd { #endif /* CONFIG_9P_ENABLE_9P2000_p9p */ #if CONFIG_9P_ENABLE_9P2000_L -/* size = 24 */ +/* size = 24 ; max_iov = 1 ; max_copy = 24 */ struct lib9p_msg_Rlopen { lib9p_tag_t tag; struct lib9p_qid qid; uint32_t iounit; }; -/* size = 24 */ +/* size = 24 ; max_iov = 1 ; max_copy = 24 */ struct lib9p_msg_Rlcreate { lib9p_tag_t tag; struct lib9p_qid qid; uint32_t iounit; }; -/* size = 20 */ +/* size = 20 ; max_iov = 1 ; max_copy = 20 */ struct lib9p_msg_Rsymlink { lib9p_tag_t tag; struct lib9p_qid qid; }; -/* size = 20 */ +/* size = 20 ; max_iov = 1 ; max_copy = 20 */ struct lib9p_msg_Rmknod { lib9p_tag_t tag; struct lib9p_qid qid; }; -/* size = 160 */ +/* size = 160 ; max_iov = 1 ; max_copy = 160 */ struct lib9p_msg_Rgetattr { lib9p_tag_t tag; uint64_t valid; @@ -1036,7 +1036,7 @@ struct lib9p_msg_Rgetattr { uint64_t data_version; }; -/* size = 20 */ +/* size = 20 ; max_iov = 1 ; max_copy = 20 */ struct lib9p_msg_Rmkdir { lib9p_tag_t tag; struct lib9p_qid qid; @@ -1044,22 +1044,52 @@ struct lib9p_msg_Rmkdir { #endif /* CONFIG_9P_ENABLE_9P2000_L */ #if CONFIG_9P_ENABLE_9P2000 || CONFIG_9P_ENABLE_9P2000_e || CONFIG_9P_ENABLE_9P2000_p9p || CONFIG_9P_ENABLE_9P2000_u -/* LIB9P_VER_9P2000 : min_size = 58 ; max_size = 262,198 */ -/* LIB9P_VER_9P2000_e : min_size = 58 ; max_size = 262,198 */ -/* LIB9P_VER_9P2000_p9p: min_size = 58 ; max_size = 262,198 */ -/* LIB9P_VER_9P2000_u : min_size = 72 ; max_size = 327,747 */ +/* LIB9P_VER_9P2000 : min_size = 58 ; exp_size = 166 ; max_size = 262,198 ; max_iov = 8 ; max_copy = 58 */ +/* LIB9P_VER_9P2000_e : min_size = 58 ; exp_size = 166 ; max_size = 262,198 ; max_iov = 8 ; max_copy = 58 */ +/* LIB9P_VER_9P2000_p9p: min_size = 58 ; exp_size = 166 ; max_size = 262,198 ; max_iov = 8 ; max_copy = 58 */ +/* LIB9P_VER_9P2000_u : min_size = 72 ; exp_size = 207 ; max_size = 327,747 ; max_iov = 11 ; max_copy = 72 */ struct lib9p_msg_Rstat { lib9p_tag_t tag; struct lib9p_stat stat; }; -/* LIB9P_VER_9P2000 : min_size = 62 ; max_size = 262,202 */ -/* LIB9P_VER_9P2000_e : min_size = 62 ; max_size = 262,202 */ -/* LIB9P_VER_9P2000_p9p: min_size = 62 ; max_size = 262,202 */ -/* LIB9P_VER_9P2000_u : min_size = 76 ; max_size = 327,751 */ +/* LIB9P_VER_9P2000 : min_size = 62 ; exp_size = 170 ; max_size = 262,202 ; max_iov = 8 ; max_copy = 62 */ +/* LIB9P_VER_9P2000_e : min_size = 62 ; exp_size = 170 ; max_size = 262,202 ; max_iov = 8 ; max_copy = 62 */ +/* LIB9P_VER_9P2000_p9p: min_size = 62 ; exp_size = 170 ; max_size = 262,202 ; max_iov = 8 ; max_copy = 62 */ +/* LIB9P_VER_9P2000_u : min_size = 76 ; exp_size = 211 ; max_size = 327,751 ; max_iov = 11 ; max_copy = 76 */ struct lib9p_msg_Twstat { lib9p_tag_t tag; lib9p_fid_t fid; struct lib9p_stat stat; }; #endif /* CONFIG_9P_ENABLE_9P2000 || CONFIG_9P_ENABLE_9P2000_e || CONFIG_9P_ENABLE_9P2000_p9p || CONFIG_9P_ENABLE_9P2000_u */ + +/* 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 +#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 +#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 +#endif + +#if CONFIG_9P_ENABLE_9P2000_u + #define LIB9P_RMSG_MAX_IOV 11 +#elif CONFIG_9P_ENABLE_9P2000 || CONFIG_9P_ENABLE_9P2000_e || CONFIG_9P_ENABLE_9P2000_p9p + #define LIB9P_RMSG_MAX_IOV 8 +#elif CONFIG_9P_ENABLE_9P2000_L + #define LIB9P_RMSG_MAX_IOV 2 +#endif + +#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 + #define LIB9P_RMSG_MAX_COPY 217 +#endif |