Lines Matching defs:dres
762 zs_link_add_usage(struct zs_datalink *dres, struct zs_datalink *dold,
767 dres->zsl_rbytes = MAX(dold->zsl_rbytes, dnew->zsl_rbytes);
768 dres->zsl_obytes = MAX(dold->zsl_obytes, dnew->zsl_obytes);
769 dres->zsl_prbytes = MAX(dold->zsl_prbytes, dnew->zsl_prbytes);
770 dres->zsl_pobytes = MAX(dold->zsl_pobytes, dnew->zsl_pobytes);
771 dres->zsl_speed = MAX(dold->zsl_speed, dnew->zsl_speed);
777 dres->zsl_rbytes += dnew->zsl_rbytes;
778 dres->zsl_obytes += dnew->zsl_obytes;
779 dres->zsl_prbytes += dnew->zsl_prbytes;
780 dres->zsl_pobytes += dnew->zsl_pobytes;
781 dres->zsl_hrtime += dnew->zsl_hrtime;
790 zs_usage_compute_vlink_usage(struct zs_datalink *dres, struct zs_datalink *dold,
816 if (dres != dnew) {
823 if (dres == dold)
828 list_insert_tail(&dres->zsl_vlink_list,
830 if (zs_update_link_zone(dres, dures,
855 if (dres == dold) {
857 } else if (dres == dnew) {
865 list_insert_tail(&dres->zsl_vlink_list, dures);
885 dres->zsl_total_rbytes += dures->zsl_rbytes;
886 dres->zsl_total_obytes += dures->zsl_obytes;
887 dres->zsl_total_prbytes += dures->zsl_prbytes;
888 dres->zsl_total_pobytes += dures->zsl_pobytes;
890 if (zs_update_link_zone(dres, dures, B_TRUE) != 0)
901 if (dres != dnew) {
907 list_insert_tail(&dres->zsl_vlink_list, dures);
913 dres->zsl_total_rbytes += dunew->zsl_rbytes;
914 dres->zsl_total_obytes += dunew->zsl_obytes;
915 dres->zsl_total_prbytes += dunew->zsl_prbytes;
916 dres->zsl_total_pobytes += dunew->zsl_pobytes;
918 if (zs_update_link_zone(dres, dures, B_TRUE) != 0)
930 struct zs_datalink *dold, *dnew, *dres;
955 dres = (struct zs_datalink *)calloc(1,
957 if (dres == NULL)
959 *dres = *dnew;
960 dres->zsl_intervals = 0;
961 list_create(&dres->zsl_vlink_list,
964 list_create(&dres->zsl_zone_list,
970 dold, dres);
973 &ures->zsu_datalink_list, dres);
975 dres = dnew;
983 (strcmp(dres->zsl_state, "up") == 0 ||
984 strcmp(dres->zsl_state, "n/a") == 0))
985 dres->zsl_intervals++;
986 if (zs_usage_compute_vlink_usage(dres, dold, dnew,
1003 dres = dold;
1005 dres = dnew;
1007 dres = (struct zs_datalink *)calloc(1,
1009 if (dres == NULL)
1011 *dres = *dnew;
1012 list_create(&dres->zsl_vlink_list,
1015 list_create(&dres->zsl_zone_list,
1018 list_insert_tail(&ures->zsu_datalink_list, dres);
1024 (strcmp(dres->zsl_state, "up") == 0 ||
1025 strcmp(dres->zsl_state, "n/a") == 0))
1026 dres->zsl_intervals++;
1032 dres->zsl_total_rbytes = 0;
1033 dres->zsl_total_obytes = 0;
1034 dres->zsl_total_prbytes = 0;
1035 dres->zsl_total_pobytes = 0;
1037 dres->zsl_rbytes = dnew->zsl_rbytes - dold->zsl_rbytes;
1038 dres->zsl_obytes = dnew->zsl_obytes - dold->zsl_obytes;
1039 dres->zsl_prbytes = dnew->zsl_prbytes -
1041 dres->zsl_pobytes = dnew->zsl_pobytes -
1043 dres->zsl_hrtime = dnew->zsl_hrtime -
1047 dres->zsl_total_rbytes += dres->zsl_rbytes;
1048 dres->zsl_total_obytes += dres->zsl_obytes;
1049 dres->zsl_total_prbytes += dres->zsl_prbytes;
1050 dres->zsl_total_pobytes += dres->zsl_pobytes;
1052 if (zs_update_link_zone(dres, dres, B_FALSE) != 0)
1055 zs_link_add_usage(dres, dold, dnew, func);
1057 if (zs_usage_compute_vlink_usage(dres, dold, dnew, func)
1067 dres = (struct zs_datalink *)calloc(1,
1069 if (dres == NULL)
1071 *dres = *dnew;
1072 list_create(&dres->zsl_vlink_list,
1075 list_create(&dres->zsl_zone_list,
1083 (strcmp(dres->zsl_state, "up") == 0 ||
1084 strcmp(dres->zsl_state, "n/a") == 0))
1085 dres->zsl_intervals++;
1086 list_insert_tail(&ures->zsu_datalink_list, dres);
1088 dres->zsl_total_rbytes += dnew->zsl_rbytes;
1089 dres->zsl_total_obytes += dnew->zsl_obytes;
1090 dres->zsl_total_prbytes += dnew->zsl_prbytes;
1091 dres->zsl_total_pobytes += dnew->zsl_pobytes;
1093 if (zs_usage_compute_vlink_usage(dres, NULL, dnew, func)
1097 if (zs_update_link_zone(dres, dres, B_FALSE) != 0)