1 Star 0 Fork 32

LemmyHuang/gazelle_1

forked from src-openEuler/gazelle 
加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
该仓库未声明开源许可证文件(LICENSE),使用请关注具体项目描述及其代码上游依赖。
克隆/下载
0162-fix-vlan-filter-can-be-added-when-vlan_mode-1.patch 1.17 KB
一键复制 编辑 原始数据 按行查看 历史
From c392e263cb5f5392713600174d3b8955f2d26759 Mon Sep 17 00:00:00 2001
From: zhengjiebing <zhengjiebing_yewu@cmss.chinamobile.com>
Date: Wed, 3 Apr 2024 14:33:57 +0800
Subject: [PATCH] fix vlan filter can be added when vlan_mode=-1
---
src/lstack/core/lstack_dpdk.c | 10 ++++++----
1 file changed, 6 insertions(+), 4 deletions(-)
diff --git a/src/lstack/core/lstack_dpdk.c b/src/lstack/core/lstack_dpdk.c
index 42981f4..b972c00 100644
--- a/src/lstack/core/lstack_dpdk.c
+++ b/src/lstack/core/lstack_dpdk.c
@@ -624,10 +624,12 @@ int32_t dpdk_ethdev_init(int port_id, bool bond_port)
}
/* after rte_eth_dev_configure */
- ret = rte_eth_dev_vlan_filter(port_id, get_global_cfg_params()->nic.vlan_mode, 1);
- if (ret != 0) {
- LSTACK_LOG(ERR, LSTACK, "dpdk add vlan filter failed ret = %d\n", ret);
- return -1;
+ if (get_global_cfg_params()->nic.vlan_mode != -1) {
+ ret = rte_eth_dev_vlan_filter(port_id, get_global_cfg_params()->nic.vlan_mode, 1);
+ if (ret != 0) {
+ LSTACK_LOG(ERR, LSTACK, "dpdk add vlan filter failed ret = %d\n", ret);
+ return -1;
+ }
}
rte_eth_allmulticast_enable(port_id);
--
2.33.0
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/LemmyHuang/gazelle_1.git
git@gitee.com:LemmyHuang/gazelle_1.git
LemmyHuang
gazelle_1
gazelle_1
master

搜索帮助

0d507c66 1850385 C8b1a773 1850385