Netdev List
 help / color / mirror / Atom feed
From: Florian Fainelli <f.fainelli@gmail.com>
To: Andrew Lunn <andrew@lunn.ch>, Vivien Didelot <vivien.didelot@gmail.com>
Cc: "Nikita Yushchenko" <nikita.yoush@cogentembedded.com>,
	"David S. Miller" <davem@davemloft.net>,
	"Heiner Kallweit" <hkallweit1@gmail.com>,
	"Marek Behún" <marek.behun@nic.cz>,
	"Russell King" <rmk+kernel@armlinux.org.uk>,
	netdev@vger.kernel.org, linux-kernel@vger.kernel.org,
	"Chris Healy" <cphealy@gmail.com>
Subject: Re: [PATCH] net: dsa: mv88e6xxx: avoid error message on remove from VLAN 0
Date: Fri, 31 May 2019 09:34:03 -0700	[thread overview]
Message-ID: <1814b2e2-1a89-89f8-9699-f13df5e826b2@gmail.com> (raw)
In-Reply-To: <20190531143758.GB23821@lunn.ch>

On 5/31/19 7:37 AM, Andrew Lunn wrote:
>> I'm not sure that I like the semantic of it, because the driver can actually
>> support VID 0 per-se, only the kernel does not use VLAN 0. Thus I would avoid
>> calling the port_vlan_del() ops for VID 0, directly into the upper DSA layer.
>>
>> Florian, Andrew, wouldn't the following patch be more adequate?
>>
>>     diff --git a/net/dsa/slave.c b/net/dsa/slave.c
>>     index 1e2ae9d59b88..80f228258a92 100644
>>     --- a/net/dsa/slave.c
>>     +++ b/net/dsa/slave.c
>>     @@ -1063,6 +1063,10 @@ static int dsa_slave_vlan_rx_kill_vid(struct net_device *dev, __be16 proto,
>>             struct bridge_vlan_info info;
>>             int ret;
>>      
>>     +       /* VID 0 has a special meaning and is never programmed in hardware */
>>     +       if (!vid)
>>     +               return 0;
>>     +
>>             /* Check for a possible bridge VLAN entry now since there is no
>>              * need to emulate the switchdev prepare + commit phase.
>>              */
>  
> Hi Vivien
> 
> If we put this in rx_kill_vid, we should probably have something
> similar in rx_add_vid, just in case the kernel does start using VID 0.

We use the prepare/commit model in the rx_add_vid() path so we deal with
-EOPNOTSUPP, that was caught fairly early on by Heiner when I added
programming of VLAN filtering through rx_{add,kill}_vid.

Nikita's patcha s it stands is correct and would make both
mv88e6xxx_port_check_hw_vlan() and mv88e6xxx_vtu_get() consistent.

I will respond to other comments.
-- 
Florian

  parent reply	other threads:[~2019-05-31 16:34 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-05-31  7:35 [PATCH] net: dsa: mv88e6xxx: avoid error message on remove from VLAN 0 Nikita Yushchenko
2019-05-31 14:31 ` Vivien Didelot
2019-05-31 14:37   ` Andrew Lunn
2019-05-31 14:46     ` Nikita Yushchenko
2019-05-31 15:00       ` Vivien Didelot
2019-05-31 15:02         ` Nikita Yushchenko
2019-05-31 16:36         ` Florian Fainelli
2019-05-31 18:19           ` Vivien Didelot
2019-05-31 19:33             ` Florian Fainelli
2019-05-31 16:34     ` Florian Fainelli [this message]
2019-05-31 20:14       ` Vivien Didelot
2019-05-31 16:44   ` Florian Fainelli
2019-05-31 20:15 ` Vivien Didelot
2019-06-02 20:54 ` David Miller
  -- strict thread matches above, loose matches on Subject: below --
2019-05-31  7:27 Nikita Yushchenko

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=1814b2e2-1a89-89f8-9699-f13df5e826b2@gmail.com \
    --to=f.fainelli@gmail.com \
    --cc=andrew@lunn.ch \
    --cc=cphealy@gmail.com \
    --cc=davem@davemloft.net \
    --cc=hkallweit1@gmail.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=marek.behun@nic.cz \
    --cc=netdev@vger.kernel.org \
    --cc=nikita.yoush@cogentembedded.com \
    --cc=rmk+kernel@armlinux.org.uk \
    --cc=vivien.didelot@gmail.com \
    /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