[ethtool] 05/24: Fix formatting of RX flow hash indirection table when size % 8 != 0

debian-kernel at lists.debian.org debian-kernel at lists.debian.org
Fri Oct 9 03:48:40 UTC 2015


This is an automated email from the git hooks/post-receive script.

benh pushed a commit to branch master
in repository ethtool.

commit 530765b7e1ed3e9b38ed81984073645367b2a0fc
Author: Ben Hutchings <ben at decadent.org.uk>
Date:   Sun Apr 5 03:00:52 2015 +0100

    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 at mellanox.com>
    Signed-off-by: Ben Hutchings <ben at decadent.org.uk>
---
 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);
 	}
 }

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/kernel/ethtool.git



More information about the Kernel-svn-changes mailing list