加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
该仓库未声明开源许可证文件(LICENSE),使用请关注具体项目描述及其代码上游依赖。
克隆/下载
0197-solve-compile-err-in-20.03.patch 1.36 KB
一键复制 编辑 原始数据 按行查看 历史
yinbin6 提交于 2024-06-25 15:11 . sync solve compile err in 20.03
From 7755b72b475fdb5fbd75f51cfb8dfd4a49b70852 Mon Sep 17 00:00:00 2001
From: hantwofish <hankangkang5@huawei.com>
Date: Mon, 24 Jun 2024 15:26:31 +0800
Subject: [PATCH] solve complie err in 20.03 RTE_ETHER_ADDR_PRT_FMT
RTE_ETHER_ADDR_BYTES are defined in dpdk 21.11
---
src/lstack/include/lstack_virtio.h | 15 +++++++++++++++
1 file changed, 15 insertions(+)
diff --git a/src/lstack/include/lstack_virtio.h b/src/lstack/include/lstack_virtio.h
index 5e001ca..d40c754 100644
--- a/src/lstack/include/lstack_virtio.h
+++ b/src/lstack/include/lstack_virtio.h
@@ -15,6 +15,21 @@
#include <stdint.h>
#define VIRTIO_MAX_QUEUE_NUM 8
+
+// RTE_ETHER_ADDR_PRT_FMT RTE_ETHER_ADDR_BYTES are defined in dpdk 21.11
+#ifndef RTE_ETHER_ADDR_PRT_FMT
+#define RTE_ETHER_ADDR_PRT_FMT "%02X:%02X:%02X:%02X:%02X:%02X"
+#endif
+
+#ifndef RTE_ETHER_ADDR_BYTES
+#define RTE_ETHER_ADDR_BYTES(mac_addrs) ((mac_addrs)->addr_bytes[0]), \
+ ((mac_addrs)->addr_bytes[1]), \
+ ((mac_addrs)->addr_bytes[2]), \
+ ((mac_addrs)->addr_bytes[3]), \
+ ((mac_addrs)->addr_bytes[4]), \
+ ((mac_addrs)->addr_bytes[5])
+#endif
+
struct virtio_instance {
uint16_t lstack_port_id;
uint16_t virtio_port_id;
--
2.33.0
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化