Lines Matching defs:rc
130 int rc, rc2;
143 if ((rc = nvlist_lookup_string(nvlp, TOKENMT_RED_ACTION_NAME,
149 return (rc);
160 if ((rc = nvlist_lookup_string(nvlp, TOKENMT_YELLOW_ACTION_NAME,
175 if ((rc = nvlist_lookup_string(nvlp, TOKENMT_GREEN_ACTION_NAME,
181 return (rc);
192 if ((rc = nvlist_lookup_uint32(nvlp, TOKENMT_COMMITTED_RATE,
198 return (rc);
209 if ((rc = nvlist_lookup_uint32(nvlp, TOKENMT_COMMITTED_BURST,
215 return (rc);
223 if ((rc = nvlist_lookup_uint32(nvlp, TOKENMT_PEAK_BURST,
241 if ((rc = nvlist_lookup_uint32(nvlp, TOKENMT_PEAK_RATE,
288 if ((rc = nvlist_lookup_uint32(nvlp, TOKENMT_COLOUR_AWARE,
297 if ((rc = nvlist_lookup_int32_array(nvlp,
310 if ((rc = nvlist_lookup_uint32(nvlp, IPP_ACTION_STATS_ENABLE, &bstats))
328 if ((rc = tokenmt_statinit(aid, tokenmt_data)) != 0) {
331 return (rc);
336 if ((rc = ipp_action_ref(aid, cfg_parms->red_action, flags)) != 0) {
338 "returned with error %d", rc));
341 if ((rc = ipp_action_ref(aid, cfg_parms->green_action, flags)) != 0) {
343 "returned with error %d", rc));
350 if ((rc = ipp_action_ref(aid, cfg_parms->yellow_action,
353 "returned with error %d", rc));
381 return (rc);
653 int rc;
665 rc = ipp_action_unref(aid, cfg_parms->red_action, flags);
666 ASSERT(rc == 0);
668 rc = ipp_action_unref(aid, cfg_parms->yellow_action, flags);
669 ASSERT(rc == 0);
671 rc = ipp_action_unref(aid, cfg_parms->green_action, flags);
672 ASSERT(rc == 0);
686 int rc;
694 if ((rc = tokenmt_process(&mp, tokenmt_data, &next_action)) != 0) {
695 return (rc);
704 int rc = 0;
708 if ((rc = ipp_stat_create(aid, TOKENMT_STATS_STRING, METER_STATS_COUNT,
711 " with %d\n", rc));
712 return (rc);
718 if ((rc = ipp_stat_named_init(tokenmt_data->stats, "red_packets",
721 " with %d\n", rc));
722 return (rc);
724 if ((rc = ipp_stat_named_init(tokenmt_data->stats, "yellow_packets",
727 " with %d\n", rc));
728 return (rc);
730 if ((rc = ipp_stat_named_init(tokenmt_data->stats, "green_packets",
733 " with %d\n", rc));
734 return (rc);
736 if ((rc = ipp_stat_named_init(tokenmt_data->stats, "red_bits",
739 " with %d\n", rc));
740 return (rc);
742 if ((rc = ipp_stat_named_init(tokenmt_data->stats, "yellow_bits",
745 " with %d\n", rc));
746 return (rc);
748 if ((rc = ipp_stat_named_init(tokenmt_data->stats, "green_bits",
751 " with %d\n", rc));
752 return (rc);
754 if ((rc = ipp_stat_named_init(tokenmt_data->stats, "epackets",
757 " with %d\n", rc));
758 return (rc);
763 return (rc);
802 int rc;
810 if ((rc = nvlist_alloc(&nvlp, NV_UNIQUE_NAME, KM_NOSLEEP)) != 0) {
812 return (rc);
816 if ((rc = ipp_action_name(cfg_parms->red_action, &next_action)) != 0) {
819 return (rc);
823 if ((rc = nvlist_add_string(nvlp, TOKENMT_RED_ACTION_NAME,
828 return (rc);
837 if ((rc = ipp_action_name(cfg_parms->yellow_action,
842 return (rc);
845 if ((rc = nvlist_add_string(nvlp, TOKENMT_YELLOW_ACTION_NAME,
851 return (rc);
858 if ((rc = ipp_action_name(cfg_parms->green_action,
862 return (rc);
866 if ((rc = nvlist_add_string(nvlp, TOKENMT_GREEN_ACTION_NAME,
871 return (rc);
878 if ((rc = nvlist_add_byte(nvlp, IPP_CONFIG_TYPE, IPP_SET)) != 0) {
881 return (rc);
885 if ((rc = nvlist_add_uint32(nvlp, TOKENMT_COMMITTED_RATE,
889 return (rc);
894 if ((rc = nvlist_add_uint32(nvlp, TOKENMT_PEAK_RATE,
898 return (rc);
903 if ((rc = nvlist_add_uint32(nvlp, TOKENMT_COMMITTED_BURST,
907 return (rc);
912 if ((rc = nvlist_add_uint32(nvlp, TOKENMT_PEAK_BURST,
917 return (rc);
922 if ((rc = nvlist_add_uint32(nvlp, TOKENMT_COLOUR_AWARE,
926 return (rc);
932 if ((rc = nvlist_add_int32_array(nvlp, TOKENMT_COLOUR_MAP,
937 return (rc);
941 if ((rc = nvlist_add_uint32(nvlp, IPP_ACTION_STATS_ENABLE,
945 return (rc);
949 rc = fn(nvlp, arg);
952 return (rc);