diff options
-rw-r--r-- | ifpps.c | 9 |
1 files changed, 7 insertions, 2 deletions
@@ -227,6 +227,7 @@ static int stats_proc_interrupts(char *ifname, struct ifstat *stats) { int ret = -EINVAL, i, cpus, try = 0; char *ptr, *buff; + bool seen = false; size_t buff_len; struct ethtool_drvinfo drvinf; FILE *fp; @@ -249,16 +250,20 @@ retry: if (strstr(buff, ifname) == NULL) continue; + /* XXX: remove this one here */ stats->irq_nr = strtol(ptr, &ptr, 10); bug_on(stats->irq_nr == 0); if (ptr) ptr++; for (i = 0; i < cpus && ptr; ++i) { - stats->irqs[i] = strtol(ptr, &ptr, 10); + if (seen) + stats->irqs[i] += strtol(ptr, &ptr, 10); + else + stats->irqs[i] = strtol(ptr, &ptr, 10); if (i == cpus - 1) { ret = 0; - goto done; + seen = true; } } |