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

计算机工程 ›› 2007, Vol. 33 ›› Issue (02): 264-266. doi: 10.3969/j.issn.1000-3428.2007.02.094

• 开发研究与设计技术 • 上一篇    下一篇

嵌入式PCI网卡驱动程序的设计与优化

宋有泉,高小鹏,龙 翔   

  1. (北京航空航天大学计算机学院,北京100083)
  • 收稿日期:1900-01-01 修回日期:1900-01-01 出版日期:2007-01-20 发布日期:2007-01-20

Design and Optimization of PCI Ethernet Adapter Driver Program in Embedded System

SONG Youquan, GAO Xiaopeng, LONG Xiang   

  1. (School of Computer Science and Technology, Beijing University of Aeronautics and Astronautics, Beijing 100083)
  • Received:1900-01-01 Revised:1900-01-01 Online:2007-01-20 Published:2007-01-20

摘要: 介绍了嵌入式VPN 网关ESG-1的基本情况,讨论了RTEMS的PCI网卡驱动程序的设计要点:采用服务线程进行网络中断处理;采用生产者-消费者模型对缓冲区进行管理;采用事件驱动机制实现了网卡驱动对多个相同网卡的支持。进一步讨论了驱动程序的内存拷贝优化问题和零拷贝技术。通过测试数据分析得出优化内存拷贝和使用零拷贝技术都能提高网卡驱动程序的性能。

关键词: RTEMS, 设备驱动, 优化, 零拷贝, 内存拷贝

Abstract: This paper introduces the embedded VPN gateway ESG-1 and discusses the design outlines of device driver program for the PCI Ethernet adapter based on RTEMS. This paper adopts the service threads to dispose the network interrupt, uses the producer and consumer model to implement the buffer management and supports the multitude Ethernet adapters managed by one device driver program through the event-driven technique. The problems of optimizing the memory copy for device driver program and zero copy technique are discussed. After analyzing the test data, it concludes that the performance of Ethernet adapter driver is improved by both optimizing the memory copy and adopting the zero copy technique.

Key words: RTEMS, Device driver, Optimization, Zero copy, Memory copy