pktgen.c (90149031325c06fadc806720d57171aacc74a5d7) pktgen.c (769afb3fda06b109d524257b46b0416ccf6ea6b2)
1// SPDX-License-Identifier: GPL-2.0-or-later
2/*
3 * Authors:
4 * Copyright 2001, 2002 by Robert Olsson <robert.olsson@its.uu.se>
5 * Uppsala University and
6 * Swedish University of Agricultural Sciences
7 *
8 * Alexey Kuznetsov <kuznet@ms2.inr.ac.ru>

--- 681 unchanged lines hidden (view full) ---

690 idle = pkt_dev->idle_acc;
691 do_div(idle, NSEC_PER_USEC);
692
693 seq_printf(seq,
694 "Current:\n pkts-sofar: %llu errors: %llu\n",
695 (unsigned long long)pkt_dev->sofar,
696 (unsigned long long)pkt_dev->errors);
697
1// SPDX-License-Identifier: GPL-2.0-or-later
2/*
3 * Authors:
4 * Copyright 2001, 2002 by Robert Olsson <robert.olsson@its.uu.se>
5 * Uppsala University and
6 * Swedish University of Agricultural Sciences
7 *
8 * Alexey Kuznetsov <kuznet@ms2.inr.ac.ru>

--- 681 unchanged lines hidden (view full) ---

690 idle = pkt_dev->idle_acc;
691 do_div(idle, NSEC_PER_USEC);
692
693 seq_printf(seq,
694 "Current:\n pkts-sofar: %llu errors: %llu\n",
695 (unsigned long long)pkt_dev->sofar,
696 (unsigned long long)pkt_dev->errors);
697
698 if (pkt_dev->n_imix_entries > 0) {
699 int i;
700
701 seq_puts(seq, " imix_size_counts: ");
702 for (i = 0; i < pkt_dev->n_imix_entries; i++) {
703 seq_printf(seq, "%llu,%llu ",
704 pkt_dev->imix_entries[i].size,
705 pkt_dev->imix_entries[i].count_so_far);
706 }
707 seq_puts(seq, "\n");
708 }
709
698 seq_printf(seq,
699 " started: %lluus stopped: %lluus idle: %lluus\n",
700 (unsigned long long) ktime_to_us(pkt_dev->started_at),
701 (unsigned long long) ktime_to_us(stopped),
702 (unsigned long long) idle);
703
704 seq_printf(seq,
705 " seq_num: %d cur_dst_mac_offset: %d cur_src_mac_offset: %d\n",

--- 2566 unchanged lines hidden (view full) ---

3272 (unsigned long long)ktime_to_us(ktime_sub(elapsed, idle)),
3273 (unsigned long long)ktime_to_us(idle),
3274 (unsigned long long)pkt_dev->sofar,
3275 pkt_dev->cur_pkt_size, nr_frags);
3276
3277 pps = div64_u64(pkt_dev->sofar * NSEC_PER_SEC,
3278 ktime_to_ns(elapsed));
3279
710 seq_printf(seq,
711 " started: %lluus stopped: %lluus idle: %lluus\n",
712 (unsigned long long) ktime_to_us(pkt_dev->started_at),
713 (unsigned long long) ktime_to_us(stopped),
714 (unsigned long long) idle);
715
716 seq_printf(seq,
717 " seq_num: %d cur_dst_mac_offset: %d cur_src_mac_offset: %d\n",

--- 2566 unchanged lines hidden (view full) ---

3284 (unsigned long long)ktime_to_us(ktime_sub(elapsed, idle)),
3285 (unsigned long long)ktime_to_us(idle),
3286 (unsigned long long)pkt_dev->sofar,
3287 pkt_dev->cur_pkt_size, nr_frags);
3288
3289 pps = div64_u64(pkt_dev->sofar * NSEC_PER_SEC,
3290 ktime_to_ns(elapsed));
3291
3280 bps = pps * 8 * pkt_dev->cur_pkt_size;
3292 if (pkt_dev->n_imix_entries > 0) {
3293 int i;
3294 struct imix_pkt *entry;
3281
3295
3296 bps = 0;
3297 for (i = 0; i < pkt_dev->n_imix_entries; i++) {
3298 entry = &pkt_dev->imix_entries[i];
3299 bps += entry->size * entry->count_so_far;
3300 }
3301 bps = div64_u64(bps * 8 * NSEC_PER_SEC, ktime_to_ns(elapsed));
3302 } else {
3303 bps = pps * 8 * pkt_dev->cur_pkt_size;
3304 }
3305
3282 mbps = bps;
3283 do_div(mbps, 1000000);
3284 p += sprintf(p, " %llupps %lluMb/sec (%llubps) errors: %llu",
3285 (unsigned long long)pps,
3286 (unsigned long long)mbps,
3287 (unsigned long long)bps,
3288 (unsigned long long)pkt_dev->errors);
3289}

--- 727 unchanged lines hidden ---
3306 mbps = bps;
3307 do_div(mbps, 1000000);
3308 p += sprintf(p, " %llupps %lluMb/sec (%llubps) errors: %llu",
3309 (unsigned long long)pps,
3310 (unsigned long long)mbps,
3311 (unsigned long long)bps,
3312 (unsigned long long)pkt_dev->errors);
3313}

--- 727 unchanged lines hidden ---