Lines Matching refs:dlcosmk_data
103 dlcosmk_data_t *dlcosmk_data;
113 if ((dlcosmk_data = kmem_zalloc(DLCOSMK_DATA_SZ, KM_NOSLEEP)) == NULL) {
124 kmem_free(dlcosmk_data, DLCOSMK_DATA_SZ);
127 if ((dlcosmk_data->next_action =
131 kmem_free(dlcosmk_data, DLCOSMK_DATA_SZ);
137 &dlcosmk_data->usr_pri)) != 0) {
141 kmem_free(dlcosmk_data, DLCOSMK_DATA_SZ);
150 kmem_free(dlcosmk_data, DLCOSMK_DATA_SZ);
153 dlcosmk_data->b_band = param;
160 kmem_free(dlcosmk_data, DLCOSMK_DATA_SZ);
163 dlcosmk_data->dl_max = param;
168 dlcosmk_data->gather_stats = B_FALSE;
171 dlcosmk_data->gather_stats = (bstats != 0) ? B_TRUE : B_FALSE;
172 if (dlcosmk_data->gather_stats) {
173 if ((err = dlcosmk_statinit(aid, dlcosmk_data)) != 0) {
175 kmem_free(dlcosmk_data, DLCOSMK_DATA_SZ);
185 if ((err = ipp_action_ref(aid, dlcosmk_data->next_action,
189 ipp_stat_destroy(dlcosmk_data->stats);
190 kmem_free(dlcosmk_data, DLCOSMK_DATA_SZ);
194 ipp_action_set_ptr(aid, (void *)dlcosmk_data);
208 dlcosmk_data_t *dlcosmk_data;
231 dlcosmk_data = (dlcosmk_data_t *)ipp_action_get_ptr(aid);
232 ASSERT(dlcosmk_data != NULL);
253 err = ipp_action_unref(aid, dlcosmk_data->next_action, flags);
255 dlcosmk_data->next_action = next_action;
280 dlcosmk_data->usr_pri = cos;
281 dlcosmk_data->b_band = band;
282 dlcosmk_data->dl_max = dlpri;
291 if (!dlcosmk_data->gather_stats && val) {
292 if ((err = dlcosmk_statinit(aid, dlcosmk_data)) != 0) {
297 } else if (!val && dlcosmk_data->gather_stats) {
298 ipp_stat_destroy(dlcosmk_data->stats);
301 dlcosmk_data->gather_stats = val;
312 dlcosmk_data_t *dlcosmk_data;
315 dlcosmk_data = (dlcosmk_data_t *)ipp_action_get_ptr(aid);
316 ASSERT(dlcosmk_data != NULL);
319 if (dlcosmk_data->gather_stats) {
320 ipp_stat_destroy(dlcosmk_data->stats);
324 err = ipp_action_unref(aid, dlcosmk_data->next_action, flags);
327 kmem_free(dlcosmk_data, DLCOSMK_DATA_SZ);
334 dlcosmk_data_t *dlcosmk_data;
345 dlcosmk_data = (dlcosmk_data_t *)ipp_action_get_ptr(aid);
346 ASSERT(dlcosmk_data != NULL);
349 if ((err = dlcosmk_process(&mp, dlcosmk_data, priv->ill_index,
354 return (ipp_packet_next(packet, dlcosmk_data->next_action));
359 dlcosmk_statinit(ipp_action_id_t aid, dlcosmk_data_t *dlcosmk_data)
366 DLCOSMK_STATS_COUNT, dlcosmk_update_stats, dlcosmk_data,
367 &dlcosmk_data->stats)) != 0) {
373 statp = (dlcosmk_stat_t *)(dlcosmk_data->stats)->ipps_data;
376 if ((err = ipp_stat_named_init(dlcosmk_data->stats, "npackets",
383 if ((err = ipp_stat_named_init(dlcosmk_data->stats, "ipackets",
390 if ((err = ipp_stat_named_init(dlcosmk_data->stats, "epackets",
397 if ((err = ipp_stat_named_init(dlcosmk_data->stats, "usr_pri",
404 if ((err = ipp_stat_named_init(dlcosmk_data->stats, "b_band",
411 if ((err = ipp_stat_named_init(dlcosmk_data->stats, "dl_max",
418 ipp_stat_install(dlcosmk_data->stats);
425 dlcosmk_data_t *dlcosmk_data = (dlcosmk_data_t *)arg;
429 ASSERT(dlcosmk_data != NULL);
432 upri = dlcosmk_data->usr_pri;
433 bband = dlcosmk_data->b_band;
435 (void) ipp_stat_named_op(&snames->npackets, &dlcosmk_data->npackets,
437 (void) ipp_stat_named_op(&snames->ipackets, &dlcosmk_data->ipackets,
439 (void) ipp_stat_named_op(&snames->epackets, &dlcosmk_data->epackets,
443 (void) ipp_stat_named_op(&snames->dl_max, &dlcosmk_data->dl_max, rw);
454 dlcosmk_data_t *dlcosmk_data;
460 dlcosmk_data = (dlcosmk_data_t *)ipp_action_get_ptr(aid);
461 ASSERT(dlcosmk_data != NULL);
470 if ((err = ipp_action_name(dlcosmk_data->next_action,
497 if ((err = nvlist_add_byte(nvlp, DLCOSMK_COS, dlcosmk_data->usr_pri))
506 (dlcosmk_data->gather_stats ? 1 : 0))) != 0) {