netmap: How the buf_num of buffers is used by driver and monitor app

Ming Fu Ming.Fu at esentire.com
Fri Mar 30 04:00:30 UTC 2018


Hi,

I am wondering about the netmap module parameters buf_num. The default buf_num 163840 seems fairly big compare to intel 10G ixgbe of max 4096 queue size. A full queue of the interface can only use a very small portion of the buf_num. Can the netmap enabled driver like ixgbe use more buffers than the "ethtool -G" configured rx/tx queue size?

I need to feed packages captured from netmap device to a few traffic monitors on the same box. The monitor application attach to the device as netmap monitor with the /r at the end of device name. My question is if the primary read of the device calls poll(), the netmap buffer is synced with the kernel. Can the other monitor application still access the packet that the primary read just returned to the kernel? If one of the monitor on the netmap device is slow, will it cause trouble for the primary reader and other monitors? How can I cache a lot of packets in the buffer in case one of the monitor application had a temporary slow down?

Thanks,
Ming


More information about the freebsd-net mailing list