SDN
  • 1. 前言
  • 网络基础
    • 2. 网络基础理论
      • TCP/IP网络模型
      • ARP
      • ICMP
      • 路由
      • 交换机
      • UDP
      • DHCP/DNS
      • TCP
      • VLAN
      • Overlay
    • 3. Linux网络
      • Linux网络配置
        • 虚拟网络设备
      • iptables/netfilter
      • 负载均衡
      • 流量控制
      • SR-IOV
      • 内核VRF
      • eBPF
        • bcc
        • 故障排查
      • XDP
        • XDP架构
        • 使用场景
      • 常用工具
        • 网络抓包tcpdump
        • scapy
      • 内核网络参数
    • 4. Open vSwitch
      • OVS介绍
      • OVS编译
      • OVS原理
      • OVN
        • OVN编译
        • OVN实践
        • OVN高可用
        • OVN Kubernetes插件
        • OVN Docker插件
        • OVN OpenStack
    • 5. DPDK
      • DPDK简介
      • DPDK安装
      • 报文转发模型
      • NUMA
      • Ring和共享内存
      • PCIe
      • 网卡性能优化
      • 多队列
      • 硬件offload
      • 虚拟化
      • OVS DPDK
      • SPDK
      • OpenFastPath
  • SDN&NFV
    • 6. SDN
      • SDN控制器
        • OpenDaylight
        • ONOS
        • Floodlight
        • Ryu
        • NOX/POX
      • 南向接口
        • OpenFlow
        • OF-Config
        • NETCONF
        • P4
      • 数据平面
    • 7. NFV
    • 8. SDWAN
  • 容器网络
    • 9. 容器网络
      • Host 网络
      • CNI
        • CNI介绍
        • Flannel
        • Calico
        • Weave
        • Cilium
        • OVN
        • Contiv
        • SR-IOV
        • Romana
        • OpenContrail
        • Kuryr
      • CNM
        • CNM介绍
        • Calico
        • Contiv
        • Romana
        • SR-IOV
      • Kubernetes网络
  • SDN实践
    • 10. Mininet
    • 11. SDN实践案例
      • Goolge网络
  • 参考文档
    • 12. FAQ
    • 13. 参考文档
由 GitBook 提供支持
在本页
  • DPDK Ring
  • ivshmem
  • ivshmem使用示例
  1. 网络基础
  2. 5. DPDK

Ring和共享内存

上一页NUMA下一页PCIe

最后更新于6年前

DPDK Ring

DPDK Ring提供了一个FIFO无锁队列,支持丰富的队列操作,比如

  • Multi-consumer or single-consumer dequeue

  • Multi-producer or single-producer enqueue

  • Bulk dequeue - Dequeues the specified count of objects if successful; otherwise fails

  • Bulk enqueue - Enqueues the specified count of objects if successful; otherwise fails

  • Burst dequeue - Dequeue the maximum available objects if the specified count cannot be fulfilled

  • Burst enqueue - Enqueue the maximum available objects if the specified count cannot be fulfilled

ivshmem

ivshmem则通过把内存映射成虚拟机PCI设备提供了虚拟机间(host-to-guest or guest-to-guest)共享内存的机制。

DPDK ivshmem:

ivshmem使用示例

# on the host
mount tmpfs /dev/shm -t tmpfs -osize=32m
ivshmem_server -m 64 -p/tmp/nahanni &

# start VM
qemu-system-x86_64  -hda mg -L /pc-bios/ --smp 4 –chardev socket,path=/tmp/nahanni,id=nahanni-device ivshmem,chardev=nahanni,size=32m,msi=off -serial telnet:0.0.0.0:4000,server,nowait,nodelay-enable-kvm&

# inside VM
modprobe kvm_ivshmem
cat/proc/devices | grep kvm_ivshmem
mknod-mode=666 /dev/ivshmem c 245 0

参考文档

DPDK Ring Library
DPDK IVSHMEM Library