一個在使用者層級可編寫程式的路由(router)架構提供了更有彈性的路由功能開發環境,同時也便利網路研究者實驗新的想法,這個架構克服了傳統路由在擴充功能方面僅局限在核心的困難,新擴充的路由功能可以在此架構上動態的載入跟移除就像一般使用者層級上的應用程式一樣,這樣可以避免因程式錯誤而導致整個系統毀壞,但以此便利性做為交換我們卻必須容忍使用者層級跟核心間低效率的溝通,為了達到使用者層級封包處理的功能,轉送封包必須經過使用者空間,然而一般的作業系統為了保護系統安全在使用者空間跟核心間有極大的安全限制,雖然應用程式能透過應用程式界面 (e.g. Linux BSD) 來達到此一要求,但卻必須付出過多的代價—使用者空間跟核心之間低效能的傳輸—這樣不僅不適用在網路功能更會為整個系統帶來極大的負擔,在一個收取封包高峰時間,有可能導致系統因反應過慢而丟棄後續的封包,最後演變成系統陷於活鎖(Livelock)現象,為了提供使用者層級封包處理的方便性又不發生上面提及的缺點,我們修改了系統核心來提供記憶體重新映對(memory remapping)跟一個新的sk_buff 結構配置功能來管理我們的網路記憶體,同時我們也試著去控制中斷(interrupt)機制來改善活鎖現象。
An user-level programmable router architecture supports flexible programmability of router functions and facilitates network researchers to experiment with new ideas. This architecture conquers the inflexibility of traditional router that extends its functions only within kernel. New extended functions are executed like user-level applications that are loaded on this platform dynamically, so no program errors will crash the whole system like only-kernel extensible router do. The trade-off to these flexibilities is the lower performance of user-level and kernel communication. To achieve user-level packet processing functions, the packet user space traveling is required. As everyone knows, there is a strict discrimination between kernel and user space to protect system. Though, with the help of application interface (e.g. BSD), user-level applications can get another duplication of forward packet that. This time-consuming method does not suit network service. Moreover, the router are always flooded by a burst of traffic, it is possible that the all packets are dropped because of the system cant respond in time. Under this condition, the system easily suffers from Livelock that make on progress. In order to building a user-level programmable router without the defects mentioned above. We modified the kernel that supports memory-remapping mechanism to eliminate data copy and provides a new skb allocation/deallocation for network memory management. Our work also tries to improve Livelock problem by control interrupt.