All of lore.kernel.org
 help / color / mirror / Atom feed
From: Elad Raz <eladr@mellanox.com>
To: Nikolay Aleksandrov <razor@blackwall.org>
Cc: netdev <netdev@vger.kernel.org>,
	Scott Feldman <sfeldma@gmail.com>,
	"Jiri Pirko" <jiri@resnulli.us>,
	Vivien Didelot <vivien.didelot@savoirfairelinux.com>,
	"davem@davemloft.net" <davem@davemloft.net>,
	Nikolay Aleksandrov <nikolay@cumulusnetworks.com>
Subject: Re: [PATCH net-next] switchdev: enforce no pvid flag in vlan ranges
Date: Mon, 12 Oct 2015 12:11:57 +0000	[thread overview]
Message-ID: <8D6D3174-F2DB-4BF3-A803-E2E7F26119FF@mellanox.com> (raw)
In-Reply-To: <1444651299-2813-1-git-send-email-razor@blackwall.org>


> On Oct 12, 2015, at 3:01 PM, Nikolay Aleksandrov <razor@blackwall.org> wrote:
> 
> From: Nikolay Aleksandrov <nikolay@cumulusnetworks.com>
> 
> We shouldn't allow BRIDGE_VLAN_INFO_PVID flag in VLAN ranges.
> 
> Signed-off-by: Nikolay Aleksandrov <nikolay@cumulusnetworks.com>
> ---
> net/switchdev/switchdev.c | 3 +++
> 1 file changed, 3 insertions(+)
> 
> diff --git a/net/switchdev/switchdev.c b/net/switchdev/switchdev.c
> index 6e4a4f9ad927..256c596de896 100644
> --- a/net/switchdev/switchdev.c
> +++ b/net/switchdev/switchdev.c
> @@ -720,6 +720,9 @@ static int switchdev_port_br_afspec(struct net_device *dev,
> 			if (vlan.vid_begin)
> 				return -EINVAL;
> 			vlan.vid_begin = vinfo->vid;
> +			/* don't allow range of pvids */
> +			if (vlan.flags & BRIDGE_VLAN_INFO_PVID)
> +				return -EINVAL;
> 		} else if (vinfo->flags & BRIDGE_VLAN_INFO_RANGE_END) {
> 			if (!vlan.vid_begin)
> 				return -EINVAL;

Acked-by: Elad Raz <eladr@mellanox.com>

> -- 
> 2.4.3
> 
> --
> To unsubscribe from this list: send the line "unsubscribe netdev" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html

  reply	other threads:[~2015-10-12 12:26 UTC|newest]

Thread overview: 34+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-10-09 23:30 switchdev and VLAN ranges Vivien Didelot
2015-10-10  4:22 ` Scott Feldman
2015-10-10 16:33   ` Vivien Didelot
2015-10-10 18:10     ` Florian Fainelli
2015-10-10 19:47       ` Vivien Didelot
2015-10-10  7:49 ` Elad Raz
2015-10-10 10:36   ` Nikolay Aleksandrov
2015-10-11  7:12     ` Jiri Pirko
2015-10-11 10:49       ` [PATCH net-next] bridge: vlan: enforce no pvid flag in vlan ranges Nikolay Aleksandrov
2015-10-11 10:49         ` [Bridge] " Nikolay Aleksandrov
2015-10-11 14:13         ` Jiri Pirko
2015-10-13  2:59         ` David Miller
2015-10-13  2:59           ` [Bridge] " David Miller
2015-10-11 22:41       ` switchdev and VLAN ranges Vivien Didelot
2015-10-12  0:13         ` Nikolay Aleksandrov
2015-10-12  5:14           ` Scott Feldman
2015-10-12 10:15             ` Nikolay Aleksandrov
2015-10-12 12:01             ` [PATCH net-next] switchdev: enforce no pvid flag in vlan ranges Nikolay Aleksandrov
2015-10-12 12:11               ` Elad Raz [this message]
2015-10-12 12:17               ` Jiri Pirko
2015-10-12 17:36               ` Vivien Didelot
2015-10-13  6:13                 ` Scott Feldman
2015-10-13  8:31                 ` Ido Schimmel
2015-10-13 14:32                   ` Vivien Didelot
2015-10-14  6:14                     ` Ido Schimmel
2015-10-14 15:25                       ` Vivien Didelot
2015-10-14 17:14                         ` Scott Feldman
2015-10-14 17:42                           ` Ido Schimmel
2015-10-14 18:51                             ` Vivien Didelot
2015-10-14 22:08                               ` Florian Fainelli
2015-10-15  0:07                                 ` Vivien Didelot
2015-10-15  2:58                             ` Scott Feldman
2015-10-15  7:28                               ` Ido Schimmel
2015-10-13 11:42               ` David Miller

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=8D6D3174-F2DB-4BF3-A803-E2E7F26119FF@mellanox.com \
    --to=eladr@mellanox.com \
    --cc=davem@davemloft.net \
    --cc=jiri@resnulli.us \
    --cc=netdev@vger.kernel.org \
    --cc=nikolay@cumulusnetworks.com \
    --cc=razor@blackwall.org \
    --cc=sfeldma@gmail.com \
    --cc=vivien.didelot@savoirfairelinux.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.