cvs commit: src/sys/conf options src/sys/kern kern_mbuf.c
src/sys/net if.c if.h if_ethersubr.c if_var.h if_vlan.c
if_vlan_var.h src/sys/sys mbuf.h
Gleb Smirnoff
glebius at FreeBSD.org
Mon Jan 30 05:45:16 PST 2006
glebius 2006-01-30 13:45:15 UTC
FreeBSD src repository
Modified files:
sys/conf options
sys/kern kern_mbuf.c
sys/net if.c if.h if_ethersubr.c if_var.h
if_vlan.c if_vlan_var.h
sys/sys mbuf.h
Log:
Merge the //depot/user/yar/vlan branch into CVS. It contains some collective
work by yar, thompsa and myself. The checksum offloading part also involves
work done by Mihail Balikov.
The most important changes:
o Instead of global linked list of all vlan softc use a per-trunk
hash. The size of hash is dynamically adjusted, depending on
number of entries. This changes struct ifnet, replacing counter
of vlans with a pointer to trunk structure. This change is an
improvement for setups with big number of VLANs, several interfaces
and several CPUs. It is a small regression for a setup with a single
VLAN interface.
An alternative to dynamic hash is a per-trunk static array with
4096 entries, which is a compile time option - VLAN_ARRAY. In my
experiments the array is not an improvement, probably because such
a big trunk structure doesn't fit into CPU cache.
o Introduce an UMA zone for VLAN tags. Since drivers depend on it,
the zone is declared in kern_mbuf.c, not in optional vlan(4) driver.
This change is a big improvement for any setup utilizing vlan(4).
o Use rwlock(9) instead of mutex(9) for locking. We are the first
ones to do this! :)
o Some drivers can do hardware VLAN tagging + hardware checksum
offloading. Add an infrastructure for this. Whenever vlan(4) is
attached to a parent or parent configuration is changed, the flags
on vlan(4) interface are updated.
In collaboration with: yar, thompsa
In collaboration with: Mihail Balikov <mihail.balikov interbgc.com>
Revision Changes Path
1.526 +2 -0 src/sys/conf/options
1.19 +25 -0 src/sys/kern/kern_mbuf.c
1.253 +2 -1 src/sys/net/if.c
1.100 +1 -0 src/sys/net/if.h
1.213 +3 -3 src/sys/net/if_ethersubr.c
1.106 +2 -1 src/sys/net/if_var.h
1.94 +462 -119 src/sys/net/if_vlan.c
1.24 +9 -5 src/sys/net/if_vlan_var.h
1.187 +5 -0 src/sys/sys/mbuf.h
More information about the cvs-src
mailing list