9944e16b16
Use an RWlock so readers can work in parallel in the common case (no cache updates). When a reader needs to update the cache to add a new learned source mac address, it will drop the rlock and aquire the wlock to do the update. When we get a read error, we now unbind the port to avoid further packets being forwarded to it. This is usefull for hotplug ethernet devices like usb ones or tunnels. Simplify the unbind, getting rid of the refcount, by having only the reader proc call freeport(). Avoid holding the bridge lock while opening and closing ethernet/tunnel device files during bind and unbind. Dont use smalloc() (especially when holding locks). Allocate bridges dynamically, so we do not waste the memory when we do not need them. Reject non-hostowner from allocating new bridges. Use consistent naming: port -> port Use consistent comment style: // -> /* */ |
||
---|---|---|
.. | ||
doc | ||
games/lib | ||
include | ||
lib | ||
man | ||
src |