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 Add rxd_nxck (Receive Descriptor next to c...
details: https://anonhg.NetBSD.org/src/rev/ae4b9be81bec
branches: trunk
changeset: 832670:ae4b9be81bec
user: msaitoh <msaitoh%NetBSD.org@localhost>
date: Wed May 23 04:37:13 2018 +0000
description:
Add rxd_nxck (Receive Descriptor next to check) read only sysctl.
diffstat:
sys/dev/pci/ixgbe/ixgbe.c | 32 +++++++++++++++++++++++++++++++-
sys/dev/pci/ixgbe/ixv.c | 32 +++++++++++++++++++++++++++++++-
2 files changed, 62 insertions(+), 2 deletions(-)
diffs (120 lines):
diff -r af5ce96cb102 -r ae4b9be81bec sys/dev/pci/ixgbe/ixgbe.c
--- a/sys/dev/pci/ixgbe/ixgbe.c Wed May 23 02:08:40 2018 +0000
+++ b/sys/dev/pci/ixgbe/ixgbe.c Wed May 23 04:37:13 2018 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: ixgbe.c,v 1.153 2018/05/18 10:09:02 msaitoh Exp $ */
+/* $NetBSD: ixgbe.c,v 1.154 2018/05/23 04:37:13 msaitoh Exp $ */
/******************************************************************************
@@ -236,6 +236,7 @@
static int ixgbe_sysctl_power_state(SYSCTLFN_PROTO);
static int ixgbe_sysctl_print_rss_config(SYSCTLFN_PROTO);
#endif
+static int ixgbe_sysctl_next_to_check_handler(SYSCTLFN_PROTO);
static int ixgbe_sysctl_rdh_handler(SYSCTLFN_PROTO);
static int ixgbe_sysctl_rdt_handler(SYSCTLFN_PROTO);
static int ixgbe_sysctl_tdt_handler(SYSCTLFN_PROTO);
@@ -1817,6 +1818,14 @@
if (sysctl_createv(log, 0, &rnode, &cnode,
CTLFLAG_READONLY,
CTLTYPE_INT,
+ "rxd_nxck", SYSCTL_DESCR("Receive Descriptor next to check"),
+ ixgbe_sysctl_next_to_check_handler, 0, (void *)rxr, 0,
+ CTL_CREATE, CTL_EOL) != 0)
+ break;
+
+ if (sysctl_createv(log, 0, &rnode, &cnode,
+ CTLFLAG_READONLY,
+ CTLTYPE_INT,
"rxd_head", SYSCTL_DESCR("Receive Descriptor Head"),
ixgbe_sysctl_rdh_handler, 0, (void *)rxr, 0,
CTL_CREATE, CTL_EOL) != 0)
@@ -2179,6 +2188,27 @@
} /* ixgbe_sysctl_tdt_handler */
/************************************************************************
+ * ixgbe_sysctl_next_to_check_handler - Receive Descriptor next to check
+ * handler function
+ *
+ * Retrieves the next_to_check value
+ ************************************************************************/
+static int
+ixgbe_sysctl_next_to_check_handler(SYSCTLFN_ARGS)
+{
+ struct sysctlnode node = *rnode;
+ struct rx_ring *rxr = (struct rx_ring *)node.sysctl_data;
+ uint32_t val;
+
+ if (!rxr)
+ return (0);
+
+ val = rxr->next_to_check;
+ node.sysctl_data = &val;
+ return sysctl_lookup(SYSCTLFN_CALL(&node));
+} /* ixgbe_sysctl_next_to_check_handler */
+
+/************************************************************************
* ixgbe_sysctl_rdh_handler - Receive Descriptor Head handler function
*
* Retrieves the RDH value from the hardware
diff -r af5ce96cb102 -r ae4b9be81bec sys/dev/pci/ixgbe/ixv.c
--- a/sys/dev/pci/ixgbe/ixv.c Wed May 23 02:08:40 2018 +0000
+++ b/sys/dev/pci/ixgbe/ixv.c Wed May 23 04:37:13 2018 +0000
@@ -1,4 +1,4 @@
-/*$NetBSD: ixv.c,v 1.98 2018/05/18 10:09:02 msaitoh Exp $*/
+/*$NetBSD: ixv.c,v 1.99 2018/05/23 04:37:13 msaitoh Exp $*/
/******************************************************************************
@@ -136,6 +136,7 @@
static void ixv_set_sysctl_value(struct adapter *, const char *,
const char *, int *, int);
static int ixv_sysctl_interrupt_rate_handler(SYSCTLFN_PROTO);
+static int ixv_sysctl_next_to_check_handler(SYSCTLFN_PROTO);
static int ixv_sysctl_rdh_handler(SYSCTLFN_PROTO);
static int ixv_sysctl_rdt_handler(SYSCTLFN_PROTO);
static int ixv_sysctl_tdt_handler(SYSCTLFN_PROTO);
@@ -1878,6 +1879,27 @@
} /* ixv_sysctl_tdt_handler */
/************************************************************************
+ * ixv_sysctl_next_to_check_handler - Receive Descriptor next to check
+ * handler function
+ *
+ * Retrieves the next_to_check value
+ ************************************************************************/
+static int
+ixv_sysctl_next_to_check_handler(SYSCTLFN_ARGS)
+{
+ struct sysctlnode node = *rnode;
+ struct rx_ring *rxr = (struct rx_ring *)node.sysctl_data;
+ uint32_t val;
+
+ if (!rxr)
+ return (0);
+
+ val = rxr->next_to_check;
+ node.sysctl_data = &val;
+ return sysctl_lookup(SYSCTLFN_CALL(&node));
+} /* ixv_sysctl_next_to_check_handler */
+
+/************************************************************************
* ixv_sysctl_rdh_handler - Receive Descriptor Head handler function
*
* Retrieves the RDH value from the hardware
@@ -2450,6 +2472,14 @@
if (sysctl_createv(log, 0, &rnode, &cnode,
CTLFLAG_READONLY,
CTLTYPE_INT,
+ "rxd_nxck", SYSCTL_DESCR("Receive Descriptor next to check"),
+ ixv_sysctl_next_to_check_handler, 0, (void *)rxr, 0,
+ CTL_CREATE, CTL_EOL) != 0)
+ break;
+
+ if (sysctl_createv(log, 0, &rnode, &cnode,
+ CTLFLAG_READONLY,
+ CTLTYPE_INT,
"rxd_head", SYSCTL_DESCR("Receive Descriptor Head"),
ixv_sysctl_rdh_handler, 0, (void *)rxr, 0,
CTL_CREATE, CTL_EOL) != 0)
Home |
Main Index |
Thread Index |
Old Index