Sign in
Sign up
Explore
Enterprise
Education
Search
Help
Terms of use
About Us
Explore
Enterprise
Education
Gitee Premium
Gitee AI
AI teammates
Sign in
Sign up
Fetch the repository succeeded.
description of repo status
Open Source
>
Other
>
Operation System
&&
Donate
Please sign in before you donate.
Cancel
Sign in
Scan WeChat QR to Pay
Cancel
Complete
Prompt
Switch to Alipay.
OK
Cancel
Watch
Unwatch
Watching
Releases Only
Ignoring
458
Star
1.7K
Fork
1.9K
GVP
openEuler
/
kernel
Closed
Code
Issues
1271
Pull Requests
991
Wiki
Insights
Pipelines
Service
Quality Analysis
Jenkins for Gitee
Tencent CloudBase
Tencent Cloud Serverless
悬镜安全
Aliyun SAE
Codeblitz
SBOM
DevLens
Don’t show this again
Update failed. Please try again later!
Remove this flag
Content Risk Flag
This task is identified by
as the content contains sensitive information such as code security bugs, privacy leaks, etc., so it is only accessible to contributors of this repository.
【openEuler 20.03 lts SP3】hns3网卡VF开启防欺诈功能后,VF的vlan filter功能被错误关闭
Done
#I4W96A
Bug
Yonglong Liu
Opened this issue
2022-03-04 10:11
【标题描述】 hns3网卡VF开启防欺诈功能(或者PF发生复位)后,VF的vlan filter功能被错误关闭,导致VF能收到任意vlan的报文。 【环境信息】 硬件信息: TS200-2280服务器 软件信息: 1) OS版本及分支:openEuler 20.03 LTS SP3 2) 内核信息:4.19.90-2112.5.0.0129.oe1.aarch64 3) hns3问题驱动版本:1.8.11.0~21.12.4 【问题复现步骤】 1、本端按照下列步骤配置: [root@localhost ~]# echo 2 > /sys/class/net/enp189s0f0/device/sriov_numvfs --- 需要使能2个vf,以观察不同vlan的收包情况 [root@localhost ~]# ethtool -L enp189s0f0v0 combined 1 ---- 改为1个队列便于观察收包情况 [root@localhost ~]# ethtool -L enp189s0f0v1 combined 1 [root@localhost ~]# ip link set enp189s0f0 vf 0 mac 22:a0:cb:a8:b5:19 --- 配置固定mac,便于对端mz发包构造使用 [root@localhost ~]# ip link set enp189s0f0 vf 1 mac 22:a0:cb:a8:b5:20 [root@localhost ~]# ip link set enp189s0f0 vf 0 vlan 100 --- 两个vf分别配置不同的vlan [root@localhost ~]# ip link set enp189s0f0 vf 1 vlan 101 2、本端查询vlan过滤功能如下: [root@localhost ~]# cat /sys/kernel/debug/hns3/0000\:bd\:00.0/vlan_config I_PORT_VLAN_FILTER: on E_PORT_VLAN_FILTER: off FUNC_ID I_VF_VLAN_FILTER E_VF_VLAN_FILTER pf off on vf0 off on --- 关注此项目 vf1 off on FUNC_ID PVID ACCEPT_TAG1 ACCEPT_TAG2 ACCEPT_UNTAG1 ACCEPT_UNTAG2 INSERT_TAG1 INSERT_TAG2 STRIP_TAG1 STRIP_TAG2 PRI_ONLY_TAG1 PRI_ONLY_TAG2 pf 0 on on on on off off off on off off vf0 100 off on on on on off on on off off vf1 101 off on on on on off on on off off 3、对vf配置spoof: ip link set enp189s0f0 vf 0 spoof on 或者触发一个PF复位: echo 1 > /sys/class/net/enp189s0f0/device/reset 4、本端用下面命令监控vf收包情况 watch -d -n 1 "ethtool -S enp189s0f0v0 |grep pktnum" 5、对端通过mz发包: 步骤1: mz enp189s0f0 -t ip sp=5000,dp=5011 -b 22:a0:cb:a8:b5:19 -p 1000 -c 1000 步骤2: mz enp189s0f0 -t ip sp=5000,dp=5011 -b 22:a0:cb:a8:b5:19 -p 1000 -c 1000 -Q 100 步骤3: mz enp189s0f0 -t ip sp=5000,dp=5011 -b 22:a0:cb:a8:b5:19 -p 1000 -c 1000 -Q 101 【预期结果】 步骤1:rx方向报文不增长 步骤2:rx方向报文增长1000个 步骤3:rx方向报文不增长 【实际结果】 步骤1:rx方向报文增长1000个 步骤2:rx方向报文增长1000个 步骤3:rx方向报文增长1000个
【标题描述】 hns3网卡VF开启防欺诈功能(或者PF发生复位)后,VF的vlan filter功能被错误关闭,导致VF能收到任意vlan的报文。 【环境信息】 硬件信息: TS200-2280服务器 软件信息: 1) OS版本及分支:openEuler 20.03 LTS SP3 2) 内核信息:4.19.90-2112.5.0.0129.oe1.aarch64 3) hns3问题驱动版本:1.8.11.0~21.12.4 【问题复现步骤】 1、本端按照下列步骤配置: [root@localhost ~]# echo 2 > /sys/class/net/enp189s0f0/device/sriov_numvfs --- 需要使能2个vf,以观察不同vlan的收包情况 [root@localhost ~]# ethtool -L enp189s0f0v0 combined 1 ---- 改为1个队列便于观察收包情况 [root@localhost ~]# ethtool -L enp189s0f0v1 combined 1 [root@localhost ~]# ip link set enp189s0f0 vf 0 mac 22:a0:cb:a8:b5:19 --- 配置固定mac,便于对端mz发包构造使用 [root@localhost ~]# ip link set enp189s0f0 vf 1 mac 22:a0:cb:a8:b5:20 [root@localhost ~]# ip link set enp189s0f0 vf 0 vlan 100 --- 两个vf分别配置不同的vlan [root@localhost ~]# ip link set enp189s0f0 vf 1 vlan 101 2、本端查询vlan过滤功能如下: [root@localhost ~]# cat /sys/kernel/debug/hns3/0000\:bd\:00.0/vlan_config I_PORT_VLAN_FILTER: on E_PORT_VLAN_FILTER: off FUNC_ID I_VF_VLAN_FILTER E_VF_VLAN_FILTER pf off on vf0 off on --- 关注此项目 vf1 off on FUNC_ID PVID ACCEPT_TAG1 ACCEPT_TAG2 ACCEPT_UNTAG1 ACCEPT_UNTAG2 INSERT_TAG1 INSERT_TAG2 STRIP_TAG1 STRIP_TAG2 PRI_ONLY_TAG1 PRI_ONLY_TAG2 pf 0 on on on on off off off on off off vf0 100 off on on on on off on on off off vf1 101 off on on on on off on on off off 3、对vf配置spoof: ip link set enp189s0f0 vf 0 spoof on 或者触发一个PF复位: echo 1 > /sys/class/net/enp189s0f0/device/reset 4、本端用下面命令监控vf收包情况 watch -d -n 1 "ethtool -S enp189s0f0v0 |grep pktnum" 5、对端通过mz发包: 步骤1: mz enp189s0f0 -t ip sp=5000,dp=5011 -b 22:a0:cb:a8:b5:19 -p 1000 -c 1000 步骤2: mz enp189s0f0 -t ip sp=5000,dp=5011 -b 22:a0:cb:a8:b5:19 -p 1000 -c 1000 -Q 100 步骤3: mz enp189s0f0 -t ip sp=5000,dp=5011 -b 22:a0:cb:a8:b5:19 -p 1000 -c 1000 -Q 101 【预期结果】 步骤1:rx方向报文不增长 步骤2:rx方向报文增长1000个 步骤3:rx方向报文不增长 【实际结果】 步骤1:rx方向报文增长1000个 步骤2:rx方向报文增长1000个 步骤3:rx方向报文增长1000个
Comments (
1
)
Sign in
to comment
Status
Done
Backlog
已挂起
Fixing
Confirmed
Done
Accepted
Canceled
Assignees
Not set
Labels
sig/Kernel
Not set
Projects
Unprojected
Unprojected
Pull Requests
None yet
None yet
Successfully merging a pull request will close this issue.
Branches
No related branch
Branches (
-
)
Tags (
-
)
Planed to start   -   Planed to end
-
Top level
Not Top
Top Level: High
Top Level: Medium
Top Level: Low
Priority
Not specified
Serious
Main
Secondary
Unimportant
Duration
(hours)
参与者(2)
C
1
https://gitee.com/openeuler/kernel.git
git@gitee.com:openeuler/kernel.git
openeuler
kernel
kernel
Going to Help Center
Search
Git 命令在线学习
如何在 Gitee 导入 GitHub 仓库
Git 仓库基础操作
企业版和社区版功能对比
SSH 公钥设置
如何处理代码冲突
仓库体积过大,如何减小?
如何找回被删除的仓库数据
Gitee 产品配额说明
GitHub仓库快速导入Gitee及同步更新
什么是 Release(发行版)
将 PHP 项目自动发布到 packagist.org
Comment
Repository Report
Back to the top
Login prompt
This operation requires login to the code cloud account. Please log in before operating.
Go to login
No account. Register