Home
last modified time | relevance | path

Searched refs:tswtcl_data (Results 1 – 2 of 2) sorted by relevance

/titanic_41/usr/src/uts/common/ipp/meters/
H A Dtswtcl.c60 tswtcl_process(mblk_t **mpp, tswtcl_data_t *tswtcl_data, in tswtcl_process() argument
71 tswtcl_cfg_t *cfg_parms = tswtcl_data->cfg_parms; in tswtcl_process()
75 atomic_inc_64(&tswtcl_data->epackets); in tswtcl_process()
85 atomic_inc_64(&tswtcl_data->epackets); in tswtcl_process()
94 atomic_inc_64(&tswtcl_data->epackets); in tswtcl_process()
114 mutex_enter(&tswtcl_data->tswtcl_lock); in tswtcl_process()
117 bitsinwin = ((uint64_t)tswtcl_data->avg_rate * cfg_parms->window / in tswtcl_process()
120 deltaT = now - tswtcl_data->win_front + cfg_parms->nsecwindow; in tswtcl_process()
122 tswtcl_data->avg_rate = (uint64_t)bitsinwin * METER_SEC_TO_NSEC / in tswtcl_process()
124 tswtcl_data->win_front = now; in tswtcl_process()
[all …]
H A Dtswtclddi.c106 tswtcl_data_t *tswtcl_data; in tswtcl_create_action() local
224 tswtcl_data = kmem_zalloc(TSWTCL_DATA_SZ, KM_NOSLEEP); in tswtcl_create_action()
225 if (tswtcl_data == NULL) { in tswtcl_create_action()
231 if ((rc = tswtcl_statinit(aid, tswtcl_data)) != 0) { in tswtcl_create_action()
233 kmem_free(tswtcl_data, TSWTCL_DATA_SZ); in tswtcl_create_action()
263 tswtcl_data->cfg_parms = cfg_parms; in tswtcl_create_action()
264 tswtcl_data->avg_rate = cfg_parms->committed_rate; in tswtcl_create_action()
265 mutex_init(&tswtcl_data->tswtcl_lock, NULL, MUTEX_DEFAULT, 0); in tswtcl_create_action()
266 tswtcl_data->win_front = gethrtime(); in tswtcl_create_action()
267 ipp_action_set_ptr(aid, (void *)tswtcl_data); in tswtcl_create_action()
[all …]