I have been playing with net/vblade and jumbo frames, specifically I would like to fit a 4K block within an AOE frame, which means sending a packet slightly larger than 4K. vblade errors out with EIO in sendmsg() when asked to write over 4K to bpf fd - is this expected? NetworkPerformanceTuning on the wiki says "Sendmsg() cat't send messages more than maxdgram length. Default value causes routing software to fail with OSPF if jumbo frames is turned on. net.inet.raw.maxdgram=16384 net.inet.raw.recvspace=16384" No joy from above em0: <Intel(R) PRO/1000 Network Connection 7.4.2> port 0xe800-0xe81f mem 0xfe8e0000-0xfe8fffff,0xfe800000-0xfe87ffff,0xfe8dc000-0xfe8dffff irq 16 at device 0.0 on pci2 em0: Using MSIX interrupts with 3 vectors
https://github.com/OpenAoE/vblade/issues/7
I have been encountering the same issue and came up with a patch that fixes the issue, if anyone wants to review it : https://github.com/fflorens/freebsd/commit/92e0329076d3f3bc7d3537aa11786dfd7d26abfb Also opened a PR : https://github.com/freebsd/freebsd/pull/131
Excellent thanks I will be able to have a look at that for my use-case at least
Works great many thanks
You're welcome, but from what i have been told (see the discussion in the PR : https://github.com/freebsd/freebsd/pull/131 and the chain of email there : https://lists.freebsd.org/pipermail/freebsd-net/2017-November/049231.html) the patch i proposed might not be a good idea under memory pressure.
A commit in branch main references this bug: URL: https://cgit.FreeBSD.org/src/commit/?id=f13da24715a75ce0fdac31062866877d980aa908 commit f13da24715a75ce0fdac31062866877d980aa908 Author: Florian Florensa <florian@florensa.me> AuthorDate: 2018-02-16 09:53:22 +0000 Commit: Warner Losh <imp@FreeBSD.org> CommitDate: 2021-06-23 16:39:18 +0000 net/bpf: Fix writing of buffer bigger than PAGESIZE When allocating the mbuf we used m_get2 which fails if len is superior to MJUMPAGESIZE, if its the case, use m_getjcl instead. Reviewed by: kp@ PR: 205164 Pull Request: https://github.com/freebsd/freebsd-src/pull/131 sys/net/bpf.c | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-)
Hi, Warner, should this be MFC'ed?
Just merged this, so closing. It will land once testing is done. If it fails for some reason, I'm never going to merge.
A commit in branch stable/13 references this bug: URL: https://cgit.FreeBSD.org/src/commit/?id=7965d4d9e326373b4669e451d3bd2a7d840c4b5b commit 7965d4d9e326373b4669e451d3bd2a7d840c4b5b Author: Florian Florensa <florian@florensa.me> AuthorDate: 2023-09-17 14:16:07 +0000 Commit: Warner Losh <imp@FreeBSD.org> CommitDate: 2023-09-17 14:17:51 +0000 net/bpf: Fix writing of buffer bigger than PAGESIZE When allocating the mbuf we used m_get2 which fails if len is superior to MJUMPAGESIZE, if its the case, use m_getjcl instead. Reviewed by: kp@ PR: 205164 Pull Request: https://github.com/freebsd/freebsd-src/pull/131 (cherry picked from commit f13da24715a75ce0fdac31062866877d980aa908) sys/net/bpf.c | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-)