All of lore.kernel.org
 help / color / mirror / Atom feed
From: Vlad Yasevich <vyasevic@redhat.com>
To: "Michał Mirosław" <mirqus@gmail.com>
Cc: netdev@vger.kernel.org, shemminger@vyatta.com,
	bridge@lists.linux-foundation.org, davem@davemloft.net,
	shmulik.ladkani@gmail.com
Subject: Re: [Bridge] [PATCH v7 net-next 03/12] bridge: Verify that a vlan is allowed to egress on give port
Date: Thu, 31 Jan 2013 15:17:45 -0500	[thread overview]
Message-ID: <510AD169.8040206@redhat.com> (raw)
In-Reply-To: <CAHXqBFLQofoWPN9nfAKc6xumjzO3hu7ue3r=bHYerypAuRW0qw@mail.gmail.com>

On 01/31/2013 03:03 PM, Michał Mirosław wrote:
> 2013/1/31 Vlad Yasevich <vyasevic@redhat.com>:
>> When bridge forwards a frame, make sure that a frame is allowed
>> to egress on that port.
>
> For egress checks it might be better to have per-vlan bitmaps of ports
> instead. For unicast this doesn't really change anything, but for
> broadcast and multicast all ports are checked so reading all bits from
> one location is going to be cheaper.

But then one would have to locate that particular bitmap and now we are 
back to a list/hash of vlans each containing port bitmap.  Considering 
how strenuously Stephen wanted a bitmap of vlans, I'll leave it as is 
for now.

>
> [...]
>> -static inline struct net_port_vlans *br_get_vlan_info(struct net_bridge *br)
>> +static inline struct net_port_vlans *br_get_vlan_info(
>> +                                               const struct net_bridge *br)
>>   {
>>          return rcu_dereference(br->vlan_info);
>>   }
>>
>> -static inline struct net_port_vlans *nbp_get_vlan_info(struct net_bridge_port *p)
>> +static inline struct net_port_vlans *nbp_get_vlan_info(
>> +                                               const struct net_bridge_port *p)
>>   {
>>          return rcu_dereference(p->vlan_info);
>>   }
>
> Shouldn't this be in patch 1?

Sure.  'const' wasn't needed until this patch though, but I guess its 
good practice.

Thanks for taking a look
-vlad
>
> Best Regards,
> Michał Mirosław
>


WARNING: multiple messages have this Message-ID (diff)
From: Vlad Yasevich <vyasevic@redhat.com>
To: "Michał Mirosław" <mirqus@gmail.com>
Cc: shemminger@vyatta.com, bridge@lists.linux-foundation.org,
	davem@davemloft.net, netdev@vger.kernel.org,
	shmulik.ladkani@gmail.com
Subject: Re: [PATCH v7 net-next 03/12] bridge: Verify that a vlan is allowed to egress on give port
Date: Thu, 31 Jan 2013 15:17:45 -0500	[thread overview]
Message-ID: <510AD169.8040206@redhat.com> (raw)
In-Reply-To: <CAHXqBFLQofoWPN9nfAKc6xumjzO3hu7ue3r=bHYerypAuRW0qw@mail.gmail.com>

On 01/31/2013 03:03 PM, Michał Mirosław wrote:
> 2013/1/31 Vlad Yasevich <vyasevic@redhat.com>:
>> When bridge forwards a frame, make sure that a frame is allowed
>> to egress on that port.
>
> For egress checks it might be better to have per-vlan bitmaps of ports
> instead. For unicast this doesn't really change anything, but for
> broadcast and multicast all ports are checked so reading all bits from
> one location is going to be cheaper.

But then one would have to locate that particular bitmap and now we are 
back to a list/hash of vlans each containing port bitmap.  Considering 
how strenuously Stephen wanted a bitmap of vlans, I'll leave it as is 
for now.

>
> [...]
>> -static inline struct net_port_vlans *br_get_vlan_info(struct net_bridge *br)
>> +static inline struct net_port_vlans *br_get_vlan_info(
>> +                                               const struct net_bridge *br)
>>   {
>>          return rcu_dereference(br->vlan_info);
>>   }
>>
>> -static inline struct net_port_vlans *nbp_get_vlan_info(struct net_bridge_port *p)
>> +static inline struct net_port_vlans *nbp_get_vlan_info(
>> +                                               const struct net_bridge_port *p)
>>   {
>>          return rcu_dereference(p->vlan_info);
>>   }
>
> Shouldn't this be in patch 1?

Sure.  'const' wasn't needed until this patch though, but I guess its 
good practice.

Thanks for taking a look
-vlad
>
> Best Regards,
> Michał Mirosław
>

  reply	other threads:[~2013-01-31 20:17 UTC|newest]

Thread overview: 44+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-01-31  3:12 [Bridge] [PATCH v8 net-next 00/12] Add basic VLAN support to bridges Vlad Yasevich
2013-01-31  3:12 ` Vlad Yasevich
2013-01-31  3:12 ` [Bridge] [PATCH v7 net-next 01/12] bridge: Add vlan filtering infrastructure Vlad Yasevich
2013-01-31  3:12   ` Vlad Yasevich
2013-01-31 19:57   ` [Bridge] " Michał Mirosław
2013-01-31 19:57     ` Michał Mirosław
2013-01-31 20:13     ` [Bridge] " Vlad Yasevich
2013-01-31 20:13       ` Vlad Yasevich
2013-02-01  2:50       ` [Bridge] " Vlad Yasevich
2013-02-01  2:50         ` Vlad Yasevich
2013-01-31 20:33     ` [Bridge] " Simon Barber
2013-01-31 20:33       ` Simon Barber
2013-01-31 20:34       ` Vlad Yasevich
2013-01-31 20:34         ` Vlad Yasevich
2013-01-31 21:46         ` Simon Barber
2013-01-31 21:46           ` Simon Barber
2013-01-31 21:54           ` Vlad Yasevich
2013-01-31 21:54             ` Vlad Yasevich
2013-01-31  3:12 ` [Bridge] [PATCH v7 net-next 02/12] bridge: Validate that vlan is permitted on ingress Vlad Yasevich
2013-01-31  3:12   ` Vlad Yasevich
2013-01-31  3:12 ` [Bridge] [PATCH v7 net-next 03/12] bridge: Verify that a vlan is allowed to egress on give port Vlad Yasevich
2013-01-31  3:12   ` Vlad Yasevich
2013-01-31 20:03   ` [Bridge] " Michał Mirosław
2013-01-31 20:03     ` Michał Mirosław
2013-01-31 20:17     ` Vlad Yasevich [this message]
2013-01-31 20:17       ` Vlad Yasevich
2013-01-31  3:12 ` [Bridge] [PATCH v7 net-next 04/12] bridge: Add netlink interface to configure vlans on bridge ports Vlad Yasevich
2013-01-31  3:12   ` Vlad Yasevich
2013-01-31  3:12 ` [Bridge] [PATCH v7 net-next 05/12] bridge: Add the ability to configure pvid Vlad Yasevich
2013-01-31  3:12   ` Vlad Yasevich
2013-01-31  3:12 ` [Bridge] [PATCH v7 net-next 06/12] bridge: Implement vlan ingress/egress policy Vlad Yasevich
2013-01-31  3:12   ` Vlad Yasevich
2013-01-31  3:12 ` [Bridge] [PATCH v7 net-next 07/12] bridge: Add vlan to unicast fdb entries Vlad Yasevich
2013-01-31  3:12   ` Vlad Yasevich
2013-01-31  3:12 ` [Bridge] [PATCH v7 net-next 08/12] bridge: Add vlan id to multicast groups Vlad Yasevich
2013-01-31  3:12   ` Vlad Yasevich
2013-01-31  3:12 ` [Bridge] [PATCH v7 net-next 09/12] bridge: Add vlan support to static neighbors Vlad Yasevich
2013-01-31  3:12   ` Vlad Yasevich
2013-01-31  3:12 ` [Bridge] [PATCH v7 net-next 10/12] bridge: Add vlan support for local fdb entries Vlad Yasevich
2013-01-31  3:12   ` Vlad Yasevich
2013-01-31  3:12 ` [Bridge] [PATCH v7 net-next 11/12] bridge: Dump vlan information from a bridge port Vlad Yasevich
2013-01-31  3:12   ` Vlad Yasevich
2013-01-31  3:12 ` [Bridge] [PATCH v7 net-next 12/12] bridge: Separate egress policy bitmap Vlad Yasevich
2013-01-31  3:12   ` Vlad Yasevich

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=510AD169.8040206@redhat.com \
    --to=vyasevic@redhat.com \
    --cc=bridge@lists.linux-foundation.org \
    --cc=davem@davemloft.net \
    --cc=mirqus@gmail.com \
    --cc=netdev@vger.kernel.org \
    --cc=shemminger@vyatta.com \
    --cc=shmulik.ladkani@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 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.