Netdev List
 help / color / mirror / Atom feed
From: Eric Joyner <eric.joyner@amd.com>
To: <netdev@vger.kernel.org>
Cc: Brett Creeley <brett.creeley@amd.com>,
	Jakub Kicinski <kuba@kernel.org>,
	Michal Kubecek <mkubecek@suse.cz>,
	Eric Joyner <eric.joyner@amd.com>,
	"Jacob Keller" <jacob.e.keller@intel.com>,
	Nikhil Rao <nikhil.rao@amd.com>
Subject: [PATCH ethtool] netlink: fec: Add missing newlines in FEC statistics output
Date: Thu, 4 Jun 2026 17:12:37 -0700	[thread overview]
Message-ID: <20260605001237.11708-1-eric.joyner@amd.com> (raw)

The non-histogram stats don't have newlines printed after them if they
don't have per-lane counts, and so they (and the first histogram bin, if
applicable) were displayed on the same line with the rest of the stats
being displayed with one stat per line, which looked inconsistent and
doesn't match the display in previous versions of ethtool.

Fix this by printing a final newline in the case where there are no
per-lane counts so that each stat gets printed with a newline at the
end.

Fixes: 3426a920183f ("netlink: fec: add errors histogram statistics")
Signed-off-by: Eric Joyner <eric.joyner@amd.com>
---
 netlink/fec.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/netlink/fec.c b/netlink/fec.c
index 36ad3f504a83..c014749ac950 100644
--- a/netlink/fec.c
+++ b/netlink/fec.c
@@ -166,6 +166,8 @@ static int fec_show_stats(const struct nlattr *nest)
 		if (lanes) {
 			close_json_array("");
 			printf(" ]\n");
+		} else {
+			printf("\n");
 		}
 
 		close_json_object();

base-commit: 75fd12445ffd6d697d53b7d296e345d524a9bedd
-- 
2.17.1


                 reply	other threads:[~2026-06-05  0:12 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

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=20260605001237.11708-1-eric.joyner@amd.com \
    --to=eric.joyner@amd.com \
    --cc=brett.creeley@amd.com \
    --cc=jacob.e.keller@intel.com \
    --cc=kuba@kernel.org \
    --cc=mkubecek@suse.cz \
    --cc=netdev@vger.kernel.org \
    --cc=nikhil.rao@amd.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