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, Oct 28, 9:21 AM
Unknown Object (File)
Wed, Oct 16, 1:00 PM
Unknown Object (File)
Wed, Oct 16, 11:57 AM
Unknown Object (File)
Wed, Oct 16, 11:55 AM
Unknown Object (File)
Oct 3 2024, 9:54 AM
Unknown Object (File)
Oct 2 2024, 6:38 PM
Unknown Object (File)
Oct 1 2024, 4:06 PM
Unknown Object (File)
Sep 30 2024, 12:18 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.