Netdev List
 help / color / mirror / Atom feed
From: Vladimir Oltean <vladimir.oltean@nxp.com>
To: Stephen Hemminger <stephen@networkplumber.org>
Cc: "netdev@vger.kernel.org" <netdev@vger.kernel.org>,
	Roopa Prabhu <roopa@nvidia.com>,
	Nikolay Aleksandrov <nikolay@nvidia.com>,
	"David S. Miller" <davem@davemloft.net>,
	Jakub Kicinski <kuba@kernel.org>
Subject: Re: [PATCH net-next] net: bridge: vlan: check for errors from __vlan_del in __vlan_flush
Date: Mon, 14 Feb 2022 23:58:15 +0000	[thread overview]
Message-ID: <20220214235814.hbxwyqrfidnvhyyz@skbuf> (raw)
In-Reply-To: <20220214155205.22135ebb@hermes.local>

On Mon, Feb 14, 2022 at 03:52:05PM -0800, Stephen Hemminger wrote:
> On Tue, 15 Feb 2022 01:36:46 +0200
> Vladimir Oltean <vladimir.oltean@nxp.com> wrote:
> 
> > +		if (err) {
> > +			br_err(br,
> > +			       "port %u(%s) failed to delete vlan %d: %pe\n",
> > +			       (unsigned int) p->port_no, p->dev->name,
> > +			       vlan->vid, ERR_PTR(err));
> 
> Don't understand this last argument here.
> It takes an integer error number, then converts it to an error pointer
> just so the error message can then decode with %pe?

Yes.

> Why?

Because I find "-ENOENT" more legible than "-2":

root@debian:~# ip link del br0
[   72.782294] device swp0 left promiscuous mode
[   72.788968] br0: port 2(swp0) entered disabled state
[   72.799735] br0: port 2(swp0) failed to delete vlan 1: -ENOENT
[   72.823542] ------------[ cut here ]------------
[   72.828223] WARNING: CPU: 1 PID: 472 at net/bridge/br_vlan.c:409 __vlan_group_free+0x54/0x60
[   72.836745] Modules linked in:
[   72.839854] CPU: 1 PID: 472 Comm: ip Not tainted 5.17.0-rc3-07010-ga9b9500ffaac-dirty #2224
[   72.848274] Hardware name: LS1028A RDB Board (DT)
[   72.853023] pstate: 20000005 (nzCv daif -PAN -UAO -TCO -DIT -SSBS BTYPE=--)
[   72.860047] pc : __vlan_group_free+0x54/0x60
[   72.864366] lr : __vlan_group_free+0x20/0x60
[   72.868683] sp : ffff800008ad70f0
[   72.872035] x29: ffff800008ad70f0 x28: ffff0e14c665c0e4 x27: ffffbfe4244daa40
[   72.879277] x26: ffff0e14c665c000 x25: ffff0e14c5ed60c8 x24: ffff0e14c665cd18
[   72.886519] x23: ffff0e14c5ed6000 x22: ffff0e14c665ceb8 x21: ffff0e14c6127028
[   72.893760] x20: ffff0e14c611ab00 x19: ffff0e14c611a800 x18: 0000000000000000
[   72.901000] x17: 0000000000000000 x16: 0000000000000000 x15: 0000000000000000
[   72.908231] x14: 1ffff0000115ad8a x13: 0000000041b58ab3 x12: ffff70000115ada1
[   72.915464] x11: 1ffff0000115ada0 x10: ffff70000115ada0 x9 : dfff800000000000
[   72.922697] x8 : 00000000f3000000 x7 : dfff800000000000 x6 : 00000000f3f3f3f3
[   72.929929] x5 : 00000000f2f2f200 x4 : dfff800000000000 x3 : ffffbfe423aa5d00
[   72.937161] x2 : 0000000000000007 x1 : 0000000000000000 x0 : ffff0e14c604f3a0
[   72.944393] Call trace:
[   72.946869]  __vlan_group_free+0x54/0x60
[   72.950837]  nbp_vlan_flush+0x6c/0xf4
[   72.954542]  del_nbp+0x188/0x4d0
[   72.957812]  br_dev_delete+0x60/0xec
[   72.961429]  rtnl_dellink+0x1c4/0x4ec
[   72.965137]  rtnetlink_rcv_msg+0x208/0x5e0
[   72.969280]  netlink_rcv_skb+0xc8/0x1fc
[   72.973162]  rtnetlink_rcv+0x18/0x2c
[   72.976780]  netlink_unicast+0x2c8/0x3f4
[   72.980749]  netlink_sendmsg+0x30c/0x5f0

  reply	other threads:[~2022-02-14 23:58 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-02-14 23:36 [PATCH net-next] net: bridge: vlan: check for errors from __vlan_del in __vlan_flush Vladimir Oltean
2022-02-14 23:52 ` Stephen Hemminger
2022-02-14 23:58   ` Vladimir Oltean [this message]
2022-02-15 14:40 ` patchwork-bot+netdevbpf

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=20220214235814.hbxwyqrfidnvhyyz@skbuf \
    --to=vladimir.oltean@nxp.com \
    --cc=davem@davemloft.net \
    --cc=kuba@kernel.org \
    --cc=netdev@vger.kernel.org \
    --cc=nikolay@nvidia.com \
    --cc=roopa@nvidia.com \
    --cc=stephen@networkplumber.org \
    /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