Re: [PATCH v7 net-next 03/12] bridge: Verify that a vlan is allowed to egress on give port

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



2013/1/31 Vlad Yasevich <vyasevic@xxxxxxxxxx>:
> 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.

[...]
> -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?

Best Regards,
Michał Mirosław



[Index of Archives]     [Netdev]     [AoE Tools]     [Linux Wireless]     [Kernel Newbies]     [Security]     [Linux for Hams]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux Admin]     [Samba]     [Video 4 Linux]

  Powered by Linux