HomeFreeBSD

Clamp IFLIB_RX_COPY_THRESH to MHLEN in iflib_rxd_pkt_get().

Description

Clamp IFLIB_RX_COPY_THRESH to MHLEN in iflib_rxd_pkt_get().

If one has added fields to struct mbuf such that MHLEN is smaller than
this threshold (128), iflib_rxd_pkt_get() may otherwise overrun the
internal mbuf buffer while copying.

Reviewed by: mmacy
MFC after: 3 days
Sponsored by: Dell EMC Isilon
Differential Revision: https://reviews.freebsd.org/D14843