Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F143123556
D9130.id.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Flag For Later
Award Token
Size
1 KB
Referenced Files
None
Subscribers
None
D9130.id.diff
View Options
Index: head/sys/dev/sfxge/sfxge.h
===================================================================
--- head/sys/dev/sfxge/sfxge.h
+++ head/sys/dev/sfxge/sfxge.h
@@ -159,6 +159,8 @@
#define SFXGE_EV_BATCH 16384
+#define SFXGE_STATS_UPDATE_PERIOD_MS 1000
+
struct sfxge_evq {
/* Structure members below are sorted by usage order */
struct sfxge_softc *sc;
Index: head/sys/dev/sfxge/sfxge_port.c
===================================================================
--- head/sys/dev/sfxge/sfxge_port.c
+++ head/sys/dev/sfxge/sfxge_port.c
@@ -51,6 +51,7 @@
struct sfxge_port *port = &sc->port;
efsys_mem_t *esmp = &(port->mac_stats.dma_buf);
clock_t now;
+ unsigned int min_ticks;
unsigned int count;
int rc;
@@ -61,8 +62,10 @@
goto out;
}
+ min_ticks = (unsigned int)hz * SFXGE_STATS_UPDATE_PERIOD_MS / 1000;
+
now = ticks;
- if ((unsigned int)(now - port->mac_stats.update_time) < (unsigned int)hz) {
+ if ((unsigned int)(now - port->mac_stats.update_time) < min_ticks) {
rc = 0;
goto out;
}
@@ -510,9 +513,10 @@
sfxge_mac_filter_set_locked(sc);
- /* Update MAC stats by DMA every second */
+ /* Update MAC stats by DMA every period */
if ((rc = efx_mac_stats_periodic(enp, &port->mac_stats.dma_buf,
- 1000, B_FALSE)) != 0)
+ SFXGE_STATS_UPDATE_PERIOD_MS,
+ B_FALSE)) != 0)
goto fail6;
if ((rc = efx_mac_drain(enp, B_FALSE)) != 0)
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Tue, Jan 27, 6:45 AM (2 h, 45 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
28022366
Default Alt Text
D9130.id.diff (1 KB)
Attached To
Mode
D9130: sfxge(4): stats refresh in SW should depend on HW update period
Attached
Detach File
Event Timeline
Log In to Comment