通过硬件的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. 【已解決】谷歌浏览器如何清理缓存(cookie)

    清除缓存快捷键 Ctrl+Shift+Delete

  2. python中用分别用selenium、requests库实现Windows认证登录

    最近在搞单位的项目,实现python自动化,结果在第一步就把我给拒之门外,查资料问大佬,问我们开发人员,从周一折腾到周五才搞定了 接下给大家分享一下 项目背景:我们系统是基于Windows平台实现的, ...

  3. java实现SAP BO登录

    最近一个项目用到了SAP的businessObjects,需要进行二次开发,今天开发了登录接口,遇到了一些问题,进行了解决,现在分享一下. 1.依赖jar包的添加 bo登录需要用到一些jar包,具体在 ...

  4. pandas-21 Series和Dataframe的画图方法

    pandas-21 Series和Dataframe的画图方法 ### 前言 在pandas中,无论是series还是dataframe都内置了.plot()方法,可以结合plt.show()进行很方 ...

  5. 【转载】C#通过Contains方法判断DataTable中是否存在某个列名

    在C#中的Datatable数据变量的操作过程中,有时候需要判断DataTable中是否存在某个列名,此时可以通过DataTable对象的Columns列对象集合属性下的Contains方法来进行判断 ...

  6. 禁用浏览器自动给input填充账号和密码

    如果input输入框type为text,设置autoComplete="off" <el-input v-model="ruleForm.loginId" ...

  7. 英语fieldyellowstone田黄石fieldyellowstone单词

    田黄石(Field yellow stone),简称“田黄”,产于福州市寿山乡“寿山溪”两旁之水稻田底下.呈黄色而得名.寿山石优良品种.狭义的田黄石指“田坑石”,广义的田黄石是指其化学成分相同的一类印 ...

  8. win2003下安装python3.4 + pyspider

    昨天尝试了在win2003下安装python2.7.这个是文章地址:https://www.cnblogs.com/alpiny/p/11706606.html 但是程序跑了一晚上,发现有一点问题,是 ...

  9. Golang 在 Mac、Linux、Windows 下如何交叉编译

    转自 https://blog.csdn.net/panshiqu/article/details/53788067 Golang 支持交叉编译,在一个平台上生成另一个平台的可执行程序,最近使用了一下 ...

  10. 使用java spring开发ckeditor的文件上传功能(转)

    说明:原帖提供的代码无法直接运行.本人在原帖基础上做了一些修改,修复了一些bug. 关于CKEditor的使用,网络上有无数的文章,这里不再赘述.而关于java支持的文件上传功能,网络上同样有千千万万 ...