Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/sys/dev/pci/ixgbe Remove nmbclusters check. We don't use the...



details:   https://anonhg.NetBSD.org/src/rev/f3a6c07e975b
branches:  trunk
changeset: 324422:f3a6c07e975b
user:      msaitoh <msaitoh%NetBSD.org@localhost>
date:      Tue Jul 03 04:02:06 2018 +0000

description:
Remove nmbclusters check. We don't use the mbuf cluster. The old code also had
a bug that ixgbe_total_ports adds two every port and never decrement in
the detach path. Found by hikaru@.

 The code was removed in FreeBSD when it switched to use iflib and OpenBSD
removed the code 8 years ago.

diffstat:

 sys/dev/pci/ixgbe/ixgbe.c |  21 +--------------------
 1 files changed, 1 insertions(+), 20 deletions(-)

diffs (49 lines):

diff -r 71b3921f8ba1 -r f3a6c07e975b sys/dev/pci/ixgbe/ixgbe.c
--- a/sys/dev/pci/ixgbe/ixgbe.c Tue Jul 03 03:41:23 2018 +0000
+++ b/sys/dev/pci/ixgbe/ixgbe.c Tue Jul 03 04:02:06 2018 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: ixgbe.c,v 1.161 2018/06/06 20:02:31 kamil Exp $ */
+/* $NetBSD: ixgbe.c,v 1.162 2018/07/03 04:02:06 msaitoh Exp $ */
 
 /******************************************************************************
 
@@ -394,9 +394,6 @@
 SYSCTL_INT(_hw_ix, OID_AUTO, enable_rss, CTLFLAG_RDTUN, &ixgbe_enable_rss, 0,
     "Enable Receive-Side Scaling (RSS)");
 
-/* Keep running tab on them for sanity check */
-static int ixgbe_total_ports;
-
 #if 0
 static int (*ixgbe_start_locked)(struct ifnet *, struct tx_ring *);
 static int (*ixgbe_ring_empty)(struct ifnet *, pcq_t *);
@@ -931,21 +928,6 @@
        } else
                adapter->num_tx_desc = ixgbe_txd;
 
-       /*
-        * With many RX rings it is easy to exceed the
-        * system mbuf allocation. Tuning nmbclusters
-        * can alleviate this.
-        */
-       if (nmbclusters > 0) {
-               int s;
-               s = (ixgbe_rxd * adapter->num_queues) * ixgbe_total_ports;
-               if (s > nmbclusters) {
-                       aprint_error_dev(dev, "RX Descriptors exceed "
-                           "system mbuf max, using default instead!\n");
-                       ixgbe_rxd = DEFAULT_RXD;
-               }
-       }
-
        if (((ixgbe_rxd * sizeof(union ixgbe_adv_rx_desc)) % DBA_ALIGN) != 0 ||
            ixgbe_rxd < MIN_RXD || ixgbe_rxd > MAX_RXD) {
                aprint_error_dev(dev, "RXD config issue, using default!\n");
@@ -5958,7 +5940,6 @@
                        (ent->subvendor_id == 0)) &&
                    ((PCI_SUBSYS_ID(subid) == ent->subdevice_id) ||
                        (ent->subdevice_id == 0))) {
-                       ++ixgbe_total_ports;
                        return ent;
                }
        }



Home | Main Index | Thread Index | Old Index