Lines Matching refs:band
236 struct dp_meter_band *band; in ovs_meter_cmd_reply_stats() local
254 band = meter->bands; in ovs_meter_cmd_reply_stats()
256 for (i = 0; i < meter->n_bands; ++i, ++band) { in ovs_meter_cmd_reply_stats()
262 &band->stats)) in ovs_meter_cmd_reply_stats()
332 struct dp_meter_band *band; in dp_meter_create() local
360 band = meter->bands; in dp_meter_create()
378 band->type = nla_get_u32(attr[OVS_BAND_ATTR_TYPE]); in dp_meter_create()
379 band->rate = nla_get_u32(attr[OVS_BAND_ATTR_RATE]); in dp_meter_create()
380 if (band->rate == 0) { in dp_meter_create()
385 band->burst_size = nla_get_u32(attr[OVS_BAND_ATTR_BURST]); in dp_meter_create()
392 band->bucket = band->burst_size * 1000ULL; in dp_meter_create()
393 band_max_delta_t = div_u64(band->bucket, band->rate); in dp_meter_create()
396 band++; in dp_meter_create()
597 struct dp_meter_band *band; in ovs_meter_execute() local
650 band = &meter->bands[i]; in ovs_meter_execute()
651 max_bucket_size = band->burst_size * 1000LL; in ovs_meter_execute()
653 band->bucket += delta_ms * band->rate; in ovs_meter_execute()
654 if (band->bucket > max_bucket_size) in ovs_meter_execute()
655 band->bucket = max_bucket_size; in ovs_meter_execute()
657 if (band->bucket >= cost) { in ovs_meter_execute()
658 band->bucket -= cost; in ovs_meter_execute()
659 } else if (band->rate > band_exceeded_rate) { in ovs_meter_execute()
660 band_exceeded_rate = band->rate; in ovs_meter_execute()
667 band = &meter->bands[band_exceeded_max]; in ovs_meter_execute()
668 band->stats.n_packets += 1; in ovs_meter_execute()
669 band->stats.n_bytes += skb->len; in ovs_meter_execute()
672 if (band->type == OVS_METER_BAND_TYPE_DROP) { in ovs_meter_execute()