Lines Matching defs:qstats
169 struct hbm_queue_stats qstats = {0};
190 qstats.rate = rate;
191 qstats.stats = stats_flag ? 1 : 0;
192 qstats.loopback = loopback_flag ? 1 : 0;
193 qstats.no_cn = no_cn_flag ? 1 : 0;
194 if (bpf_map_update_elem(map_fd, &key, &qstats, BPF_ANY)) {
217 bpf_map_lookup_elem(map_fd, &key, &qstats);
225 last_cg_tx_bytes = qstats.bytes_total;
246 bpf_map_lookup_elem(map_fd, &key, &qstats);
247 new_cg_tx_bytes = qstats.bytes_total;
277 qstats.rate = rate;
291 qstats.rate = rate;
293 if (bpf_map_update_elem(map_fd, &key, &qstats, BPF_ANY))
300 if (stats_flag && bpf_map_lookup_elem(map_fd, &key, &qstats)) {
312 } else if (stats_flag && qstats.lastPacketTime >
313 qstats.firstPacketTime) {
314 long long delta_us = (qstats.lastPacketTime -
315 qstats.firstPacketTime)/1000;
316 unsigned int rate_mbps = ((qstats.bytes_total -
317 qstats.bytes_dropped) * 8 /
340 (qstats.lastPacketTime - qstats.firstPacketTime) /
342 fprintf(fout, "packets:%d\n", (int)qstats.pkts_total);
343 fprintf(fout, "bytes_MB:%d\n", (int)(qstats.bytes_total /
345 fprintf(fout, "pkts_dropped:%d\n", (int)qstats.pkts_dropped);
347 (int)(qstats.bytes_dropped /
350 percent_pkts = (qstats.pkts_marked * 100.0) /
351 (qstats.pkts_total + 1);
352 percent_bytes = (qstats.bytes_marked * 100.0) /
353 (qstats.bytes_total + 1);
358 percent_pkts = (qstats.pkts_dropped * 100.0) /
359 (qstats.pkts_total + 1);
360 percent_bytes = (qstats.bytes_dropped * 100.0) /
361 (qstats.bytes_total + 1);
366 percent_pkts = (qstats.pkts_ecn_ce * 100.0) /
367 (qstats.pkts_total + 1);
369 (int)qstats.pkts_ecn_ce);
373 (int)(qstats.sum_cwnd / (qstats.sum_cwnd_cnt + 1)));
376 (int)(qstats.sum_rtt / (qstats.pkts_total + 1)));
380 (qstats.sum_credit /
381 (qstats.pkts_total + 1.0)) / 1000000.0);
384 (int)(qstats.sum_credit /
385 (1500 * ((int)qstats.pkts_total ) + 1)));
389 percent_pkts = (qstats.returnValCount[k] * 100.0) /
390 (qstats.pkts_total + 1);
392 percent_pkts, (int)qstats.returnValCount[k]);