Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 28 Mar 2018 14:01:26 +0000 (UTC)
From:      Mark Johnston <markj@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org
Subject:   svn commit: r331673 - stable/11/sys/net
Message-ID:  <201803281401.w2SE1QOZ083060@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: markj
Date: Wed Mar 28 14:01:26 2018
New Revision: 331673
URL: https://svnweb.freebsd.org/changeset/base/331673

Log:
  MFC r331538:
  Clamp IFLIB_RX_COPY_THRESH to MHLEN in iflib_rxd_pkt_get().

Modified:
  stable/11/sys/net/iflib.c
Directory Properties:
  stable/11/   (props changed)

Modified: stable/11/sys/net/iflib.c
==============================================================================
--- stable/11/sys/net/iflib.c	Wed Mar 28 14:00:46 2018	(r331672)
+++ stable/11/sys/net/iflib.c	Wed Mar 28 14:01:26 2018	(r331673)
@@ -2056,7 +2056,7 @@ iflib_rxd_pkt_get(iflib_rxq_t rxq, if_rxd_info_t ri)
 
 	/* should I merge this back in now that the two paths are basically duplicated? */
 	if (ri->iri_nfrags == 1 &&
-	    ri->iri_frags[0].irf_len <= IFLIB_RX_COPY_THRESH) {
+	    ri->iri_frags[0].irf_len <= MIN(IFLIB_RX_COPY_THRESH, MHLEN)) {
 		sd = rxd_frag_to_sd(rxq, &ri->iri_frags[0], NULL, FALSE);
 		m = sd->ifsd_m;
 		sd->ifsd_m = NULL;



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201803281401.w2SE1QOZ083060>