Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 30 Oct 2017 21:20:33 +0000 (UTC)
From:      Stephen Hurd <shurd@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r325168 - head/sys/net
Message-ID:  <201710302120.v9ULKXS6075886@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
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@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 */



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