f4a54f4333
We must make sure that incoming packets will never overflow the netmap buffers, even when the user is using the offset feature. In the typical scenario, the netmap buffer is 2KiB and, with an MTU of 1500, there are ~500 bytes available for user offsets. Unfortunately, some NICs accept incoming packets even when they are larger then the MTU. This means that the only way to stop DMA from overflowing the netmap buffers, when offsets are allowed, is to choose a hardware buffer length which is smaller than the netmap buffer length. For most NICs and for 2KiB netmap buffers, this means 1024 bytes, which is unconveniently small. The current code will select the small hardware buf size even when offsets are not in use. The main purpose of this change is to fix this bug by returning to the normal behavior for the no-offsets case. At the same time, the patch pushes the handling of the offset case to the lower level driver code, so that it can be made NIC-specific (in future patches). |
||
---|---|---|
.. | ||
if_ptnet.c | ||
if_re_netmap.h | ||
if_vtnet_netmap.h | ||
netmap_bdg.c | ||
netmap_bdg.h | ||
netmap_freebsd.c | ||
netmap_generic.c | ||
netmap_kern.h | ||
netmap_kloop.c | ||
netmap_legacy.c | ||
netmap_mbq.c | ||
netmap_mbq.h | ||
netmap_mem2.c | ||
netmap_mem2.h | ||
netmap_monitor.c | ||
netmap_null.c | ||
netmap_offloadings.c | ||
netmap_pipe.c | ||
netmap_vale.c | ||
netmap.c |