freebsd-skq/sys/dev/netmap
Vincenzo Maffione f4a54f4333 netmap: use safer defaults for hwbuf_len
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).
2021-04-18 13:39:15 +00:00
..
if_ptnet.c Use NET_TASK_INIT() and NET_GROUPTASK_INIT() for drivers that process 2020-02-11 18:57:07 +00:00
if_re_netmap.h
if_vtnet_netmap.h netmap: vtnet: remove unused variable 2021-04-09 19:33:41 +00:00
netmap_bdg.c netmap: several typo fixes 2021-04-02 07:01:20 +00:00
netmap_bdg.h netmap: add kernel support for the "offsets" feature 2021-03-29 16:29:01 +00:00
netmap_freebsd.c netmap: several typo fixes 2021-04-02 07:01:20 +00:00
netmap_generic.c netmap: several typo fixes 2021-04-02 07:01:20 +00:00
netmap_kern.h wpa: Import wpa_supplicant/hostapd commit f91680c15 2021-04-17 07:21:12 -07:00
netmap_kloop.c netmap: several typo fixes 2021-04-02 07:01:20 +00:00
netmap_legacy.c netmap: fix parsing of legacy nmr->nr_ringid 2020-08-18 08:03:28 +00:00
netmap_mbq.c
netmap_mbq.h
netmap_mem2.c netmap: don't use linux type struct device * 2021-04-11 21:13:01 +00:00
netmap_mem2.h netmap: several typo fixes 2021-04-02 07:01:20 +00:00
netmap_monitor.c netmap: several typo fixes 2021-04-02 07:01:20 +00:00
netmap_null.c netmap: add kernel support for the "offsets" feature 2021-03-29 16:29:01 +00:00
netmap_offloadings.c netmap: refactor logging macros and pipes 2019-02-05 12:10:48 +00:00
netmap_pipe.c netmap: add kernel support for the "offsets" feature 2021-03-29 16:29:01 +00:00
netmap_vale.c netmap: several typo fixes 2021-04-02 07:01:20 +00:00
netmap.c netmap: use safer defaults for hwbuf_len 2021-04-18 13:39:15 +00:00