首页 | 本学科首页   官方微博 | 高级检索  
     

隧道模式下Linux路由器内存优化的研究
引用本文:熊丹,钱华林.隧道模式下Linux路由器内存优化的研究[J].计算机科学,2006,33(2):33-34.
作者姓名:熊丹  钱华林
作者单位:中国科学院计算机网络信息中心,北京,100080;中国科学院计算机网络信息中心,北京,100080
摘    要:在网络通信中,为了满足应用的需要,常常在数据包中添加特定的协议头部。例如,为了实现从IPv4数据包到IPv6数据包的转换,可以在原IPv4报头前封装上相应的IPv6报头;在以太网中,为了保证应用的QoS需要,可以在数据链路层报头之后封装上MPLS标记。这种在数据报头的固定位置封装固定长度协议头的方式,称为隧道模式。传统的隧道封装方式需要重新在内存中申请skb空间,需要重新拷贝整个数据包,这样的重复内存拷贝降低了系统的性能,并不是必要的。本文在内核代码的层次,分析了数据包的网络处理流程,并修改了Linux的系统调用。通过预留内存资源的方式,提出了一种避免隧道模式下额外内存拷贝的方法,并给出了代码实现。

关 键 词:隧道模式  Linux路由器  预留内存  sk-buff

Study on Linux Router Memory Optimization in Tunnel Model
XIONG Dan,QIAN Hua Lin.Study on Linux Router Memory Optimization in Tunnel Model[J].Computer Science,2006,33(2):33-34.
Authors:XIONG Dan  QIAN Hua Lin
Affiliation:Computer Network Information Center of Chinese Academy of Sciences, Beijing 100080
Abstract:In network communication,we often encapsulate packets with special protocol header. For example, we can use IPv4 over-IPv6 tunnels to carry IPv4 traffic within an IPv6-only network. We can also add MPLS Label after the Data link Layer header for QoS guarantees. The traditional tunnel model always causes the additional memory copying and reduces the system performance. In this paper, we analyze the process of packet handling, and rewrite the Linux System Call. This paper presents a method which can avoid the additional memory copying by reserving memory in advance.
Keywords:sk-buff
本文献已被 CNKI 维普 万方数据 等数据库收录!
点击此处可从《计算机科学》下载全文
设为首页 | 免责声明 | 关于勤云 | 加入收藏

Copyright©北京勤云科技发展有限公司  京ICP备09084417号