作者投稿和查稿 主编审稿 专家审稿 编委审稿 远程编辑

计算机工程

• 开发研究与工程应用 • 上一篇    

轻量级TCP / IP 协议栈机制分析与优化

袁中书,陆 阳   

  1. (合肥工业大学计算机与信息学院,合肥230009)
  • 收稿日期:2014-02-27 出版日期:2015-02-15 发布日期:2015-02-13
  • 作者简介:袁中书(1988 - ),男,硕士研究生,主研方向:嵌入式系统;陆 阳,教授。
  • 基金资助:
    安徽省科技攻关计划基金资助重大项目(11010201011)。

Analysis and Optimization of Lightweight TCP / IP Protocol Stack Mechanism

YUAN Zhongshu,LU Yang   

  1. (School of Computer and Information,Hefei University of Technology,Hefei 230009,China)
  • Received:2014-02-27 Online:2015-02-15 Published:2015-02-13

摘要: 轻量级TCP / IP 协议栈(LwIP)主要应用于资源受限的嵌入式设备。为满足嵌入式设备对实时性的要求,分析LwIP 的内部机制,对其进行性能瓶颈分析,并根据分析结果设计、实施LwIP 的实时性和优先级管理优化方案。LwIP 的主要性能瓶颈是内存拷贝和校验过程,据此给出优化后的内存拷贝算法和校验算法。为满足紧急数据对更高优先级的要求,给出LwIP 协议栈优先级管理机制,能够确保高优先级标记的紧急数据包优先传输于普通数据包。实验结果表明,该优化方法可以显著提高LwIP 的实时性能。

关键词: 轻量级TCP / IP 协议栈, 嵌入式, 实时性, 优化, 优先级, 等待队列

Abstract: Lightweight TCP / IP protocol stack (LwIP) is mainly used in resource-constrained embedded devices. In order to meet the real-time requirement of the embedded device,this paper analyzes the internal mechanism of LwIP, conducts a performance bottleneck analysis by experimental measurements,and designs the optimization program of LwIP. The main performance bottlenecks of LwIP are memory copy and verification process. Accordingly,the optimized algorithms of memory copy and checksum are presented. Additionally,in order to meet the higher priority requirement of the urgent data,this paper presents the management mechanism of the priority,and ensures that the emergency packets take precedence over ordinary data packets. Experimental tests are presented to prove that these optimization methods improve the real-time performance of LwIP.

Key words: Lightweight TCP / IP protocol stack(LwIP), embedded, real-time, optimization, priority;wait queue

中图分类号: