Lines Matching refs:cfg_parms

107 	tswtcl_cfg_t *cfg_parms;
116 if ((cfg_parms = kmem_alloc(TSWTCL_CFG_SZ, KM_NOSLEEP)) == NULL) {
127 kmem_free(cfg_parms, TSWTCL_CFG_SZ);
130 if ((cfg_parms->red_action = ipp_action_lookup(next_action))
134 kmem_free(cfg_parms, TSWTCL_CFG_SZ);
144 kmem_free(cfg_parms, TSWTCL_CFG_SZ);
147 if ((cfg_parms->yellow_action = ipp_action_lookup(next_action))
151 kmem_free(cfg_parms, TSWTCL_CFG_SZ);
161 kmem_free(cfg_parms, TSWTCL_CFG_SZ);
164 if ((cfg_parms->green_action = ipp_action_lookup(next_action))
168 kmem_free(cfg_parms, TSWTCL_CFG_SZ);
174 &cfg_parms->committed_rate)) != 0) {
178 kmem_free(cfg_parms, TSWTCL_CFG_SZ);
184 &cfg_parms->peak_rate)) != 0) {
188 kmem_free(cfg_parms, TSWTCL_CFG_SZ);
192 if (cfg_parms->peak_rate < cfg_parms->committed_rate) {
196 kmem_free(cfg_parms, TSWTCL_CFG_SZ);
202 &cfg_parms->window)) != 0) {
206 kmem_free(cfg_parms, TSWTCL_CFG_SZ);
210 cfg_parms->nsecwindow = (uint64_t)cfg_parms->window *
216 cfg_parms->stats = B_FALSE;
218 cfg_parms->stats = (boolean_t)bstats;
226 kmem_free(cfg_parms, TSWTCL_CFG_SZ);
230 if (cfg_parms->stats) {
232 kmem_free(cfg_parms, TSWTCL_CFG_SZ);
239 if ((rc = ipp_action_ref(aid, cfg_parms->red_action, flags)) != 0) {
244 if ((rc = ipp_action_ref(aid, cfg_parms->yellow_action, flags)) != 0) {
247 rc2 = ipp_action_unref(aid, cfg_parms->red_action, flags);
251 if ((rc = ipp_action_ref(aid, cfg_parms->green_action, flags)) != 0) {
254 rc2 = ipp_action_unref(aid, cfg_parms->red_action, flags);
256 rc2 = ipp_action_unref(aid, cfg_parms->yellow_action, flags);
262 cfg_parms->pminusc = cfg_parms->peak_rate - cfg_parms->committed_rate;
263 tswtcl_data->cfg_parms = cfg_parms;
264 tswtcl_data->avg_rate = cfg_parms->committed_rate;
272 if (cfg_parms->stats) {
275 kmem_free(cfg_parms, TSWTCL_CFG_SZ);
291 tswtcl_cfg_t *cfg_parms, *old_cfg;
313 old_cfg = tswtcl_data->cfg_parms;
315 cfg_parms = kmem_alloc(TSWTCL_CFG_SZ, KM_NOSLEEP);
316 if (cfg_parms == NULL) {
323 bcopy(old_cfg, cfg_parms, TSWTCL_CFG_SZ);
334 kmem_free(cfg_parms, TSWTCL_CFG_SZ);
337 cfg_parms->red_action = next_action;
349 kmem_free(cfg_parms, TSWTCL_CFG_SZ);
352 cfg_parms->yellow_action = next_action;
364 kmem_free(cfg_parms, TSWTCL_CFG_SZ);
367 cfg_parms->green_action = next_action;
373 cfg_parms->committed_rate = rate;
379 cfg_parms->peak_rate = rate;
382 if (cfg_parms->peak_rate < cfg_parms->committed_rate) {
386 kmem_free(cfg_parms, TSWTCL_CFG_SZ);
392 &cfg_parms->window)) != 0) {
393 cfg_parms->nsecwindow = (uint64_t)cfg_parms->window *
399 cfg_parms->stats = (boolean_t)bstats;
400 if (cfg_parms->stats && !old_cfg->stats) {
403 kmem_free(cfg_parms, TSWTCL_CFG_SZ);
406 } else if (!cfg_parms->stats && old_cfg->stats) {
412 if ((err = ipp_action_ref(aid, cfg_parms->red_action, flags)) != 0) {
415 kmem_free(cfg_parms, TSWTCL_CFG_SZ);
419 if ((err = ipp_action_ref(aid, cfg_parms->yellow_action, flags)) != 0) {
422 err2 = ipp_action_unref(aid, cfg_parms->red_action, flags);
424 kmem_free(cfg_parms, TSWTCL_CFG_SZ);
428 if ((err = ipp_action_ref(aid, cfg_parms->green_action, flags)) != 0) {
431 err2 = ipp_action_unref(aid, cfg_parms->red_action, flags);
433 err2 = ipp_action_unref(aid, cfg_parms->yellow_action, flags);
435 kmem_free(cfg_parms, TSWTCL_CFG_SZ);
440 cfg_parms->pminusc = cfg_parms->peak_rate - cfg_parms->committed_rate;
444 tswtcl_data->cfg_parms = cfg_parms;
467 tswtcl_cfg_t *cfg_parms;
473 cfg_parms = tswtcl_data->cfg_parms;
475 if (cfg_parms->stats) {
480 rc = ipp_action_unref(aid, cfg_parms->red_action, flags);
482 rc = ipp_action_unref(aid, cfg_parms->yellow_action, flags);
484 rc = ipp_action_unref(aid, cfg_parms->green_action, flags);
488 kmem_free(cfg_parms, TSWTCL_CFG_SZ);
613 tswtcl_cfg_t *cfg_parms;
620 cfg_parms = tswtcl_data->cfg_parms;
629 if ((rc = ipp_action_name(cfg_parms->red_action, &next_action)) != 0) {
648 if ((rc = ipp_action_name(cfg_parms->yellow_action,
667 if ((rc = ipp_action_name(cfg_parms->green_action,
695 cfg_parms->committed_rate)) != 0) {
703 cfg_parms->peak_rate)) != 0) {
711 cfg_parms->window)) != 0) {