Page MenuHomeFreeBSD

netmap: Handle packet batches in generic mode
ClosedPublic

Authored by markj on Apr 5 2023, 2:19 PM.
Tags
None
Referenced Files
Unknown Object (File)
Mon, May 26, 12:10 AM
Unknown Object (File)
Thu, May 22, 5:55 PM
Unknown Object (File)
Wed, May 21, 5:53 PM
Unknown Object (File)
Sat, May 10, 5:07 AM
Unknown Object (File)
Apr 29 2025, 8:48 AM
Unknown Object (File)
Apr 29 2025, 1:02 AM
Unknown Object (File)
Feb 8 2025, 9:08 AM
Unknown Object (File)
Feb 4 2025, 8:25 AM

Details

Summary

ifnets are allowed to pass batches of multiple packets to if_input,
linked by the m_nextpkt pointer. iflib will do this, for example.
Netmap's generic mode did not handle this and would only deliver the
first packet in the batch, leaking the rest.

PR: 270636

Diff Detail

Repository
rG FreeBSD src repository
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

markj requested review of this revision.Apr 5 2023, 2:19 PM

Could this be the same as https://reviews.freebsd.org/D38065#875109 eventually resulting in:

[zone: mbuf_cluser] kern.ipc.nmbclusters limit reached

Could this be the same as https://reviews.freebsd.org/D38065#875109 eventually resulting in:

[zone: mbuf_cluser] kern.ipc.nmbclusters limit reached

Yes, that seems plausible.

This revision is now accepted and ready to land.Apr 5 2023, 8:40 PM

Any example other than iflib? (iflib has native support...)

Any example other than iflib? (iflib has native support...)

Not that I know of, but I did not try to audit the network drivers. I think there are some out-of-tree Intel NIC drivers which might not have netmap support? Also see the reporter's comments in https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=270636

Interesting, thanks. I wonder why the behaviour is different with AMD Ryzen.
Which setup (machine, NIC) did you use to reproduce the issue?

Interesting, thanks. I wonder why the behaviour is different with AMD Ryzen.
Which setup (machine, NIC) did you use to reproduce the issue?

I used bhyve with e1000 emulation, since that's easiest to set up. In particular, the problem does not occur with virtio-net.

Looking at iflib_rxeof(), the problem might be related to whether LRO is enabled and in use.

Yeah, that makes sense, thanks.

This revision was automatically updated to reflect the committed changes.