netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Ben Hutchings <ben@decadent.org.uk>
To: Amir Vadai <amirv@mellanox.com>
Cc: netdev@vger.kernel.org, Or Gerlitz <ogerlitz@mellanox.com>,
	Yevgeny Petrilin <yevgenyp@mellanox.com>,
	Saeed Mahameed <saeedm@mellanox.com>,
	Eyal Perry <eyalpe@mellanox.com>
Subject: [PATCH ethtool] Fix formatting of RX flow hash indirection table when size % 8 != 0
Date: Sun, 05 Apr 2015 03:14:59 +0100	[thread overview]
Message-ID: <1428200099.11260.140.camel@decadent.org.uk> (raw)
In-Reply-To: <1428199259.11260.137.camel@decadent.org.uk>

[-- Attachment #1: Type: text/plain, Size: 852 bytes --]

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@mellanox.com>
Signed-off-by: Ben Hutchings <ben@decadent.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.

[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 811 bytes --]

  reply	other threads:[~2015-04-05  2:15 UTC|newest]

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-01-25 13:51 [PATCH ethtool 0/5] RSS improvements + new speeds Amir Vadai
2015-01-25 13:51 ` [PATCH ethtool 1/5] ethtool-copy.h: sync with net Amir Vadai
2015-04-05  1:00   ` Ben Hutchings
2015-04-08 18:40     ` Amir Vadai
2015-04-14 14:34     ` Amir Vadai
2015-04-14 14:58       ` Ben Hutchings
2015-01-25 13:51 ` [PATCH ethtool 2/5] ethtool: Add missing Advertised speeds Amir Vadai
2015-04-05  1:37   ` Ben Hutchings
2015-04-05  2:13     ` Ben Hutchings
2015-04-05  2:29     ` Ben Hutchings
2015-01-25 13:51 ` [PATCH ethtool 3/5] ethtool: Return bad status when send_ioctl fails Amir Vadai
2015-04-05  1:48   ` Ben Hutchings
2015-01-25 13:51 ` [PATCH ethtool 4/5] ethtool: Prettify RX flow hash indirection table print Amir Vadai
2015-04-05  2:00   ` Ben Hutchings
2015-04-05  2:14     ` Ben Hutchings [this message]
2015-04-19 10:40       ` [PATCH ethtool] Fix formatting of RX flow hash indirection table when size % 8 != 0 Amir Vadai
2015-01-25 13:51 ` [PATCH ethtool 5/5] ethtool: Support for configurable RSS hash function Amir Vadai
2015-04-05  2:55   ` Ben Hutchings
2015-04-14 15:37     ` Amir Vadai
2015-03-19 14:17 ` [PATCH ethtool 0/5] RSS improvements + new speeds Or Gerlitz
2015-03-26  9:56   ` Amir Vadai

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1428200099.11260.140.camel@decadent.org.uk \
    --to=ben@decadent.org.uk \
    --cc=amirv@mellanox.com \
    --cc=eyalpe@mellanox.com \
    --cc=netdev@vger.kernel.org \
    --cc=ogerlitz@mellanox.com \
    --cc=saeedm@mellanox.com \
    --cc=yevgenyp@mellanox.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).