OPNsense Forum

Archive => 23.7 Legacy Series => Topic started by: JohnnyBeee on September 02, 2023, 04:06:35 AM

Title: netmap buf size >= 4096 required?
Post by: JohnnyBeee on September 02, 2023, 04:06:35 AM
In the system log I see the following message:
Notice   kernel   518.293049 [2226] netmap_buf_size_validate error: using NS_MOREFRAG on igb0 requires netmap buf size >= 4096

Could anybody enlighten me as to what that means?
How, if required, would I set the netmap buf size to >= 4096?

Thanks for any help.
Title: Re: netmap buf size >= 4096 required?
Post by: newsense on September 02, 2023, 05:58:55 PM
QuoteNotice   kernel   518.293049 [2226] netmap_buf_size_validate error: using NS_MOREFRAG on igb0 requires netmap buf size >= 4096
Is this on a FW with Zenarmor ? Trying to understand where the message is coming from.



First modify the buffer size on the fly and check the results:

The default value seems to be 2048, check with
sysctl -a |grep netmap


You can modify it with this command

sysctl dev.netmap.buf_size=4096

and the output should be this
Quoteroot@OPNsense:~ # sysctl dev.netmap.buf_size=4096
dev.netmap.buf_size: 2048 -> 4096


If everything looks good you can add a Tunable in the GUI for persistency,

https://man.freebsd.org/cgi/man.cgi?query=netmap&sektion=4 (https://man.freebsd.org/cgi/man.cgi?query=netmap&sektion=4)

Title: Re: netmap buf size >= 4096 required?
Post by: JohnnyBeee on September 04, 2023, 03:23:39 AM
Thanks for the detailed instructions.

No Zenarmor on this firewall.

I followed your instructions and now the message is gone.
But still no idea what caused it.

Title: Re: netmap buf size >= 4096 required?
Post by: newsense on September 04, 2023, 05:50:35 AM
It appears Suricata now requires at least a value of >=4096 and the default netmap buffer size needs to be adjusted for it at the very least.

Can only hope Franco will chime in on this. After I skimmed through the man page I'm not sure if the buffer size is related or set depending on the amount of RAM present on the machine and what are the pros/cons of setting a higher value than 4096
Title: Re: netmap buf size >= 4096 required?
Post by: newsense on September 07, 2023, 03:56:04 AM
Gonna bump this once as I'm still wondering if increasing the buffer size would be beneficial and in which conditions.
Title: Re: netmap buf size >= 4096 required?
Post by: franco on September 08, 2023, 10:47:59 AM
Sounds like jumbo packets. MTU for interface running IPS is set to what?


Cheers,
Franco
Title: Re: netmap buf size >= 4096 required?
Post by: opensourcefan on May 02, 2024, 09:56:45 PM
Another bump for this... issue.

Only occurs when LAN is selected, works fine on WAN alone.

error
<Error> -- opening devname netmap:igb1-0/R@conf:host-rings=4 failed: Device busy

I do have Zenarmor installed

All interface MTU's have been left blank.

I set netmap buff_size to 4096, error continues.
Title: Re: netmap buf size >= 4096 required?
Post by: franco on May 03, 2024, 08:25:34 AM
Isn't this a completely different error message? One that tells you that you have Zenarmor running on this interface already??? ;)


Cheers,
Franco