From: Stephen Hemminger <stephen@networkplumber•org>
To: Roopa Prabhu <roopa@cumulusnetworks•com>
Cc: davem@davemloft•net, nikolay@cumulusnetworks•com, netdev@vger•kernel.org
Subject: Re: [PATCH net-next] bridge: add address and vlan to fdb warning messages
Date: Tue, 11 Oct 2016 15:17:20 -0700 [thread overview]
Message-ID: <20161011151720.33f67320@xeon-e3> (raw)
In-Reply-To: <1476221632-18488-1-git-send-email-roopa@cumulusnetworks.com>
On Tue, 11 Oct 2016 14:33:51 -0700
Roopa Prabhu <roopa@cumulusnetworks•com> wrote:
> From: Roopa Prabhu <roopa@cumulusnetworks•com>
>
> This patch adds vlan and address to warning messages printed
> in the bridge fdb code for debuggability.
>
> Signed-off-by: Roopa Prabhu <roopa@cumulusnetworks•com>
> ---
> net/bridge/br_fdb.c | 11 ++++++-----
> 1 file changed, 6 insertions(+), 5 deletions(-)
>
> diff --git a/net/bridge/br_fdb.c b/net/bridge/br_fdb.c
> index 6b43c8c..1257a88 100644
> --- a/net/bridge/br_fdb.c
> +++ b/net/bridge/br_fdb.c
> @@ -536,8 +536,8 @@ static int fdb_insert(struct net_bridge *br, struct net_bridge_port *source,
> if (fdb->is_local)
> return 0;
> br_warn(br, "adding interface %s with same address "
> - "as a received packet\n",
> - source ? source->dev->name : br->dev->name);
> + "as a received packet (addr:%pM, vlan:%d)\n",
> + source ? source->dev->name : br->dev->name, addr, vid);
> fdb_delete(br, fdb);
> }
>
> @@ -583,9 +583,10 @@ void br_fdb_update(struct net_bridge *br, struct net_bridge_port *source,
> /* attempt to update an entry for a local interface */
> if (unlikely(fdb->is_local)) {
> if (net_ratelimit())
> - br_warn(br, "received packet on %s with "
> - "own address as source address\n",
> - source->dev->name);
> + br_warn(br, "received packet on %s with own "
> + "address as source address "
> + "(addr:%pM, vlan:%d)\n",
> + source->dev->name, addr, vid);
> } else {
Isn't vlan unsigned here so print with %u
Also it would be good to make string format on one line to allow for easy search of source.
br_warn(br,
"received packet on %s with own address %pM vlan %u",
source->dev->name, addr, vid);
next prev parent reply other threads:[~2016-10-11 22:17 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-10-11 21:33 [PATCH net-next] bridge: add address and vlan to fdb warning messages Roopa Prabhu
2016-10-11 22:17 ` Stephen Hemminger [this message]
2016-10-11 22:30 ` Roopa Prabhu
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=20161011151720.33f67320@xeon-e3 \
--to=stephen@networkplumber$(echo .)org \
--cc=davem@davemloft$(echo .)net \
--cc=netdev@vger$(echo .)kernel.org \
--cc=nikolay@cumulusnetworks$(echo .)com \
--cc=roopa@cumulusnetworks$(echo .)com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
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