| By the popularization of the multi-queue 10 Gigabit NICs, the inefficiency of the in-kernel packet I/O subsystem is more prominent. The high performance user-level raw-packet I/O frameworks presented by academia and industry become the foundation of building high performance network systems. However, most fundamental network functions, especially the TCP/IP protocol stack, are still designed for and implemented in kernel. So, there is an urgent need for a high performance protocol stack designed for the high performance user-level raw-packet I/O frameworks.Based on the user-level protocol stack Libuinet which is ported from FreeBSD, combined with the high performance user-level raw-packet I/O framework Netmap, this dissertation has designed and implemented a high performance user-level protocol stack for general purpose multi-core platforms equipped with multi-queue 10Gb NICs. This work consists of three parts:the parallelization, performance optimization and API design. In part of parallelization, based on the multi-queue and RSS features supported by 10Gb NICs and the network virtualization supported by FreeBSD protocol stack, we designed a protocol stack parallelization model which can eliminate the contention among different CPU cores. In part of performance optimization, we improved the running model of each thread in the protocol stack and optimized the scheduling policy based on the job of each thread. In part of API design, we designed a suite of callback API, and achieved the approximate implicit parallelization, and in most cases, developers can focus on the development of the application logic, which can greatly simplify and reduce the development works. This dissertation has tested and verified the effectiveness of each proposed optimization scheme by experiments in the real hardware and software environment. And compared the performance among the improved user-level protocol stacks and mainstream kernel protocol stacks. The experiment results show that the improved user-level protocol stack has obtained a great improvement on the performance. |