Hi, I'm working on jumbo frame support for axen(4) and mue(4). However, unfortunately, I find that we do not have proper kernel frameworks for jumbo frame; there are two problems:
(1) We do not have external mbuf cluster capable for receiving jumbo frames. We need to use m_devget(9) [ale(4), sk(4), ...], or have per driver pool [bge(4), dge(4), ...]. The former has a performance problem, whereas the latter makes drivers complicated. FreeBSD has 4 cluster sizes, MCLBYTES, pagesize, 9KiB, and 16KiB. They are usable via m_getjcl(how, type, flags, size): https://www.freebsd.org/cgi/man.cgi?query=m_getjcl Here, the "size" argument should be chosen from 4 values above (description in man page is misleading). OpenBSD has 8 cluster sizes, MCLBYTES, MCLBYTES + 2 (ether aligned 2KiB buffer), 4, 8, 9, 12, 16, and 64KiB. They are usable via MCLGETI(m, how, ifp, len): http://man.openbsd.org/MCLGETI Unlike FreeBSD, the "len" argument can be arbitrary; proper cluster is chosen automatically. The "ifp" argument is not used. (2) We do not support maximum MTU other than 1500 or 9000 bytes. However, for example, ixg(4) supports max MTU of 16114, and it is restricted to 4088 for axen(4). FreeBSD handles SIOCSIFMTU ioctl in each driver, whereas OpenBSD added if_hardmtu member to struct ifnet for this purpose. For (2), it seems better for me to switch from ETHERCAP_JUMBO_MTU flag to the OpenBSD way of if_hardmtu. What should we do for (1)? Thanks, rin
