public inbox for netdev@vger.kernel.org 
 help / color / mirror / Atom feed
From: Andrew Lunn <andrew@lunn•ch>
To: Robert Hancock <hancock@sedsystems•ca>
Cc: netdev@vger•kernel.org
Subject: Re: Errors enabling bridge with KSZ9897 DSA switch driver
Date: Sun, 23 Dec 2018 12:23:32 +0100	[thread overview]
Message-ID: <20181223112332.GH32178@lunn.ch> (raw)
In-Reply-To: <458c96a6-d872-3c0c-ebb0-37d505c95a76@sedsystems.ca>

On Sat, Dec 22, 2018 at 08:29:08PM -0600, Robert Hancock wrote:
> I have a device using a KSZ9897 switch
> (CONFIG_MICROCHIP_KSZ_SPI_DRIVER=y) using a 4.19.9 kernel, where I am
> trying to enable a bridge on some of the ports using systemd-networkd.

Hi Robert

I don't think many of use use such a setup, so we probably have not
noticed this.

> However, it seems to be getting an error when it tries to configure the
> ports to be part of the bridge. systemd-networkd complains with:
> 
> lan1: Set link
> lan1: Could not join netdev: Operation not supported
> lan1: Failed
> 
> and the kernel complains:
> 
> lan: bridge flag offload is not supported 4(lan1)
> 
> That message is coming from br_switchdev_set_port_flag in
> net/bridge/br_switchdev.c. Adding some more output to that statement
> tells me:
> 
> lan: bridge flag offload is not supported, flags 18656 mask 64 support
> 0, 4(lan1)
> 
> which appears to mean something is trying to enable BR_BCAST_FLOOD,
> BR_MCAST_FLOOD, BR_PROMISC, BR_FLOOD, BR_LEARNING on the port, but it is
> failing to enable BR_FLOOD because brport_flags_support is 0. I am just
> using the default bridge settings in systemd-networkd, so that is
> nothing that I am specifying explicitly.

I think this is a systemd problem. It should first query what flags
are supported. See 

dc0ecabd6231 ("net: switchdev: Add support for querying supported bridge flags by hardware")

And then only try to turn on flags which are supported.  If it tries
to turn on flags which are not supported, an error is the correct
thing to do.

      Andrew

  parent reply	other threads:[~2018-12-23 11:23 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-12-23  2:29 Errors enabling bridge with KSZ9897 DSA switch driver Robert Hancock
2018-12-23  4:47 ` Robert Hancock
2018-12-23 11:23 ` Andrew Lunn [this message]
2018-12-23 19:29   ` Robert Hancock
2018-12-23 20:57     ` Andrew Lunn
2018-12-27 23:32       ` Robert Hancock
2018-12-28  8:48         ` Andrew Lunn

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=20181223112332.GH32178@lunn.ch \
    --to=andrew@lunn$(echo .)ch \
    --cc=hancock@sedsystems$(echo .)ca \
    --cc=netdev@vger$(echo .)kernel.org \
    /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