通过硬件的IOMMU,内核提供的共享内存、VFIO可以实现。

REF:

1. offical DPDK API Doc, 简书有翻译版 DPDK编程指南(翻译)(一)  (二十七

2. dpdk vhost研究()/()

3. vhost-user 与其他的对比 virtio,vhost 和vhost-user

共享内存原理:

【精品】Linux共享内存实例及文件映射编程及实现原理

Linux共享内存实例及文件映射编程及实现原理

文件共享

Linux文件共享(六)——描述符传递

qemu 与DPDK共享内存,是通过传递fd(fd是进程独享的,同一文件,两个进程间的fd可能不同)的方式实现的。所以实现fd传输是一个很麻烦的事。 参考这个例子,怎么实现fd传递的。

linux提供recvmsg与sendmsg来传递描述符,详见:

linux下进程间传递描述符(recvmsg与sendmsg)详解

进程间传递文件描述符--sendmsg,recvmsg, 传递过程有点magic, 其实是通过msghdr中的两个成员 msg_control 和 msg_controllen 辅助数据。(几个注意点

 

Share fd: When you share a file descriptor over a socket, the kernel mediates. You need to prepare data using the cmsg(3) macros, send it using sendmsg(2) and receive it using recvmsg(2). The kernel is involved in the latter two operations, and it handles the conversion from a file descriptor to whatever data it needs to transmit the file descriptor, and making the file descriptor available in the receiving process.

Demo (1) (2) (3)
 
 
REF:

share memory between guest and nic的更多相关文章

  1. Share Memory By Communicating

    Share Memory By Communicating - The Go Programming Language https://golang.google.cn/doc/codewalk/sh ...

  2. Share Memory By Communicating 一等公民

    Share Memory By Communicating - The Go Programming Language https://golang.google.cn/doc/codewalk/sh ...

  3. share memory cache across multi web application

    Single instance of a MemoryCache across multiple application pools on the same server [duplicate] Yo ...

  4. How to share memory between services and user processes?

    除了必要的InitializeSecurityDescriptor和SetSecurityDescriptorDacl, 内存映射文件名必须GLOBAL开头.

  5. share memory

    header for public argument:shmdata.h #define TEXT_SZ 2048 struct shared_use_st { int written; char t ...

  6. Extended paging tables to map guest physical memory addresses from virtual memory page tables to host physical memory addresses in a virtual machine system

    A processor including a virtualization system of the processor with a memory virtualization support ...

  7. zabbix登陆问题:cannot allocate shared memory for collector

    问题说明:在一台zabbix被监控服务器上(64位centos6.8系统,64G内容)启动zabbix_agent,发现进程无法启动,10050端口没有起来! 启动zabbix_agent进程没有报错 ...

  8. System Services -> Memory Management -> About Memory Management

    Virtual Address Space Memory Pools Memory Performance Information Virtual Memory Functions Heap Func ...

  9. docker cgroup 技术之memory(首篇)

    测试环境centos7 ,内核版本4.20 内核使用cgroup对进程进行分组,并限制进程资源和对进程进行跟踪.内核通过名为cgroupfs类型的虚拟文件系统来提供cgroup功能接口.cgroup有 ...

随机推荐

  1. Java+Python+前端 学习资料大全 百度云盘

    Java架构师3大阶段 链接:https://pan.baidu.com/s/1DlXh33y5t4cZUmZH0cLvCw 提取码:5s76 2019前端架构阶段 链接:https://pan.ba ...

  2. 关于注解sql和动态sql的写法

    注解写sql一般写在mapper层,如果sql语句复杂建议不要写注解sql 拼接容易出错 二动态sql的话要在 main 下面创建一个resource ——mapper—— Mapper.xml 再在 ...

  3. VS2019+EF6连接Mysql

    开发环境:Win10 + VS2019Mysql服务器版本:8.0.16 一.下载并安装插件(必备) MySQL-Connector-net-6.9.12  链接https://cdn.mysql.c ...

  4. AnimationClip压缩-动画文件压缩

    动画压缩方法一.常用方法1. Rig->Animation Type:改为Generic2. Animations->Anim.Compression:Optimal二.高级方法1. 去掉 ...

  5. WPF调用C++生成的dll文件(示例)

    注:笔者使用的VS版本为2019.1.打开VS2019,选择文件 -> 新建 -> 项目 2.选择项目 新建项目时选择C++“控制台应用”语言:C++平台:Windows项目类型:空项目 ...

  6. Java的Annnotation (注解)

    注解是什么呢? 其实就像商场的商品上都贴有自己的标签一样,它提供了关于这个商品的许多额外信息.你可以根据这些信息对其进行附加的处理. (Java的语法糖果然比较差劲), 这个name()方法太累赘了, ...

  7. 异常详细信息: System.Security.SecurityException: 未找到源,不过,未能搜索部分或所有事件日志。 若要创建源,您需要用于读取所有事件日志的权限以确保新的源名称是唯一的。 不可访问的日志: Security。

    “/”应用程序中的服务器错误. 安全性异常 说明: 应用程序尝试执行安全策略不允许的操作.要授予此应用程序所需的权限,请与系统管理员联系,或在配置文件中更改该应用程序的信任级别. 异常详细信息: Sy ...

  8. jsp,servlet文件上传问题完善

    1. 上传文件时文件名中文乱码 upload.setHeaderEncoding("utf-8"); 有个疑惑: 不管设置不设置都不乱码,但是刘帅龙老师讲的时候出现了乱码 . 2. ...

  9. pyspider最佳实践

    pyspider是好东西,非常稳定,很久很久以前架了一个,心冷了一段时间,但人家尽忠职守地持续运行,一直在抓取东西. 结合chrome,抓取代码简直不要太好写,没想到,最头大的,还是它的调度.明明感觉 ...

  10. android 连接wifi案例

    1.xml布局文件: <FrameLayout xmlns:android="http://schemas.android.com/apk/res/android" xmln ...