通过硬件的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. 2019 翔通动漫java面试笔试题 (含面试题解析)

      本人5年开发经验.18年年底开始跑路找工作,在互联网寒冬下成功拿到阿里巴巴.今日头条.翔通动漫等公司offer,岗位是Java后端开发,因为发展原因最终选择去了翔通动漫,入职一年时间了,也成为了面 ...

  2. 87.CSS Flex 弹性盒模型布局教程(共用的css在48篇文章gird)

    CSS Flex 弹性盒模型布局教程 Flex 是 Flexible Box 的缩写,意为"弹性布局",用来为盒状模型提供最大的灵活性. flex布局就是给任何一个容器添加 dis ...

  3. BDOC ROUTER

    BAPI_CRM_SAVECRM_GENERIC_CRM_INMAP_BAPIMTCS_AND_PROCESSCRM_DOWNLOAD_MAP_TO_MBDOCCRM_SALESDOC_MAP_BAP ...

  4. Java变量常量声明和定义

    一.常量和变量 1.常量变量定义 在程序中存在大量的数据来代表程序的状态,其中有些数据在程序的运行过程中值会发生改变,有些数据在程序运行过程中值不能发生改变,这些数据在程序中分别被叫做变量和常量. 2 ...

  5. Spring实战(第4版).pdf - 百度云资源

    http://www.supan.vip/spring%E5%AE%9E%E6%88%98 Spring实战(第4版).pdf 关于本书 Spring框架是以简化Java EE应用程序的开发为目标而创 ...

  6. 【原】python 检查网站访问是否超时,并用钉钉机器人报警

    #!/usr/bin/env python import requests import json import logging webhook="上面创建钉钉机器人的webhook地址&q ...

  7. zabbix--监控MySQL性能

    Zabbix 自带模板监控 MySQL 性能 通过自带的 Template DB MySQL 模板监控 MySQL 性能 具体步骤: 1)创建脚本存放目录并编辑脚本 # mkdir /etc/zabb ...

  8. 解决:IntelliJ IDEA输入法不跟随光标

    主界面 Ctrl+Shift+a 输入 switch boot jdk 然后回车 选择自己安装的jdk: 如果没有找到,就点最下面的...,然后找到自己的jdk安装路径,确定即可. 保存自动重启就ok ...

  9. 基于gin框架搭建的一个简单的web服务

    刚把go编程基础知识学习完了,学习的时间很短,可能还有的没有完全吸收.不过还是在项目中发现知识,然后在去回顾已学的知识,现在利用gin这个web框架做一个简单的CRUD操作. 1.Go Web框架的技 ...

  10. destoon开发笔记-JQ+JS实现倒计时功能

    页面代码 <div class="time " class="" id="onBidtime125" pid="125&qu ...