1 Star 0 Fork 32

LemmyHuang/gazelle_1

forked from src-openEuler/gazelle 
加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
该仓库未声明开源许可证文件(LICENSE),使用请关注具体项目描述及其代码上游依赖。
克隆/下载
0167-fix-port-not-support-vlan-filter.patch 1023 Bytes
一键复制 编辑 原始数据 按行查看 历史
yinbin6 提交于 2024-04-12 16:35 . sync patch from openEuler/gazelle
From 3171100d06146791ab9d22523805b8ed580daf3f Mon Sep 17 00:00:00 2001
From: yinbin6 <yinbin8@huawei.com>
Date: Fri, 12 Apr 2024 15:09:12 +0800
Subject: [PATCH] fix port not support vlan filter
---
src/lstack/core/lstack_dpdk.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/src/lstack/core/lstack_dpdk.c b/src/lstack/core/lstack_dpdk.c
index a6a8a01..5d90408 100644
--- a/src/lstack/core/lstack_dpdk.c
+++ b/src/lstack/core/lstack_dpdk.c
@@ -624,7 +624,8 @@ int32_t dpdk_ethdev_init(int port_id, bool bond_port)
}
/* after rte_eth_dev_configure */
- if (get_global_cfg_params()->nic.vlan_mode != -1) {
+ if ((get_global_cfg_params()->nic.vlan_mode != -1) &&
+ ((stack_group->rx_offload & RTE_ETH_RX_OFFLOAD_VLAN_FILTER) == RTE_ETH_RX_OFFLOAD_VLAN_FILTER)) {
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);
--
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