本文将mark下USO(UDP Segmentation offload) vs UFO(UDP Fragmentation Offload)相关notes。
需阅读Network Segmentation vs Fragmentation,值得注意的是,UDP也是存在Segmentation的。

定义

UDP Segmentation Offload (USO)is a feature that enables network interface cards (NICs) to offload the segmentation of UDP datagrams that are larger than the maximum transmission unit (MTU) of the network medium.

UDP fragmentation offload allows a device to fragment an oversized UDP datagram into multiple IPv4 fragments.

USO vs UFO

There is a USO feature that is different from existing UFO:

  • UFO fragments the UDP packet and only first fragment carries the UDP header (SKB_GSO_UDP in the Linux network stack)
  • USO segments the UDP packet, each segment has a UDP header and IP identification field is incremented for each segment. It is designated as SKB_GSO_UDP_L4 in the Linux network stack

VIRTIO_NET_F_HOST_USO (56)
Device can receive USO packets. Unlike UFO (fragmenting the packet) the USO splits large UDP packet to several segments when each of these smaller packets has UDP header.


参考资料:

  1. Virtual I/O Device (VIRTIO) Version 1.2
  2. virtio-net: define USO feature
  3. udp: allow header check for dodgy GSO_UDP_L4 packets
  4. Software segmentation offloading for FreeBSD by Stefano Garzarella
  5. 理解 Linux 网络栈(2):非虚拟化Linux 环境中的 Segmentation Offloading 技术
  6. UDP Segmentation Offload (USO)
  7. Segmentation Offloads