svn commit: r325168 - head/sys/net

Stephen Hurd shurd at FreeBSD.org
Mon Oct 30 21:20:34 UTC 2017


Author: shurd
Date: Mon Oct 30 21:20:33 2017
New Revision: 325168
URL: https://svnweb.freebsd.org/changeset/base/325168

Log:
  bnxt: HW_LRO Rx Pkt with > 32 fragments caused Crash (iflib)
  
  Broadcom NIC with HW_LRO setting max_agg_segs >= 6 can generate Rx pkt with
  64 (2^6) fragments, modify IFLIB_MAX_RX_SEGS to 64 to avoid memory
  corruption / Crash.
  
  Submitted by:	Bhargava Chenna Marreddy <bhargava.marreddy at broadcom.com>
  Reviewed by:	shurd, sbruno
  Approved by:	sbruno (mentor)
  Sponsored by:	Broadcom Limited
  Differential Revision:	https://reviews.freebsd.org/D12774

Modified:
  head/sys/net/iflib.c

Modified: head/sys/net/iflib.c
==============================================================================
--- head/sys/net/iflib.c	Mon Oct 30 21:14:31 2017	(r325167)
+++ head/sys/net/iflib.c	Mon Oct 30 21:20:33 2017	(r325168)
@@ -288,7 +288,8 @@ typedef struct iflib_sw_tx_desc_array {
 
 /* magic number that should be high enough for any hardware */
 #define IFLIB_MAX_TX_SEGS		128
-#define IFLIB_MAX_RX_SEGS		32
+/* bnxt supports 64 with hardware LRO enabled */
+#define IFLIB_MAX_RX_SEGS		64
 #define IFLIB_RX_COPY_THRESH		128
 #define IFLIB_MAX_RX_REFRESH		32
 /* The minimum descriptors per second before we start coalescing */


More information about the svn-src-head mailing list