public inbox for netdev@vger.kernel.org 
 help / color / mirror / Atom feed
From: roopa <roopa@cumulusnetworks•com>
To: Alexandre DERUMIER <aderumier@odiso•com>
Cc: netdev <netdev@vger•kernel.org>,
	Scott Feldman <sfeldma@cumulusnetworks•com>
Subject: Re: kernel 4.2 : "bridge vlan" command return empty result (works with kernel 4.1.3)
Date: Tue, 15 Sep 2015 12:02:34 -0700	[thread overview]
Message-ID: <55F86B4A.7090001@cumulusnetworks.com> (raw)
In-Reply-To: <1167950469.57377315.1442338762965.JavaMail.zimbra@oxygem.tv>

On 9/15/15, 10:39 AM, Alexandre DERUMIER wrote:
> Hi,
>
> since kernel 4.2, "bridge vlan" command return empty result.
>
>
> kernel 4.1.3
> ------------
> # bridge vlan
> port	vlan ids
> eth0	 1 PVID Egress Untagged
> 	 90
> 	 91
> 	 92
> 	 93
> 	 94
> 	 95
> 	 96
> 	 97
> 	 98
> 	 99
> 	 100
>
> vmbr0	 1 PVID Egress Untagged
> 	 94
>
>
>
> kernel 4.2
> ----------------
> # bridge vlan
> port	vlan ids
>
>
>
> Note that vlans are correctly working,it seem that is just the display.
>
> tcpdump -e -i vmbr0
>
> 19:38:08.005055 00:08:7c:bd:ae:40 (oui Unknown) > 00:18:8b:7c:c8:37 (oui Unknown), ethertype 802.1Q (0x8100), length 64: vlan 94, p 0, ethertype IPv4, 172.20.0.17.52299 > kvmtest2.odiso.net.ssh: Flags [.], ack 339613, win 5523, length 0
> 19:38:08.007730 00:08:7c:bd:ae:40 (oui Unknown) > 00:18:8b:7c:c8:37 (oui Unknown), ethertype 802.1Q (0x8100), length 64: vlan 94, p 0, ethertype IPv4, 172.20.0.17.52299 > kvmtest2.odiso.net.ssh: Flags [.], ack 342145, win 5568, length 0
> 19:38:08.010977 00:08:7c:bd:ae:40 (oui Unknown) > 00:18:8b:7c:c8:37 (oui Unknown), ethertype 802.1Q (0x8100), length 64: vlan 94, p 0, ethertype IPv4, 172.20.0.17.52299 > kvmtest2.odiso.net.ssh: Flags [.], ack 344677, win 5614, length 0
> 19:3
I was able to reproduce this when there is a bond in the system.

Looks like this was due to 85fdb956726ff2a ("switchdev: cut over to new 
switchdev_port_bridge_getlink").
When CONFIG_SWITCHDEV is off, nodes that use switchdev api for 
ndo_bridge_getlink (example, bonds, teams, rocker) can return
-EOPNOTSUPP. The problem went away on my box with the following patch. I 
will submit an official patch in a bit.
Do you have a bond in your system ?.

diff --git a/net/core/rtnetlink.c b/net/core/rtnetlink.c
index 01ced4a..bdb3842 100644
--- a/net/core/rtnetlink.c
+++ b/net/core/rtnetlink.c
@@ -3013,6 +3013,7 @@ static int rtnl_bridge_getlink(struct sk_buff 
*skb, struct
         u32 portid = NETLINK_CB(cb->skb).portid;
         u32 seq = cb->nlh->nlmsg_seq;
         u32 filter_mask = 0;
+       int err;

         if (nlmsg_len(cb->nlh) > sizeof(struct ifinfomsg)) {
                 struct nlattr *extfilt;
@@ -3033,20 +3034,25 @@ static int rtnl_bridge_getlink(struct sk_buff 
*skb, stru
                 struct net_device *br_dev = 
netdev_master_upper_dev_get(dev);

                 if (br_dev && br_dev->netdev_ops->ndo_bridge_getlink) {
-                       if (idx >= cb->args[0] &&
- br_dev->netdev_ops->ndo_bridge_getlink(
-                                   skb, portid, seq, dev, filter_mask,
-                                   NLM_F_MULTI) < 0)
-                               break;
+                       if (idx >= cb->args[0]) {
+                               err = 
br_dev->netdev_ops->ndo_bridge_getlink(
+                                               skb, portid, seq, dev,
+                                               filter_mask, NLM_F_MULTI);
+                               if ( err < 0 && err != -EOPNOTSUPP)
+                                       break;
+                       }
                         idx++;
                 }

                 if (ops->ndo_bridge_getlink) {
-                       if (idx >= cb->args[0] &&
-                           ops->ndo_bridge_getlink(skb, portid, seq, dev,
-                                                   filter_mask,
-                                                   NLM_F_MULTI) < 0)
-                               break;
+                       if (idx >= cb->args[0]) {
+                               err = ops->ndo_bridge_getlink(skb, portid,
+                                                             seq, dev,
+ filter_mask,
+ NLM_F_MULTI);
+                               if ( err < 0 && err != -EOPNOTSUPP)
+                                       break;
+                       }
                         idx++;
                 }
         }

  reply	other threads:[~2015-09-15 19:02 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-09-15 17:39 kernel 4.2 : "bridge vlan" command return empty result (works with kernel 4.1.3) Alexandre DERUMIER
2015-09-15 19:02 ` roopa [this message]
2015-09-16  6:11   ` Alexandre DERUMIER
2015-09-17  3:36   ` Alexandre DERUMIER
2015-09-17  5:33     ` roopa

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=55F86B4A.7090001@cumulusnetworks.com \
    --to=roopa@cumulusnetworks$(echo .)com \
    --cc=aderumier@odiso$(echo .)com \
    --cc=netdev@vger$(echo .)kernel.org \
    --cc=sfeldma@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