[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <1428200099.11260.140.camel@decadent.org.uk>
Date: Sun, 05 Apr 2015 03:14:59 +0100
From: Ben Hutchings <ben@...adent.org.uk>
To: Amir Vadai <amirv@...lanox.com>
Cc: netdev@...r.kernel.org, Or Gerlitz <ogerlitz@...lanox.com>,
Yevgeny Petrilin <yevgenyp@...lanox.com>,
Saeed Mahameed <saeedm@...lanox.com>,
Eyal Perry <eyalpe@...lanox.com>
Subject: [PATCH ethtool] Fix formatting of RX flow hash indirection table
when size % 8 != 0
We only print a new-line after every 8 entries, but we need one
at the end of the table even if the table size is not a multiple
of 8.
Reported-by: Amir Vadai <amirv@...lanox.com>
Signed-off-by: Ben Hutchings <ben@...adent.org.uk>
---
This is what I've applied - hope it works for you as I don't have a test
case.
Ben.
ethtool.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/ethtool.c b/ethtool.c
index bf583f3..996efb9 100644
--- a/ethtool.c
+++ b/ethtool.c
@@ -3126,7 +3126,7 @@ static void print_indir_table(struct cmd_context *ctx,
if (i % 8 == 0)
printf("%5u: ", i);
printf(" %5u", indir[i]);
- if (i % 8 == 7)
+ if (i % 8 == 7 || i == indir_size - 1)
fputc('\n', stdout);
}
}
--
Ben Hutchings
Quantity is no substitute for quality, but it's the only one we've got.
Download attachment "signature.asc" of type "application/pgp-signature" (812 bytes)
Powered by blists - more mailing lists