• 中国计算机学会会刊
  • 中国科技核心期刊
  • 中文核心期刊

计算机工程与科学 ›› 2023, Vol. 45 ›› Issue (11): 1960-1969.

• 计算机网络与信息安全 • 上一篇    下一篇

基于数据处理器的QUIC加密/解密卸载

王继昌,吕高锋,刘忠沛,杨翔瑞   

  1. (国防科技大学计算机学院,湖南 长沙 410073)
  • 收稿日期:2022-06-09 修回日期:2023-04-10 接受日期:2023-11-25 出版日期:2023-11-25 发布日期:2023-11-16
  • 基金资助:
    国家重点研发计划(2018YFB1800505)

QUIC encryption and decryption offloading based on data processing unit

WANG Ji-chang,L Gao-feng,LIU Zhong-pei,YANG Xiang-rui   

  1. (College of Computer Science and Technology,National University of Defense Technology,Changsha 410073,China)
  • Received:2022-06-09 Revised:2023-04-10 Accepted:2023-11-25 Online:2023-11-25 Published:2023-11-16

摘要: QUIC作为与TCP并行的新兴传输协议,其优化方法沿用TCP研究路线,其中的主流是硬件卸载技术,将计算密集型功能模块卸载到网络设备,使用硬件卸载的方式代替主机CPU进行计算。然而由于硬件卸载通用性较差,性能虽高但无法保证用户可编程性。为了克服这个限制,提出了软件卸载模型——NanoBPF,基于DPU中RISC众核的协议卸载模型,通过修改BootLoader的启动代码,引导启动eBPF代码作为运行时环境,对协议栈中CPU占用率较高的加密/解密功能模块进行软件卸载。其中,加密/解密功能模块使用高级语言(C)编写,并被编译成自定义的BPF字节码动态载入DPU。通过本地和基于Docker的网络拓扑对该原型系统的吞吐量和公平性进行验证,结果表明,报文加密/解密的软件卸载能提高协议栈近13%的报文吞吐率,且在一定条件下能够保证与TCP的链路公平性。

关键词: DPU, 加密/解密, 软件卸载, 多核并行, eBPF代码

Abstract: QUIC, as an emerging transmission protocol parallel to TCP, follows the TCP research approach. The mainstream research way is hardware offloading, which offloads computation-intensive functional modules to network devices and replaces host CPU computation by hardware processing. However, due to the poor generality of hardware offloading, although its performance is high, it cannot guarantee user programmability. To overcome this limitation, this paper proposes a software offloading model—NanoBPF, which is a protocol offloading model based on the RISC-style many-core DPU (Data Processing Unit). By modifying the Bootloader's startup code, it guides the eBPF (extended Berkeley Packet Filter) code as a runtime environment and offloads encryption and decryption functional modules with high CPU utilization rates in the protocol stack using software. The encryption and decryption functional modules are written in high-level languages (C) and compiled into custom BPF (Berkeley Packet Filter) bytecode dynamically loaded into the DPU. The throughput and fairness of the prototype system are validated using local and Docker-based network topologies. The results show that software offloading of message encryption and decryption can increase the message throughput of the protocol stack by nearly 13%, and under certain conditions, it can ensure link fairness with TCP.

Key words: DPU, encryption/decryption, software offloading, multicore parallelism, eBPF code