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的封装 搜索二叉树 搜索二叉树的概念:二叉搜索树又称二叉排序树,它或者是一棵空树&…...
Go 协程池设计与调度实现
Go 协程池设计与调度实现 在并发编程中,Go 语言的协程(goroutine)以其轻量级和高性能著称。无限制地创建协程可能导致资源耗尽,影响系统稳定性。为此,协程池的设计与调度成为优化高并发场景的重要手段。本文将深入探讨…...
GStreamer性能优化指南:在Jetson TX2上实现4K视频低延迟处理(基于NVMM内存)
GStreamer性能优化指南:在Jetson TX2上实现4K视频低延迟处理(基于NVMM内存) 在嵌入式视觉和实时视频处理领域,NVIDIA Jetson TX2凭借其强大的GPU和专用硬件加速单元,成为工业级应用的理想选择。但要将这块开发板的性能…...
从SWF中提取加密通信协议:JPEXS Free Flash Decompiler安全分析报告
从SWF中提取加密通信协议:JPEXS Free Flash Decompiler安全分析报告 【免费下载链接】jpexs-decompiler JPEXS Free Flash Decompiler 项目地址: https://gitcode.com/gh_mirrors/jp/jpexs-decompiler 在网络安全分析领域,SWF(Shockwa…...
别再只开会了!解锁Jitsi隐藏玩法:用Freeswitch+Jigasi打造智能电话会议IVR
解锁Jitsi企业级应用:用FreeswitchJigasi构建智能会议IVR系统 当视频会议成为企业刚需,大多数团队仍停留在基础会议功能层面。开源工具Jitsi与电信级软交换平台Freeswitch的结合,能创造出远超常规会议体验的智能交互系统。想象一下这样的场景…...
如何快速找到领域内的核心论文?3 条最有效路径
在做科研文献检索时,很多研究者都会遇到同一个问题: 文献很多,但不知道哪些最重要。例如,当你在数据库中输入一个研究关键词时,检索结果可能会出现几百篇甚至上千篇论文。面对如此庞大的文献数量,很多人会产…...
颠覆传统系统管理的轻量级工具:NSudo如何重新定义权限操作
颠覆传统系统管理的轻量级工具:NSudo如何重新定义权限操作 【免费下载链接】NSudo [Deprecated, work in progress alternative: https://github.com/M2Team/NanaRun] Series of System Administration Tools 项目地址: https://gitcode.com/gh_mirrors/ns/NSudo …...
nli-distilroberta-base多场景:跨境电商商品描述与用户评论的语义一致性检测
nli-distilroberta-base多场景:跨境电商商品描述与用户评论的语义一致性检测 1. 项目概述 nli-distilroberta-base是一个基于DistilRoBERTa模型的自然语言推理(NLI)Web服务,专门用于分析两个句子之间的逻辑关系。这个轻量级但强大的工具在跨境电商领域…...
Linux下RTL8188无线网卡变身AP热点:从驱动安装到自动分配IP全流程(附避坑指南)
Linux下RTL8188无线网卡配置AP热点全攻略:从驱动到自动IP分配的实战指南 在嵌入式开发和物联网应用中,将无线网卡配置为接入点(AP)是常见需求。RTL8188系列USB无线网卡因其高性价比和广泛兼容性,成为开发者的热门选择。…...
acjscsdbhvusfd
一、yolo v1是什么? YOLO(You Only Look Once)算法 是一种目标检测算法,是经典的one-stage方法。YOLO v1 开创了单阶段目标检测的先河,其简洁的架构 和高效的推理为后续版本奠定了基础。尽管存在小目标检测和定位精度的…...
分子构象采样新范式:CREST工具解决药物研发核心挑战
分子构象采样新范式:CREST工具解决药物研发核心挑战 【免费下载链接】crest Conformer-Rotamer Ensemble Sampling Tool based on the xtb Semiempirical Extended Tight-Binding Program Package 项目地址: https://gitcode.com/gh_mirrors/crest/crest 在药…...
