Ubuntu 22.04 编译 DPDK 19.11 igb_uio 和 kni 报错解决办法
由于 Ubuntu22.04 内核版本和gcc版本比较高,在编译dpdk时会报错。
我使用的编译命令是:
make install T=x86_64-native-linuxapp-gcc
主要有以下几个错误:
1.error: this statement may fall through
== Build kernel/linux/igb_uioCC [M] /root/dpdk-19.11/x86_64-native-linuxapp-gcc/build/kernel/linux/igb_uio/igb_uio.o
/root/dpdk-19.11/x86_64-native-linuxapp-gcc/build/kernel/linux/igb_uio/igb_uio.c: In function ‘igbuio_pci_enable_interrupts’:
/root/dpdk-19.11/x86_64-native-linuxapp-gcc/build/kernel/linux/igb_uio/igb_uio.c:230:20: error: this statement may fall through [-Werror=implicit-fallthrough=]230 | if (pci_alloc_irq_vectors(udev->pdev, 1, 1, PCI_IRQ_MSIX) == 1) {| ^
/root/dpdk-19.11/x86_64-native-linuxapp-gcc/build/kernel/linux/igb_uio/igb_uio.c:240:9: note: here240 | case RTE_INTR_MODE_MSI:| ^~~~
/root/dpdk-19.11/x86_64-native-linuxapp-gcc/build/kernel/linux/igb_uio/igb_uio.c:250:20: error: this statement may fall through [-Werror=implicit-fallthrough=]250 | if (pci_alloc_irq_vectors(udev->pdev, 1, 1, PCI_IRQ_MSI) == 1) {| ^
/root/dpdk-19.11/x86_64-native-linuxapp-gcc/build/kernel/linux/igb_uio/igb_uio.c:259:9: note: here259 | case RTE_INTR_MODE_LEGACY:| ^~~~
In file included from ./include/linux/device.h:15,from /root/dpdk-19.11/x86_64-native-linuxapp-gcc/build/kernel/linux/igb_uio/igb_uio.c:8:
./include/linux/dev_printk.h:148:31: error: this statement may fall through [-Werror=implicit-fallthrough=]148 | dev_printk_index_wrap(_dev_notice, KERN_NOTICE, dev, dev_fmt(fmt), ##__VA_ARGS__)| ^
./include/linux/dev_printk.h:110:17: note: in definition of macro ‘dev_printk_index_wrap’110 | _p_func(dev, fmt, ##__VA_ARGS__); \| ^~~~~~~
/root/dpdk-19.11/x86_64-native-linuxapp-gcc/build/kernel/linux/igb_uio/igb_uio.c:267:17: note: in expansion of macro ‘dev_notice’267 | dev_notice(&udev->pdev->dev, "PCI INTX mask not supported\n");| ^~~~~~~~~~
/root/dpdk-19.11/x86_64-native-linuxapp-gcc/build/kernel/linux/igb_uio/igb_uio.c:269:9: note: here269 | case RTE_INTR_MODE_NONE:| ^~~~
cc1: all warnings being treated as errors
解决办法:
修改 x86_64-native-linuxapp-gcc/build/kernel/linux/igb_uio/Makefile 文件,去掉“MODULE_CFLAGS += -Winline -Wall -Werror” -行的 -Werror 编译选项。
2. error: passing argument 1 of ‘get_user_pages_remote’ from incompatible pointer type
== Build kernel/linux/kniCC [M] /root/dpdk-19.11/x86_64-native-linuxapp-gcc/build/kernel/linux/kni/kni_misc.o
In file included from /root/dpdk-19.11/x86_64-native-linuxapp-gcc/build/kernel/linux/kni/kni_misc.c:22:
/root/dpdk-19.11/kernel/linux/kni/kni_dev.h: In function ‘iova_to_phys’:
/root/dpdk-19.11/kernel/linux/kni/kni_dev.h:104:37: error: passing argument 1 of ‘get_user_pages_remote’ from incompatible pointer type [-Werror=incompatible-pointer-types]104 | ret = get_user_pages_remote(tsk, tsk->mm, iova, 1,| ^~~| || struct task_struct *
In file included from ./arch/x86/include/asm/cacheflush.h:5,from ./include/linux/cacheflush.h:5,from ./include/linux/highmem.h:8,from ./include/linux/bvec.h:10,from ./include/linux/skbuff.h:17,from ./include/net/net_namespace.h:39,from ./include/linux/netdevice.h:37,from /root/dpdk-19.11/x86_64-native-linuxapp-gcc/build/kernel/linux/kni/kni_misc.c:9:
./include/linux/mm.h:1943:46: note: expected ‘struct mm_struct *’ but argument is of type ‘struct task_struct *’1943 | long get_user_pages_remote(struct mm_struct *mm,| ~~~~~~~~~~~~~~~~~~^~
解决办法:
修改 kernel/linux/kni/kni_dev.h 文件104行,改成:
#if LINUX_VERSION_CODE >= KERNEL_VERSION(5, 9, 0)ret = get_user_pages_remote(tsk->mm, iova, 1,FOLL_TOUCH, &page, NULL, NULL);
#elseret = get_user_pages_remote(tsk, tsk->mm, iova, 1,FOLL_TOUCH, &page, NULL, NULL);
#endif /* >= 5.9.0 */
- error: implicit declaration of function ‘random_ether_addr’
== Build kernel/linux/kniCC [M] /root/dpdk-19.11/x86_64-native-linuxapp-gcc/build/kernel/linux/kni/kni_misc.o
/root/dpdk-19.11/x86_64-native-linuxapp-gcc/build/kernel/linux/kni/kni_misc.c: In function ‘kni_ioctl_create’:
/root/dpdk-19.11/x86_64-native-linuxapp-gcc/build/kernel/linux/kni/kni_misc.c:406:17: error: implicit declaration of function ‘random_ether_addr’ [-Werror=implicit-function-declaration]406 | random_ether_addr(net_dev->dev_addr);| ^~~~~~~~~~~~~~~~~
cc1: all warnings being treated as errors
解决办法:
修改 x86_64-native-linuxapp-gcc/build/kernel/linux/kni/kni_misc.c 文件 406行,
将 random_ether_addr 函数修改为 eth_random_addr。
- error: initialization of ‘void (*)(struct net_device , unsigned int)’ from incompatible pointer type ‘void ()(struct net_device *)
== Build kernel/linux/kniCC [M] /root/dpdk-19.11/x86_64-native-linuxapp-gcc/build/kernel/linux/kni/kni_misc.oCC [M] /root/dpdk-19.11/x86_64-native-linuxapp-gcc/build/kernel/linux/kni/kni_net.o
/root/dpdk-19.11/x86_64-native-linuxapp-gcc/build/kernel/linux/kni/kni_net.c:786:27: error: initialization of ‘void (*)(struct net_device *, unsigned int)’ from incompatible pointer type ‘void (*)(struct net_device *)’ [-Werror=incompatible-pointer-types]786 | .ndo_tx_timeout = kni_net_tx_timeout,| ^~~~~~~~~~~~~~~~~~
/root/dpdk-19.11/x86_64-native-linuxapp-gcc/build/kernel/linux/kni/kni_net.c:786:27: note: (near initialization for ‘kni_net_netdev_ops.ndo_tx_timeout’)
cc1: all warnings being treated as errors
解决办法:
修改 x86_64-native-linuxapp-gcc/build/kernel/linux/kni/Makefile 文件,MODULE_CFLAGS += -Wall -Werror 这一行追加 -Wno-error=incompatible-pointer-types 编译选项
相关文章:
Ubuntu 22.04 编译 DPDK 19.11 igb_uio 和 kni 报错解决办法
由于 Ubuntu22.04 内核版本和gcc版本比较高,在编译dpdk时会报错。 我使用的编译命令是: make install Tx86_64-native-linuxapp-gcc主要有以下几个错误: 1.error: this statement may fall through Build kernel/linux/igb_uioCC [M] /roo…...
Android Studio.exe 下载 2023 最新更新,网盘下载
方便大家下载, 放到了网盘上,自己也保留一份。(最前面是最新版本的,慎用, 会有bug什么的) 个人使用4.2版本的,感觉够用稳定,其他版本有莫名奇妙的bug,让人头大࿰…...

element的el-select给下拉框添加背景
第一步 :popper-append-to-body"false" <el-selectv-model"value"placeholder"请选择":popper-append-to-body"false"><el-optionv-for"item in options":key"item.value":label"item.label&quo…...
正确理解党籍和党龄;入党和转正时间
总的来说党籍、党龄、入党时间、转正时间在性质和时间阶段上均有所区别。 党籍:是指党员资格。经支部党员大会讨论,被批准为预备党员之日起,就有了党籍。若被取消预备党员资格、劝退除名、自行脱党、开除党籍的,就失去了党籍。 …...
C语言基础:printf 函数介绍;以及常用四种常用的数据类型
printf 函数介绍 #include <stdio.h> int main() { /* * %c:字符 ; %d:带符号整数; %f: 浮点数; %s: 一串字符; */ int age21; printf(“hello %s,you are %d years old\n”,“Bob”,age); int i 10; double f96.20; printf(“student number%3d,score%f\n”…...

【LeetCode-中等题】209. 长度最小的子数组
文章目录 题目方法一:滑动窗口:方法二: 题目 方法一:滑动窗口: 参考图解动画:长度最小的子数组 class Solution { //方法一:滑动窗口public int minSubArrayLen(int target, int[] nums) {int n nums.l…...

比较聚合模型实战文本匹配
引言 本文我们采用比较聚合模型来实现文本匹配任务。 数据准备 数据准备包括 构建词表(Vocabulary)构建数据集(Dataset) 本次用的是LCQMC通用领域问题匹配数据集,它已经分好了训练、验证和测试集。 我们通过pandas来加载一下。 import pandas as pdtrain_df …...
LA@二次型@标准化相关原理和方法
文章目录 标准化方法正交变换法🎈求矩阵的特征值求各特征值对应的线性无关特征向量组正交化各个向量组 配方法步骤例例 初等变换法原理总结初等变换法的步骤例 标准化方法 正交变换法🎈 二次型可标准化定理的证明过程给出使用二次型标准化的步骤 该方法…...

Git与IDEA: 解决`dev`分支切换问题及其背后原因 为何在IDEA中无法切换到`dev`分支?全面解析!
🌷🍁 博主猫头虎(🐅🐾)带您 Go to New World✨🍁 🦄 博客首页——🐅🐾猫头虎的博客🎐 🐳 《面试题大全专栏》 🦕 文章图文…...

什么是JavaScript中的严格模式(strict mode)?应用场景是什么?
聚沙成塔每天进步一点点 ⭐ 专栏简介⭐ 严格模式(Strict Mode):⭐ 使用场景⭐ 写在最后 ⭐ 专栏简介 前端入门之旅:探索Web开发的奇妙世界 记得点击上方或者右侧链接订阅本专栏哦 几何带你启航前端之旅 欢迎来到前端入门之旅&…...

红外特征吸收峰特征总结(主要基团的红外特征吸收峰)
特此记录 anlog 2023年9月11日...
ChatGPT AIGC 完成关联分析散点图的应用
关联分析是数据分析中非常重要的一种技术手段,它能够帮助我们在大量数据中发现变量之间的关系和相互影响。在数据分析领域,关联分析被广泛应用于市场营销、销售预测、客户行为分析等领域。 关联分析的主要功能是通过挖掘数据中的关联规则,来发现数据集中事物之间的关联性。…...
CentOS7.6上实现Spring Boot(JAR包)开机自启
前言 Linux自启(或开机自启)指的是在Linux系统启动时自动运行特定的程序或脚本。当计算机启动时,操作系统会按照一定的顺序加载系统服务和配置,其中包括自动启动一些应用程序或服务。这些应用程序或服务会在系统启动后自动运行&a…...

Java开发之框架(spring、springmvc、springboot、mybatis)【面试篇 完结版】
提示:文章写完后,目录可以自动生成,如何生成可参考右边的帮助文档 文章目录 前言一、框架知识分布二、Spring1. spring-单例bean① 问题引入② 单例bean是线程安全的吗③ 问题总结④ 实战面试 2. spring-AOP① 问题引入② AOP记录操作日志③ …...
QT人脸识别知识
机器学习的作用:根据提供的图片模型通过算法生成数据模型,从而在其它图片中查找相关的目 标。 级联分类器:是用来人脸识别。 在判断之前,我们要先进行学习,生成人脸的模型以便后续识别使用。 人脸识别器:…...

熟悉Redis6
NoSQL数据库简介 技术发展 技术的分类 1、解决功能性的问题:Java、Jsp、RDBMS、Tomcat、HTML、Linux、JDBC、SVN 2、解决扩展性的问题:Struts、Spring、SpringMVC、Hibernate、Mybatis 3、解决性能的问题:NoSQL、Java线程、Hadoop、Nginx…...
ip地址会随网络变化而变化吗
随着科技的飞速发展,互联网已深入我们生活的方方面面。在这庞大的网络世界中,IP地址作为网络通信的基础元素,引起了广泛关注。网络变化与IP地址之间存在着密切的关系。那么,IP地址是否会随着网络变化而变化呢?虎观代理…...
QT连接服务器通信,客户端以及服务器端
服务器端 .h文件 #ifndef WIDGET_H #define WIDGET_H#include <QWidget> #include <QTcpServer> //服务器头文件 #include <QTcpSocket> //客户端头文件 #include <QList> //链表头文件,用来存放客户端容器 #include <QDebug> #i…...

Vuex仓库的创建
vuex 的使用 - 创建仓库 文章目录 vuex 的使用 - 创建仓库1.安装 vuex2.新建 store/index.js 专门存放 vuex3.创建仓库 store/index.js4 在 main.js 中导入挂载到 Vue 实例上5.测试打印Vuex 1.安装 vuex 安装vuex与vue-router类似,vuex是一个独立存在的插件&#x…...

C++中的红黑树
红黑树 搜索二叉树搜索二叉树的模拟实现平衡搜索二叉树(AVL Tree)平衡搜索二叉树的模拟实现红黑树(Red Black Tree)红黑树的模拟实现 红黑树的应用(Map 和 Set)Map和Set的封装 搜索二叉树 搜索二叉树的概念:二叉搜索树又称二叉排序树,它或者是一棵空树&…...

中南大学无人机智能体的全面评估!BEDI:用于评估无人机上具身智能体的综合性基准测试
作者:Mingning Guo, Mengwei Wu, Jiarun He, Shaoxian Li, Haifeng Li, Chao Tao单位:中南大学地球科学与信息物理学院论文标题:BEDI: A Comprehensive Benchmark for Evaluating Embodied Agents on UAVs论文链接:https://arxiv.…...
系统设计 --- MongoDB亿级数据查询优化策略
系统设计 --- MongoDB亿级数据查询分表策略 背景Solution --- 分表 背景 使用audit log实现Audi Trail功能 Audit Trail范围: 六个月数据量: 每秒5-7条audi log,共计7千万 – 1亿条数据需要实现全文检索按照时间倒序因为license问题,不能使用ELK只能使用…...

Springcloud:Eureka 高可用集群搭建实战(服务注册与发现的底层原理与避坑指南)
引言:为什么 Eureka 依然是存量系统的核心? 尽管 Nacos 等新注册中心崛起,但金融、电力等保守行业仍有大量系统运行在 Eureka 上。理解其高可用设计与自我保护机制,是保障分布式系统稳定的必修课。本文将手把手带你搭建生产级 Eur…...
【Java学习笔记】BigInteger 和 BigDecimal 类
BigInteger 和 BigDecimal 类 二者共有的常见方法 方法功能add加subtract减multiply乘divide除 注意点:传参类型必须是类对象 一、BigInteger 1. 作用:适合保存比较大的整型数 2. 使用说明 创建BigInteger对象 传入字符串 3. 代码示例 import j…...

浪潮交换机配置track检测实现高速公路收费网络主备切换NQA
浪潮交换机track配置 项目背景高速网络拓扑网络情况分析通信线路收费网络路由 收费汇聚交换机相应配置收费汇聚track配置 项目背景 在实施省内一条高速公路时遇到的需求,本次涉及的主要是收费汇聚交换机的配置,浪潮网络设备在高速项目很少,通…...

基于Springboot+Vue的办公管理系统
角色: 管理员、员工 技术: 后端: SpringBoot, Vue2, MySQL, Mybatis-Plus 前端: Vue2, Element-UI, Axios, Echarts, Vue-Router 核心功能: 该办公管理系统是一个综合性的企业内部管理平台,旨在提升企业运营效率和员工管理水…...

基于PHP的连锁酒店管理系统
有需要请加文章底部Q哦 可远程调试 基于PHP的连锁酒店管理系统 一 介绍 连锁酒店管理系统基于原生PHP开发,数据库mysql,前端bootstrap。系统角色分为用户和管理员。 技术栈 phpmysqlbootstrapphpstudyvscode 二 功能 用户 1 注册/登录/注销 2 个人中…...
【SpringBoot自动化部署】
SpringBoot自动化部署方法 使用Jenkins进行持续集成与部署 Jenkins是最常用的自动化部署工具之一,能够实现代码拉取、构建、测试和部署的全流程自动化。 配置Jenkins任务时,需要添加Git仓库地址和凭证,设置构建触发器(如GitHub…...
Monorepo架构: Nx Cloud 扩展能力与缓存加速
借助 Nx Cloud 实现项目协同与加速构建 1 ) 缓存工作原理分析 在了解了本地缓存和远程缓存之后,我们来探究缓存是如何工作的。以计算文件的哈希串为例,若后续运行任务时文件哈希串未变,系统会直接使用对应的输出和制品文件。 2 …...

基于开源AI智能名片链动2 + 1模式S2B2C商城小程序的沉浸式体验营销研究
摘要:在消费市场竞争日益激烈的当下,传统体验营销方式存在诸多局限。本文聚焦开源AI智能名片链动2 1模式S2B2C商城小程序,探讨其在沉浸式体验营销中的应用。通过对比传统品鉴、工厂参观等初级体验方式,分析沉浸式体验的优势与价值…...