Skip to content

CHANGELOG: v0.8.0 - #48

Merged
mdlayher merged 3 commits into
mdlayher:mainfrom
nickgarlis:prepare-release
Oct 12, 2026
Merged

mdlayher merged 3 commits into
mdlayher:mainfrom
nickgarlis:prepare-release

Conversation

@nickgarlis

Copy link
Copy Markdown
Collaborator

I would like to give Conn.ReadFunc a go downstream on mdlayher/netlink. It could help us wrap recvmmsg in a custom implementation. I want to validate a theory that this would improve throughput on some netlink families.

@nickgarlis
nickgarlis requested a review from mdlayher October 12, 2026 20:10
v2.13.2 fails with Go 1.27.2, which setup-go now
resolves "1.27" to.

@mdlayher mdlayher left a comment

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

wfm, though you can always go get x@HEAD too.

@mdlayher
mdlayher merged commit 09f371b into mdlayher:main Oct 12, 2026
6 checks passed
@mdlayher

Copy link
Copy Markdown
Owner

By the way, curious where you're using this? I have a local experiment with the out-of-tree homa kernel module that needed it, I think!

@nickgarlis

nickgarlis commented Oct 12, 2026 •

Copy link
Copy Markdown
Collaborator Author

Thanks for tagging the release !

wfm, though you can always go get x@HEAD too.

I've been experimenting with it already, just wanted to start opening some PRs to get your opinion.

By the way, curious where you're using this? I have a local experiment with the out-of-tree homa kernel module that needed it, I think!

I wanted to use recvmmsg but x/sys does not wrap it yet. It also felt a bit wrong to wrap it in this package instead.

I have a local change for netlink where I do something like this

	err := r.c.ReadFunc(ctx, "recvmmsg", func(fd int) error {
		rn, _, errno := unix.Syscall6(
			unix.SYS_RECVMMSG,
			uintptr(fd),
			uintptr(unsafe.Pointer(&r.hdrs[0])),
			uintptr(len(r.hdrs)),
			unix.MSG_WAITFORONE,
			0,
			0,
		)
		if errno != 0 {
			return errno
		}

		n = int(rn)
		return nil
	})

The intention is to expose a ReceiveBatch method which can increase the throughput for nfqueue and conntrack I think. I am currently testing it with https://github.com/florianl/go-nfqueue and the results seem promising. Although admittedly, the tests are not very scientific, using it does seem to significantly increase throughput even when GSO is used.

I have a local experiment with the out-of-tree homa kernel module that needed it, I think!

Sounds interesting! I am guessing you needed it because the existing wrappers are not compatible with homa?

Edit: ReadFunc also seems useful for users who want to reduce allocations and skip the automatic sender address conversion that the existing wrappers do.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants