局部性緩衝卸載技術可減少CPU與記憶體存取量的消耗,使效能更佳化。然而,在擁有一個小記憶空間的硬體,不可能依所有可能的目的端埠口排序封包,如埠口0至埠口65535。NetFPGA為一個可程式化的四埠千兆乙太網卡,廣泛地被研究者使用。現今NetFPGA中的Linux驅動程式內的接收函式極容易造成接收活鎖的現象,其中斷處理使得CPU的資源完全地耗盡。 本研究為研究NetFPGA局部性緩衝與減緩中斷之實現的可行性。我們藉由利用記憶體映射,實現libcap函式庫的局部性緩衝,其結果證實,在線上模式時,Snort的傳輸量增加了9%。此外,第二層的快取失誤率與封包遺失率分別減少了38.13%與56.47%。使用投票機制,實現中斷減緩於驅動程序管理,以減少中斷數。但由於許多的DMA引擎的限制,這並不是最佳化的。因此,我們提出可能之DMA引擎設計的建議,為日後的工作目標。
Offloading locality buffering technique may reduce the loading of the CPU and number of memory accesses which lead to a better performance. However, sorting the packets from all possible destination port, from port 0 up to port 65535, is not possible on hardware with a small memory capacity. NetFPGA is a programmable, four-port Gigabit Ethernet card, which is widely used by researchers. The current receiving function in NetFPGA device driver for Linux is extremely prone to the receive livelock phenomenon where resources of the CPU are fully consumed by busy handling of the interrupts. This research is to study the feasibility of the implementation of locality buffering and interrupt mitigation on NetFPGA. The implementation of our simplified locality buffering on libpcap library by utilizing memory mapping shows 9% increase for the Snort’s throughput in online mode. Moreover, the L2 cache miss ratio and packet loss rate are decreased in an average of 38.13% and 56.47%. Using polling, the implementation of interrupt mitigation in the driver managed to reduce the number of interrupts. It is not optimal because of several constraints on the DMA engine. Therefore, several changes in the DMA engine are proposed as future work.