⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 smpnotes

📁 linux下桥接软件源码
💻
字号:
Notes on the (20000210) SMP-ization of the bridging code:Each bridge has a hash table of MAC addresses. This table is protectedby a rwlock hash_lock. The entries are refcounted; 'getting' an entryis done in the usual way: read_lock the table, find the entry,increment it's refcount and unlock the table. Bottom half contextacquires this lock in read as well as write mode, therefore we alwaysneed to locally disable BHs when acquiring this lock.Each bridge also has an rwlock called lock. This slightly misnamedlock protects the bridge's port_list. All stp code acquires this lockin read mode, the only piece of code that acquires this lock in writemode is the ioctl code (br_ioctl.c). Bottom halves never acquire thislock in write mode, therefore we can use read_lock instead ofread_lock_bh in all cases.All ioctls are globally serialized by the semaphore ioctl_mutex. Allcode which acquires the bridge lock in write mode also acquiresioctl_mutex. Therefore, if we have already grabbed ioctl_mutex wedon't need to read_lock the bridge lock anymore; the ioctl_mutex willprotect against concurrent writers.

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -