From: Sven Eckelmann <sven@narfation.org>
To: b.a.t.m.a.n@lists.open-mesh.org
Cc: Joe Perches <joe@perches.com>,
Marek Lindner <mareklindner@neomailbox.ch>,
Simon Wunderlich <sw@simonwunderlich.de>,
Antonio Quartulli <a@unstable.cc>,
netdev@vger.kernel.org, "David S. Miller" <davem@davemloft.net>,
linux-kernel@vger.kernel.org
Subject: Re: [B.A.T.M.A.N.] Odd use of %14pM in net/batman-adv/distributed-arp-table.c
Date: Wed, 14 Jun 2017 10:23:38 +0200 [thread overview]
Message-ID: <5300874.nPgxNW8UST@bentobox> (raw)
In-Reply-To: <1497390701.18751.26.camel@perches.com>
[-- Attachment #1: Type: text/plain, Size: 1282 bytes --]
On Dienstag, 13. Juni 2017 14:51:41 CEST Joe Perches wrote:
> An output mac address is 17 bytes
[...]
> but in net/batman-adv/distributed-arp-table.c
[...]
> %14pM is odd as this should not emit the last byte of the
> mac address. So given the example above, it would output
> 00:11:22:33:44
[...]
I completely agree too the "wrong length" part. It is currently not omitting
the last byte:
Distributed ARP Table (bat0):
IPv4 MAC VID last-seen
* 10.204.28.206 e8:50:8b:8b:71:8d -1 4:05
* 10.204.77.54 6c:2f:2c:43:70:eb -1 1:56
* 10.25.21.138 ec:1f:72:c3:15:51 -1 4:21
* 10.204.27.220 08:70:45:8c:ac:db -1 2:32
* 192.168.42.22 64:66:b3:bb:8e:ef -1 0:18
* 10.204.64.1 02:ba:7a:df:04:00 -1 0:00
* 192.168.42.27 e8:de:27:f9:0f:48 -1 0:32
But it definitely also not "correct". I see something similar in the IV OGM
code:
net/batman-adv/bat_iv_ogm.c: "bidirectional: orig = %-15pM neigh = %-15pM => own_bcast = %2i, real recv = %2i, local tq: %3i, asym_penalty: %3i, iface_penalty: %3i, total tq: %3i, if_incoming = %s, if_outgoing = %s\n",
Do you want to provide a patch to convert it to simple %pM's?
Kind regards,
Sven
[-- Attachment #2: This is a digitally signed message part. --]
[-- Type: application/pgp-signature, Size: 833 bytes --]
next prev parent reply other threads:[~2017-06-14 8:23 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-06-13 21:51 Odd use of %14pM in net/batman-adv/distributed-arp-table.c Joe Perches
2017-06-14 8:23 ` Sven Eckelmann [this message]
2017-06-14 9:32 ` Joe Perches
2017-06-14 9:33 ` [PATCH] batman-adv: Remove unnecessary length qualifier in %14pM Joe Perches
2017-06-14 19:20 ` David Miller
[not found] ` <c3693cdd478c68f078f105f55972a4406b333e69.1497432565.git.joe-6d6DIl74uiNBDgjK7y7TUQ@public.gmane.org>
2017-06-14 19:41 ` Sven Eckelmann
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=5300874.nPgxNW8UST@bentobox \
--to=sven@narfation.org \
--cc=a@unstable.cc \
--cc=b.a.t.m.a.n@lists.open-mesh.org \
--cc=davem@davemloft.net \
--cc=joe@perches.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mareklindner@neomailbox.ch \
--cc=netdev@vger.kernel.org \
--cc=sw@simonwunderlich.de \
/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).