通过硬件的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中守护线程的总结 thread.setDaemon(true)

    https://www.cnblogs.com/ziq711/p/8228255.html 在Java中有两类线程:User Thread(用户线程).Daemon Thread(守护线程) 用个比较 ...

  2. html 显示 pdf

    html 显示 pdf文件四种方式: 1. <embed src="pdf/wobu.pdf" type="application/pdf" width= ...

  3. 我的第一个netcore2.2 api项目搭建(一)

    早早就想入门netcore,一直没下定决心,这次正好碰上项目服务变更,便想着入坑试试,边学边用. 目标: 一.api使用core版的SqlSugar,集成orm,实现快速开发 二.api使用Swagg ...

  4. python爬虫---js加密和混淆,scrapy框架的使用.

    python爬虫---js加密和混淆,scrapy框架的使用. 一丶js加密和js混淆 js加密 ​ 对js源码进行加密,从而保护js代码不被黑客窃取.(一般加密和解密的方法都在前端) http:// ...

  5. Redux 中间件和异步操作

    回顾一下Redux的数据流转,用户点击按钮发送了一个action,  reducer 就根据action 和以前的state 计算出了新的state, store.subscribe 方法的回调函数中 ...

  6. element-ui 上传图片或视频时,先回显在上传

    <el-upload class="upload-demo" ref="vidos" :action="URL+'/api/post/file' ...

  7. js之预解析

    一.所谓的预解析就是:在当前作用域中,JavaScript代码执行之前,浏览器首先会默认的把所有带var和function声明的变量进行提前的声明或者定义. 1)var声明的变量在预解析的时候只是提前 ...

  8. Java JDBC事务

    JDBC默认是自动提交,事务是关闭的,statement|preparedStatement.executeUpdate()或excute()执行增删改,执行一次就提交一次(自动同步到数据库). JD ...

  9. Android.mk文件和Application.mk文件详解

    Android.mk文件和Application.mk文件详解 相同点:都是轻量级 Makefile(Makefile文件定义一些列指令,指定文件编译顺序,类似shell脚本) Application ...

  10. 虚拟机安装xp系统教程

    xp和win7安装过程有区别 xp.iso和win7.iso不一样 安装xp必须用特殊方法,此方法的大致步骤如下: 1.VMware新建xp类型的虚拟机 2.进入xp的PE系统 3.在PE系统分2个区 ...