Re: [PATCH net-next v5 02/14] bridge: Add vlan filtering infrastructure

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

 



On 01/10/2013 01:36 PM, Stephen Hemminger wrote:
This patch has some minor whitespace and spelling errors:

WARNING: line over 80 characters
#429: FILE: net/bridge/br_private.h:205:
+static inline struct net_bridge_port *vlans_to_port(struct net_port_vlans *vlans)

ERROR: trailing whitespace
#432: FILE: net/bridge/br_private.h:208:
+       $

WARNING: please, no spaces at the start of a line
#432: FILE: net/bridge/br_private.h:208:
+       $

+/* Must be protected by RTNL */
+static void br_vlan_del(struct net_bridge_vlan *vlan)

+	/* Drop the self-ref to trigger descrution. */
                                         ^^^^^^^^^^


sorry, will fix. I thought I ran everything through checkpatch. I'll re-run them.

Also, the data structure vlan's seems inverted. Why do you keep a hash list
of vlan's and then a bitmap of ports. Seems more natural to just put a bitmap
on each port that has vlan filtering rather than introducing yet another list
to manage.


I originally had it this way. I found that it wasted space and made other things more difficult to do. For instance, to do egress policy, I would have needed another bitmap of vlans... With 4096 vlans, that's
512 bytes per port (1024 with policy).

I could probably remove the per-port list. It would make 2 things a little harder:
  1) detecting if the port has any vlan info at all.
  2) dumping the vlan information

I could pursue this if you think it'll be better.

-vlad


[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