em(4) Rx and Tx descriptors

Hasso Tepper hasso at estpak.ee
Fri Mar 23 11:27:18 PDT 2007


There is a way to change the numbers of Rx and Tx descriptors via tunables,
but there isn't any feedback whether it succeeded or not. IMHO it would
be nice to export these values into sysctl as read-only nodes.


regards,

-- 
Hasso Tepper
diff -r d06c831cbf6b sys/dev/netif/em/if_em.c
--- a/sys/dev/netif/em/if_em.c	Thu Mar 22 23:31:22 2007 +0000
+++ b/sys/dev/netif/em/if_em.c	Fri Mar 23 17:59:49 2007 +0200
@@ -551,6 +551,11 @@ em_attach(device_t dev)
 		adapter->num_rx_desc = em_rxd;
 	}
 
+	SYSCTL_ADD_INT(NULL, SYSCTL_CHILDREN(adapter->sysctl_tree), OID_AUTO, "rxd",
+		       CTLFLAG_RD, &adapter->num_rx_desc, 0, NULL);
+	SYSCTL_ADD_INT(NULL, SYSCTL_CHILDREN(adapter->sysctl_tree), OID_AUTO, "txd",
+		       CTLFLAG_RD, &adapter->num_tx_desc, 0, NULL);
+
 	adapter->hw.autoneg = DO_AUTO_NEG;
 	adapter->hw.wait_autoneg_complete = WAIT_FOR_AUTO_NEG_DEFAULT;
 	adapter->hw.autoneg_advertised = AUTONEG_ADV_DEFAULT;





More information about the Submit mailing list