Displaying 6 results from an estimated 6 matches for "br_hash_siz".
Did you mean:
br_hash_size
2007 Apr 18
0
[Bridge] [PATCH] (4/4) bridge forwarding table RCU
...>hlist);
if (!f->is_static)
list_del(&f->age_list);
@@ -85,7 +85,7 @@
struct net_bridge *br = p->br;
int i;
- write_lock_bh(&br->hash_lock);
+ spin_lock_bh(&br->hash_lock);
/* Search all chains since old address/hash is unknown */
for (i = 0; i < BR_HASH_SIZE; i++) {
@@ -117,7 +117,7 @@
fdb_insert(br, p, newaddr, 1);
- write_unlock_bh(&br->hash_lock);
+ spin_unlock_bh(&br->hash_lock);
}
void br_fdb_cleanup(unsigned long _data)
@@ -126,7 +126,7 @@
struct list_head *l, *n;
unsigned long delay;
- write_lock_bh(&br->has...
2007 Apr 18
1
[Bridge] [PATCH] (1/4) bridge: use jenkins hash
...static __inline__ int br_mac_hash(const unsigned char *mac)
{
- unsigned long x;
-
- x = mac[0];
- x = (x << 2) ^ mac[1];
- x = (x << 2) ^ mac[2];
- x = (x << 2) ^ mac[3];
- x = (x << 2) ^ mac[4];
- x = (x << 2) ^ mac[5];
-
- x ^= x >> 8;
-
- return x & (BR_HASH_SIZE - 1);
+ return jhash(mac, ETH_ALEN, 0) & (BR_HASH_SIZE - 1);
}
static __inline__ void fdb_delete(struct net_bridge_fdb_entry *f)
2007 Apr 18
1
[Bridge] A question about modify bridge source
...etif_rx ,the higher layer not response ,the skb must have not passup yet .Why ?I'm puzzling about it for some days .
Sorry my english is so poor:)
Thanks !
//my own bridge struct
struct Bridge{
rwlock_t lock;
rwlock_t hash_lock;
struct net_device dev;
struct Bridge_fdb_entry *hash[BR_HASH_SIZE];
};
extern struct Bridge *brg;
//the bridge initiation , will be called in module_init
struct Bridge *Bridge_fdb_init()
{
struct Bridge *br;
if ((br = kmalloc(sizeof(*br),GFP_KERNEL)) == NULL)
return NULL;
memset(br,0,sizeof(*br));
strncpy(br->dev.name,"BRIDGE",IFNAMSIZ);...
2007 Apr 18
5
[Bridge] RFC: [PATCH] bridge vlan integration
...ridge *br;
@@ -84,6 +92,9 @@ struct net_bridge_port
struct kobject kobj;
struct work_struct carrier_check;
struct rcu_head rcu;
+#ifdef CONFIG_BRIDGE_VLAN
+ struct net_bridge_port_vlan vlan;
+#endif
};
struct net_bridge
@@ -96,6 +107,9 @@ struct net_bridge
struct hlist_head hash[BR_HASH_SIZE];
struct list_head age_list;
unsigned long feature_mask;
+#ifdef CONFIG_BRIDGE_VLAN
+ struct net_bridge_port_vlan vlan;
+#endif
/* STP */
bridge_id designated_root;
@@ -258,4 +272,32 @@ extern void br_sysfs_delbr(struct net_de
#define br_sysfs_delbr(dev) do { } while(0)
#endif /*...
2013 Feb 13
14
[Bridge] [PATCH v10 net-next 00/12] VLAN filtering/VLAN aware bridge
Changes since v9:
* series re-ordering so make functionality more distinct. Basic vlan
filtering is patches 1-4. Support for PVID/untagged vlans is patches
5 and 6. VLAN support for FDB/MDB is patches 7-11. Patch 12 is
still additional egress policy.
* Slight simplification to code that extracts the VID from skb. Since we
now depend on the vlan module, at the time of input skb_tci is
2013 Jan 09
16
[Bridge] [PATCH net-next V5 00/14] Add basic VLAN support to bridges
This series of patches provides an ability to add VLANs to the bridge
ports. This is similar to what can be found in most switches. The bridge
port may have any number of VLANs added to it including vlan 0 priority tagged
traffic. When vlans are added to the port, only traffic tagged with particular
vlan will forwarded over this port. Additionally, vlan ids are added to FDB
entries and become