]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/commit
MFC r341726
authorVincenzo Maffione <vmaffione@FreeBSD.org>
Thu, 13 Dec 2018 09:40:06 +0000 (09:40 +0000)
committerVincenzo Maffione <vmaffione@FreeBSD.org>
Thu, 13 Dec 2018 09:40:06 +0000 (09:40 +0000)
commit7eb226fd06eca03e008a0db88a7041fc9584c0b2
tree5c7668bde3687904d32e642f08c08aff05d056b2
parent1741bacc2251fa260d8a3939dac506fcf019ff07
MFC r341726

tools: netmap: pkt-gen: check packet length against interface MTU

Validate the value of the -l argument (packet length) against the MTU of the netmap port.
In case the netmap port does not refer to a physical interface (e.g. VALE port or pipe), then
the netmap buffer size is used as MTU.
This change also sets a better default value for the -M option, so that pkt-gen uses
the largest possible fragments in case of multi-slot packets.

Differential Revision:  https://reviews.freebsd.org/D18436
tools/tools/netmap/pkt-gen.c