Lines Matching defs:smp
68 sfxge_mon_t *smp = &(sp->s_mon);
69 efsys_mem_t *esmp = &(smp->sm_mem);
80 ASSERT(mutex_owned(&(smp->sm_lock)));
82 if (smp->sm_state != SFXGE_MON_STARTED)
85 if (smp->sm_polling) {
86 rc = efx_mon_stats_update(enp, esmp, smp->sm_statbuf);
91 knp = smp->sm_stat;
95 knp->value.ui64 = smp->sm_statbuf[sn].emsv_value;
104 knp->value.ui32 = smp->sm_polling;
121 sfxge_mon_t *smp = &(sp->s_mon);
132 if ((smp->sm_statbuf = kmem_zalloc(sizeof (uint32_t) * EFX_MON_NSTATS,
157 smp->sm_ksp = ksp;
161 ksp->ks_lock = &(smp->sm_lock);
164 smp->sm_stat = knp = ksp->ks_data;
187 kmem_free(smp->sm_statbuf, sizeof (uint32_t) * EFX_MON_NSTATS);
197 sfxge_mon_t *smp = &(sp->s_mon);
200 kstat_delete(smp->sm_ksp);
201 smp->sm_ksp = NULL;
202 smp->sm_stat = NULL;
204 kmem_free(smp->sm_statbuf, sizeof (uint32_t) * EFX_MON_NSTATS);
210 sfxge_mon_t *smp = &(sp->s_mon);
212 efsys_mem_t *esmp = &(smp->sm_mem);
217 SFXGE_OBJ_CHECK(smp, sfxge_mon_t);
219 ASSERT3U(smp->sm_state, ==, SFXGE_MON_UNINITIALIZED);
221 smp->sm_sp = sp;
223 mutex_init(&(smp->sm_lock), NULL, MUTEX_DRIVER, NULL);
238 smp->sm_type = encp->enc_mon_type;
240 DTRACE_PROBE1(mon, efx_mon_type_t, smp->sm_type);
242 smp->sm_state = SFXGE_MON_INITIALIZED;
258 mutex_destroy(&(smp->sm_lock));
260 smp->sm_sp = NULL;
262 SFXGE_OBJ_CHECK(smp, sfxge_mac_t);
270 sfxge_mon_t *smp = &(sp->s_mon);
273 mutex_enter(&(smp->sm_lock));
274 ASSERT3U(smp->sm_state, ==, SFXGE_MON_INITIALIZED);
280 smp->sm_state = SFXGE_MON_STARTED;
282 mutex_exit(&(smp->sm_lock));
289 mutex_exit(&(smp->sm_lock));
297 sfxge_mon_t *smp = &(sp->s_mon);
299 mutex_enter(&(smp->sm_lock));
301 ASSERT3U(smp->sm_state, ==, SFXGE_MON_STARTED);
302 smp->sm_state = SFXGE_MON_INITIALIZED;
307 mutex_exit(&(smp->sm_lock));
313 sfxge_mon_t *smp = &(sp->s_mon);
314 efsys_mem_t *esmp = &(smp->sm_mem);
316 ASSERT3U(smp->sm_state, ==, SFXGE_MON_INITIALIZED);
321 smp->sm_state = SFXGE_MON_UNINITIALIZED;
322 mutex_destroy(&(smp->sm_lock));
324 smp->sm_sp = NULL;
325 smp->sm_type = EFX_MON_INVALID;
330 SFXGE_OBJ_CHECK(smp, sfxge_mon_t);