17 Star 12 Fork 76

src-openEuler/dpdk

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
该仓库未声明开源许可证文件(LICENSE),使用请关注具体项目描述及其代码上游依赖。
克隆/下载
0035-net-hns3-support-new-device.patch 2.97 KB
一键复制 编辑 原始数据 按行查看 历史
huangdengdui 提交于 2024-03-22 17:48 . sync some patch from upstreaming
From dbf7316d5041c189e2b10fafc9b4e70ef81fa78b Mon Sep 17 00:00:00 2001
From: Jie Hai <[email protected]>
Date: Fri, 15 Mar 2024 10:54:48 +0800
Subject: [PATCH 33/33] net/hns3: support new device
[ upstream commit 3f1436d7006c2659232305ef2b8b186796319041 ]
This patch introduces the new devices, which are on-chip network
interface controllers with RDMA/DCB/ROH supporting. One is 100GE
and the other is 200GE. Both can be found on HIP09/HIP10 SoCs.
Signed-off-by: Jie Hai <[email protected]>
---
doc/guides/nics/hns3.rst | 2 +-
drivers/net/hns3/hns3_cmd.c | 4 +++-
drivers/net/hns3/hns3_ethdev.c | 2 ++
drivers/net/hns3/hns3_ethdev.h | 2 ++
4 files changed, 8 insertions(+), 2 deletions(-)
diff --git a/doc/guides/nics/hns3.rst b/doc/guides/nics/hns3.rst
index 3b0613f..3e84d1f 100644
--- a/doc/guides/nics/hns3.rst
+++ b/doc/guides/nics/hns3.rst
@@ -6,7 +6,7 @@ HNS3 Poll Mode Driver
The hns3 PMD (**librte_net_hns3**) provides poll mode driver support
for the inbuilt HiSilicon Network Subsystem(HNS) network engine
-found in the HiSilicon Kunpeng 920 SoC and Kunpeng 930 SoC .
+found in the HiSilicon Kunpeng 920 SoC (HIP08) and Kunpeng 930 SoC (HIP09/HIP10).
Features
--------
diff --git a/drivers/net/hns3/hns3_cmd.c b/drivers/net/hns3/hns3_cmd.c
index 2c16644..001ff49 100644
--- a/drivers/net/hns3/hns3_cmd.c
+++ b/drivers/net/hns3/hns3_cmd.c
@@ -545,7 +545,9 @@ hns3_set_dcb_capability(struct hns3_hw *hw)
if (device_id == HNS3_DEV_ID_25GE_RDMA ||
device_id == HNS3_DEV_ID_50GE_RDMA ||
device_id == HNS3_DEV_ID_100G_RDMA_MACSEC ||
- device_id == HNS3_DEV_ID_200G_RDMA)
+ device_id == HNS3_DEV_ID_200G_RDMA ||
+ device_id == HNS3_DEV_ID_100G_ROH ||
+ device_id == HNS3_DEV_ID_200G_ROH)
hns3_set_bit(hw->capability, HNS3_DEV_SUPPORT_DCB_B, 1);
}
diff --git a/drivers/net/hns3/hns3_ethdev.c b/drivers/net/hns3/hns3_ethdev.c
index b10d121..9730b9a 100644
--- a/drivers/net/hns3/hns3_ethdev.c
+++ b/drivers/net/hns3/hns3_ethdev.c
@@ -6649,6 +6649,8 @@ static const struct rte_pci_id pci_id_hns3_map[] = {
{ RTE_PCI_DEVICE(PCI_VENDOR_ID_HUAWEI, HNS3_DEV_ID_50GE_RDMA) },
{ RTE_PCI_DEVICE(PCI_VENDOR_ID_HUAWEI, HNS3_DEV_ID_100G_RDMA_MACSEC) },
{ RTE_PCI_DEVICE(PCI_VENDOR_ID_HUAWEI, HNS3_DEV_ID_200G_RDMA) },
+ { RTE_PCI_DEVICE(PCI_VENDOR_ID_HUAWEI, HNS3_DEV_ID_100G_ROH) },
+ { RTE_PCI_DEVICE(PCI_VENDOR_ID_HUAWEI, HNS3_DEV_ID_200G_ROH) },
{ .vendor_id = 0, }, /* sentinel */
};
diff --git a/drivers/net/hns3/hns3_ethdev.h b/drivers/net/hns3/hns3_ethdev.h
index 12d8299..e70c5ff 100644
--- a/drivers/net/hns3/hns3_ethdev.h
+++ b/drivers/net/hns3/hns3_ethdev.h
@@ -28,7 +28,9 @@
#define HNS3_DEV_ID_25GE_RDMA 0xA222
#define HNS3_DEV_ID_50GE_RDMA 0xA224
#define HNS3_DEV_ID_100G_RDMA_MACSEC 0xA226
+#define HNS3_DEV_ID_100G_ROH 0xA227
#define HNS3_DEV_ID_200G_RDMA 0xA228
+#define HNS3_DEV_ID_200G_ROH 0xA22C
#define HNS3_DEV_ID_100G_VF 0xA22E
#define HNS3_DEV_ID_100G_RDMA_PFC_VF 0xA22F
--
2.33.0
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/src-openeuler/dpdk.git
[email protected]:src-openeuler/dpdk.git
src-openeuler
dpdk
dpdk
master

搜索帮助