[Bug 226289] [igb] [netmap] Kernel NIC Driver conflict

bugzilla-noreply at freebsd.org bugzilla-noreply at freebsd.org
Thu Jan 10 22:14:45 UTC 2019


https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=226289

Vincenzo Maffione <vmaffione at FreeBSD.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|New                         |In Progress

--- Comment #9 from Vincenzo Maffione <vmaffione at FreeBSD.org> ---
Hi, I'm sorry, I saw this only now.

Long story short: this looks like your netmap application behaving incorrectly,
or is misconfigured, and netmap duly complaining about that.

Netmap uses packet buffers of fixed size, which is 2048 by default (sysctl
dev.netmap.buf_size, see netmap(4)).

That piece of code (netmap_grab_packets) forwards packets from the netmap "host
TX ring" (associated to the interface igb1) and injects those into the FreeBSD
kernel stack, so that kernel stack "thinks" that those packets are coming from
the igb1 link.
Who puts packets in the igb1 "host TX ring"? Well, that's an userspace netmap
application (maybe Suricata in your deployment? It's not clear from your
description. You should check in your code who is opening netmap ports with
nm_open(...) or ioctl(.., NIOCREGIF, ..).

Unfortunately, some of the packets written to the host TX ring look larger than
the netmap buffer size, which means that Suricata (or whoever) is setting the
len field (in struct netmap_slot) to something larger than 2048. This is
clearly wrong, and those messages mean that netmap is complaining about that.

So the real question is: why is your application is doing that?
If you don't find an answer for that of course you can increase
dev.netmap.buf_size, e.g. double it to 4096 ...

The real solution to your problem may be to simply disable TSO (TCP
Segmentation Offloading) and LRO (Large receive offloading) in the network
interfaces of your system (through ifconfig), because TSO and LRO are likely
the reason why you see  packets larger than the MTU (which I assume is 1500,
since you said you are not using jumbo frames).
Note that TSO and LRO should always be disabled when playing with netmap (read
the very end of netmap(4)).

-- 
You are receiving this mail because:
You are the assignee for the bug.


More information about the freebsd-net mailing list