]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/commit
MFC r341726
authorvmaffione <vmaffione@FreeBSD.org>
Thu, 13 Dec 2018 10:18:31 +0000 (10:18 +0000)
committervmaffione <vmaffione@FreeBSD.org>
Thu, 13 Dec 2018 10:18:31 +0000 (10:18 +0000)
commit3412a13fa98d786f34bfb57e0bf38c1882e85786
treeb8ca5abeecab99f3db209062df5371c120a0e127
parent45660cd4d983d4104faf28470ead604cef30cfdf
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