Module Name: src Committed By: martin Date: Thu Aug 31 11:37:37 UTC 2017
Modified Files: src/sys/dev/pci/ixgbe [netbsd-8]: ixgbe.c ixgbe.h Log Message: Pull up following revision(s) (requested by msaitoh in ticket #248): sys/dev/pci/ixgbe/ixgbe.h: revision 1.25 sys/dev/pci/ixgbe/ixgbe.c: revision 1.96 sys/dev/pci/ixgbe/ixgbe.c: revision 1.97 Remove unused counters. Don't limit number of queue pair to 8. Take max TX queues and max RX queues into account. 82598 has 32 TX queue and 64 RX queues. Others has 128 TX queues and 128 RX queues. Number of MSI-X table entries is 64, so the max queue pairs is 63 (64 minus the Others (e.g. link status change)). To generate a diff of this commit: cvs rdiff -u -r1.88.2.2 -r1.88.2.3 src/sys/dev/pci/ixgbe/ixgbe.c cvs rdiff -u -r1.24 -r1.24.6.1 src/sys/dev/pci/ixgbe/ixgbe.h Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
Modified files: Index: src/sys/dev/pci/ixgbe/ixgbe.c diff -u src/sys/dev/pci/ixgbe/ixgbe.c:1.88.2.2 src/sys/dev/pci/ixgbe/ixgbe.c:1.88.2.3 --- src/sys/dev/pci/ixgbe/ixgbe.c:1.88.2.2 Sat Aug 5 03:49:35 2017 +++ src/sys/dev/pci/ixgbe/ixgbe.c Thu Aug 31 11:37:37 2017 @@ -59,7 +59,7 @@ * POSSIBILITY OF SUCH DAMAGE. */ /*$FreeBSD: head/sys/dev/ixgbe/if_ix.c 302384 2016-07-07 03:39:18Z sbruno $*/ -/*$NetBSD: ixgbe.c,v 1.88.2.2 2017/08/05 03:49:35 snj Exp $*/ +/*$NetBSD: ixgbe.c,v 1.88.2.3 2017/08/31 11:37:37 martin Exp $*/ #ifdef _KERNEL_OPT #include "opt_inet.h" @@ -2960,6 +2960,7 @@ static int ixgbe_setup_msix(struct adapter *adapter) { device_t dev = adapter->dev; + struct ixgbe_mac_info *mac = &adapter->hw.mac; int want, queues, msgs; /* Override by tuneable */ @@ -2986,8 +2987,9 @@ ixgbe_setup_msix(struct adapter *adapter if (ixgbe_num_queues != 0) queues = ixgbe_num_queues; /* Set max queues to 8 when autoconfiguring */ - else if ((ixgbe_num_queues == 0) && (queues > 8)) - queues = 8; + else + queues = min(queues, + min(mac->max_tx_queues, mac->max_rx_queues)); /* reflect correct sysctl value */ ixgbe_num_queues = queues; @@ -4847,18 +4849,6 @@ ixgbe_add_hw_stats(struct adapter *adapt const char *xname = device_xname(dev); /* Driver Statistics */ -#if 0 - /* These counters are not updated by the software */ - SYSCTL_ADD_ULONG(ctx, child, OID_AUTO, "mbuf_header_failed", - CTLFLAG_RD, &adapter->mbuf_header_failed, - "???"); - SYSCTL_ADD_ULONG(ctx, child, OID_AUTO, "mbuf_packet_failed", - CTLFLAG_RD, &adapter->mbuf_packet_failed, - "???"); - SYSCTL_ADD_ULONG(ctx, child, OID_AUTO, "no_tx_map_avail", - CTLFLAG_RD, &adapter->no_tx_map_avail, - "???"); -#endif evcnt_attach_dynamic(&adapter->handleq, EVCNT_TYPE_MISC, NULL, xname, "Handled queue in softint"); evcnt_attach_dynamic(&adapter->req, EVCNT_TYPE_MISC, Index: src/sys/dev/pci/ixgbe/ixgbe.h diff -u src/sys/dev/pci/ixgbe/ixgbe.h:1.24 src/sys/dev/pci/ixgbe/ixgbe.h:1.24.6.1 --- src/sys/dev/pci/ixgbe/ixgbe.h:1.24 Mon Feb 13 10:13:54 2017 +++ src/sys/dev/pci/ixgbe/ixgbe.h Thu Aug 31 11:37:37 2017 @@ -59,7 +59,7 @@ * POSSIBILITY OF SUCH DAMAGE. */ /*$FreeBSD: head/sys/dev/ixgbe/ixgbe.h 303890 2016-08-09 19:32:06Z dumbbell $*/ -/*$NetBSD: ixgbe.h,v 1.24 2017/02/13 10:13:54 msaitoh Exp $*/ +/*$NetBSD: ixgbe.h,v 1.24.6.1 2017/08/31 11:37:37 martin Exp $*/ #ifndef _IXGBE_H_ @@ -400,7 +400,6 @@ struct tx_ring { u32 packets; /* Soft Stats */ struct evcnt tso_tx; - struct evcnt no_tx_map_avail; struct evcnt no_desc_avail; struct evcnt total_packets; struct evcnt pcq_drops; @@ -580,8 +579,6 @@ struct adapter { /* Misc stats maintained by the driver */ struct evcnt mbuf_defrag_failed; - struct evcnt mbuf_header_failed; - struct evcnt mbuf_packet_failed; struct evcnt efbig_tx_dma_setup; struct evcnt efbig2_tx_dma_setup; struct evcnt einval_tx_dma_setup;