Compare commits

...

10 Commits

Author SHA1 Message Date
openeuler-ci-bot
34ebea8740
!593 sync some patches from upstream about bugfix
From: @chenyi211 
Reviewed-by: @li-huisong 
Signed-off-by: @li-huisong
2024-06-04 06:31:19 +00:00
chenyi
06d6bbebf3 sync some patches from upstream about bugfix
Sync some patches from upstream about bugfix, modifies
are as follow:
 - net/hns3: support new device
 - dma/hisilicon: remove support for HIP09 platform
2024-06-03 15:04:51 +08:00
openeuler-ci-bot
8b1da3c048
!587 sync some patches from upstream about bugfix
From: @chenyi211 
Reviewed-by: @li-huisong 
Signed-off-by: @li-huisong
2024-05-30 02:34:40 +00:00
chenyi
7573bb9b6f sync some patches from upstream about bugfix
Sync some patches from upstream about bugfix, modifies
are as follow:
 - app/testpmd: fix crash in multi-process forwarding
 - net/hns3: fix offload flag of IEEE 1588
 - net/hns3: fix read Rx timestamp handle
 - net/hns3: fix double free for Rx/Tx queue
 - net/hns3: fix variable overflow
 - net/hns3: enable PFC for all user priorities
 - ring: add telemetry command for ring info
 - ring: add telemetry command to list rings
 - net/hns3: support power monitor
 - net/hns3: disable SCTP verification tag for RSS hash input
 - app/testpmd: fix RSS algorithm choice
2024-05-30 09:39:48 +08:00
openeuler-ci-bot
e4f8bbb3d5
!543 add rte_eth_bond_link_monitoring_get in map
From: @yinbin6 
Reviewed-by: @jiangheng12 
Signed-off-by: @jiangheng12
2024-04-10 06:21:03 +00:00
zhangmengxuan
d8fbc2d080 add rte_eth_bond_link_monitoring_get in map 2024-04-10 11:55:57 +08:00
openeuler-ci-bot
0ae67e2b88
!534 Add support for ppc64le
From: @peng_zou 
Reviewed-by: @li-huisong 
Signed-off-by: @li-huisong
2024-03-12 07:07:48 +00:00
peng.zou
9580d07038 Add support for ppc64le 2024-02-02 14:12:43 +08:00
openeuler-ci-bot
6c6636702b
!524 [sync] PR-522: hns3 don't support QinQ insert for VF
From: @openeuler-sync-bot 
Reviewed-by: @li-huisong 
Signed-off-by: @li-huisong
2024-01-01 11:20:59 +00:00
Dengdui Huang
f55ad35986 net/hns3: don't support QinQ insert for VF
This patch declare that the VF driver don't support QinQ insert.

Signed-off-by: Dengdui Huang <huangdengdui@huawei.com>
(cherry picked from commit 0183d0ca4a670691f11acc28259cfa29a0e63b00)
2023-12-29 17:36:08 +08:00
16 changed files with 1184 additions and 2 deletions

View File

@ -0,0 +1,45 @@
From 283338986c32000d7e145e2fa6e4d9fb2b973cfd Mon Sep 17 00:00:00 2001
From: Chengwen Feng <fengchengwen@huawei.com>
Date: Thu, 21 Dec 2023 09:12:26 +0800
Subject: [PATCH] net/hns3: don't support QinQ insert for VF
In the HIP08 platform, the PF driver will notify VF driver to update
the PVID state [1], and VF will declare support QinQ insert when PVID
is disabled.
In the later platform (e.g. HIP09), the hardware has been improved,
so the PF driver will NOT notify VF driver to update the PVID state.
However, the later platform still have constraint: PVID and QinQ insert
cannot be enabled at the same time, otherwise, the hardware discards
packets and reports an error interrupt.
Plus, as far as we known, VF driver's users don't use the QinQ insert.
Therefore, we declare that the VF driver don't support QinQ insert.
[1] commit b4e4d7ac9f09 ("net/hns3: support setting VF PVID by PF driver")
Cc: stable@dpdk.org
Signed-off-by: Chengwen Feng <fengchengwen@huawei.com>
---
drivers/net/hns3/hns3_common.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/net/hns3/hns3_common.c b/drivers/net/hns3/hns3_common.c
index 0d6b2c65af..717649f259 100644
--- a/drivers/net/hns3/hns3_common.c
+++ b/drivers/net/hns3/hns3_common.c
@@ -85,7 +85,7 @@ hns3_dev_infos_get(struct rte_eth_dev *eth_dev, struct rte_eth_dev_info *info)
RTE_ETH_TX_OFFLOAD_MBUF_FAST_FREE |
RTE_ETH_TX_OFFLOAD_VLAN_INSERT);
- if (!hw->port_base_vlan_cfg.state)
+ if (!hns->is_vf && !hw->port_base_vlan_cfg.state)
info->tx_offload_capa |= RTE_ETH_TX_OFFLOAD_QINQ_INSERT;
if (hns3_dev_get_support(hw, OUTER_UDP_CKSUM))
--
2.41.0.windows.2

View File

@ -0,0 +1,24 @@
From e3c4cd4a89b98f81d695919df67861d79b0db0dd Mon Sep 17 00:00:00 2001
From: zhangmengxuan <zhangmengxuan@kylinos.cn>
Date: Mon, 8 Apr 2024 17:58:55 +0800
Subject: [PATCH] add rte_eth_bond_link_monitoring_get in map
---
drivers/net/bonding/version.map | 1 +
1 file changed, 1 insertion(+)
diff --git a/drivers/net/bonding/version.map b/drivers/net/bonding/version.map
index d7142c4..c707107 100644
--- a/drivers/net/bonding/version.map
+++ b/drivers/net/bonding/version.map
@@ -17,6 +17,7 @@ DPDK_22 {
rte_eth_bond_create;
rte_eth_bond_free;
rte_eth_bond_link_monitoring_set;
+ rte_eth_bond_link_monitoring_get;
rte_eth_bond_mac_address_reset;
rte_eth_bond_mac_address_set;
rte_eth_bond_mode_get;
--
2.33.0

View File

@ -0,0 +1,36 @@
From 280a37ad83ef1af5f4f0cf7c486dbb5f87562ca2 Mon Sep 17 00:00:00 2001
From: Jie Hai <haijie1@huawei.com>
Date: Fri, 15 Mar 2024 11:00:53 +0800
Subject: [PATCH 419/431] app/testpmd: fix RSS algorithm choice
[ upstream commit 74345424a92f14acc608b36b09cb27b84e3a35aa ]
The RSS algorithm from user is parsed but not passed to the
rte_eth_dev_rss_hash_update() API as we wanted, this patch
fixes it.
Fixes: 3da59f30a23f ("app/testpmd: set RSS hash algorithm")
Cc: stable@dpdk.org
Signed-off-by: Jie Hai <haijie1@huawei.com>
Reviewed-by: Ferruh Yigit <ferruh.yigit@amd.com>
Signed-off-by: chenyi <chenyi211@huawei.com>
---
app/test-pmd/cmdline.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/app/test-pmd/cmdline.c b/app/test-pmd/cmdline.c
index ae0b47de72..5e77cb2e79 100644
--- a/app/test-pmd/cmdline.c
+++ b/app/test-pmd/cmdline.c
@@ -2449,6 +2449,7 @@ cmd_config_rss_hash_algo_parsed(void *parsed_result,
return;
}
+ rss_conf.algorithm = algorithm;
ret = rte_eth_dev_rss_hash_update(res->port_id, &rss_conf);
if (ret != 0) {
fprintf(stderr, "failed to set port %u RSS hash algorithm\n",
--
2.33.0

View File

@ -0,0 +1,94 @@
From 50d329b06bc5bb936b25970dae87549f0a90c21f Mon Sep 17 00:00:00 2001
From: Jie Hai <haijie1@huawei.com>
Date: Wed, 3 Apr 2024 18:16:23 +0800
Subject: [PATCH 420/431] net/hns3: disable SCTP verification tag for RSS hash
input
[ upstream commit 47d5fa9a91989c4671ecb8c3a7e767572846570c ]
When the symmetric RSS algorithm is used, the same packet is
expected to be hashed to the same queue in the upstream and
downstream directions.
The problem is that it could map the packets in the same SCTP
connection to different NIC RX queues depending on the direction
of packets. This is because the verification Tag is used as the
RSS hash input for the SCTP packets, and the value depends on the
peer end of the SCTP connection and could not be symmetrically
used in the hardware-implemented RSS algorithm.
In addition, the ethdev framework doesn't support setting SCTP
V-tag as the RSS hash input. So disable it for all RSS hash
algorithms.
Cc: stable@dpdk.org
Signed-off-by: Jie Hai <haijie1@huawei.com>
Signed-off-by: chenyi <chenyi211@huawei.com>
---
drivers/net/hns3/hns3_rss.c | 6 ++----
drivers/net/hns3/hns3_rss.h | 6 ++----
2 files changed, 4 insertions(+), 8 deletions(-)
diff --git a/drivers/net/hns3/hns3_rss.c b/drivers/net/hns3/hns3_rss.c
index 15feb26043..3eae4caf52 100644
--- a/drivers/net/hns3/hns3_rss.c
+++ b/drivers/net/hns3/hns3_rss.c
@@ -153,8 +153,7 @@ static const struct {
BIT_ULL(HNS3_RSS_FIELD_IPV4_SCTP_EN_IP_S) |
BIT_ULL(HNS3_RSS_FIELD_IPV4_SCTP_EN_IP_D) |
BIT_ULL(HNS3_RSS_FIELD_IPV4_SCTP_EN_SCTP_S) |
- BIT_ULL(HNS3_RSS_FIELD_IPV4_SCTP_EN_SCTP_D) |
- BIT_ULL(HNS3_RSS_FIELD_IPV4_SCTP_EN_SCTP_VER),
+ BIT_ULL(HNS3_RSS_FIELD_IPV4_SCTP_EN_SCTP_D),
HNS3_RSS_TUPLE_IPV4_SCTP_M },
/* IPV6-FRAG */
@@ -274,8 +273,7 @@ static const struct {
BIT_ULL(HNS3_RSS_FIELD_IPV6_SCTP_EN_IP_S) |
BIT_ULL(HNS3_RSS_FIELD_IPV6_SCTP_EN_IP_D) |
BIT_ULL(HNS3_RSS_FIELD_IPV6_SCTP_EN_SCTP_D) |
- BIT_ULL(HNS3_RSS_FIELD_IPV6_SCTP_EN_SCTP_S) |
- BIT_ULL(HNS3_RSS_FIELD_IPV6_SCTP_EN_SCTP_VER),
+ BIT_ULL(HNS3_RSS_FIELD_IPV6_SCTP_EN_SCTP_S),
HNS3_RSS_TUPLE_IPV6_SCTP_M },
};
diff --git a/drivers/net/hns3/hns3_rss.h b/drivers/net/hns3/hns3_rss.h
index 9d182a8025..0755760b45 100644
--- a/drivers/net/hns3/hns3_rss.h
+++ b/drivers/net/hns3/hns3_rss.h
@@ -49,7 +49,6 @@ enum hns3_tuple_field {
HNS3_RSS_FIELD_IPV4_SCTP_EN_SCTP_S,
HNS3_RSS_FIELD_IPV4_SCTP_EN_IP_D,
HNS3_RSS_FIELD_IPV4_SCTP_EN_IP_S,
- HNS3_RSS_FIELD_IPV4_SCTP_EN_SCTP_VER,
/* IPV4 ENABLE FIELD */
HNS3_RSS_FIELD_IPV4_EN_NONFRAG_IP_D = 24,
@@ -74,7 +73,6 @@ enum hns3_tuple_field {
HNS3_RSS_FIELD_IPV6_SCTP_EN_SCTP_S,
HNS3_RSS_FIELD_IPV6_SCTP_EN_IP_D,
HNS3_RSS_FIELD_IPV6_SCTP_EN_IP_S,
- HNS3_RSS_FIELD_IPV6_SCTP_EN_SCTP_VER,
/* IPV6 ENABLE FIELD */
HNS3_RSS_FIELD_IPV6_NONFRAG_IP_D = 56,
@@ -96,12 +94,12 @@ enum hns3_tuple_field {
#define HNS3_RSS_TUPLE_IPV4_TCP_M GENMASK(3, 0)
#define HNS3_RSS_TUPLE_IPV4_UDP_M GENMASK(11, 8)
-#define HNS3_RSS_TUPLE_IPV4_SCTP_M GENMASK(20, 16)
+#define HNS3_RSS_TUPLE_IPV4_SCTP_M GENMASK(19, 16)
#define HNS3_RSS_TUPLE_IPV4_NONF_M GENMASK(25, 24)
#define HNS3_RSS_TUPLE_IPV4_FLAG_M GENMASK(27, 26)
#define HNS3_RSS_TUPLE_IPV6_TCP_M GENMASK(35, 32)
#define HNS3_RSS_TUPLE_IPV6_UDP_M GENMASK(43, 40)
-#define HNS3_RSS_TUPLE_IPV6_SCTP_M GENMASK(52, 48)
+#define HNS3_RSS_TUPLE_IPV6_SCTP_M GENMASK(51, 48)
#define HNS3_RSS_TUPLE_IPV6_NONF_M GENMASK(57, 56)
#define HNS3_RSS_TUPLE_IPV6_FLAG_M GENMASK(59, 58)
--
2.33.0

View File

@ -0,0 +1,91 @@
From 97dd5755f1c76addc90c3c6ba7bb7a9c329cfd25 Mon Sep 17 00:00:00 2001
From: Chengwen Feng <fengchengwen@huawei.com>
Date: Mon, 5 Feb 2024 16:35:21 +0800
Subject: [PATCH 421/431] net/hns3: support power monitor
[ upstream commit 9e1e7dded323ce424aebf992f6ddfa9656655631 ]
This commit supports power monitor on the Rx queue descriptor of the
next poll.
Note: Although rte_power_monitor() on the ARM platform does not support
callback, this commit still implements the callback so that it does not
need to be adjusted after the ARM platform supports callback.
Signed-off-by: Chengwen Feng <fengchengwen@huawei.com>
Signed-off-by: Jie Hai <haijie1@huawei.com>
Signed-off-by: chenyi <chenyi211@huawei.com>
---
drivers/net/hns3/hns3_ethdev.c | 1 +
drivers/net/hns3/hns3_ethdev_vf.c | 1 +
drivers/net/hns3/hns3_rxtx.c | 21 +++++++++++++++++++++
drivers/net/hns3/hns3_rxtx.h | 1 +
4 files changed, 24 insertions(+)
diff --git a/drivers/net/hns3/hns3_ethdev.c b/drivers/net/hns3/hns3_ethdev.c
index c7a2147f39..0e1ca1b314 100644
--- a/drivers/net/hns3/hns3_ethdev.c
+++ b/drivers/net/hns3/hns3_ethdev.c
@@ -6501,6 +6501,7 @@ static const struct eth_dev_ops hns3_eth_dev_ops = {
.eth_dev_priv_dump = hns3_eth_dev_priv_dump,
.eth_rx_descriptor_dump = hns3_rx_descriptor_dump,
.eth_tx_descriptor_dump = hns3_tx_descriptor_dump,
+ .get_monitor_addr = hns3_get_monitor_addr,
};
static const struct hns3_reset_ops hns3_reset_ops = {
diff --git a/drivers/net/hns3/hns3_ethdev_vf.c b/drivers/net/hns3/hns3_ethdev_vf.c
index 0b4ad5a0f7..a6f0d77104 100644
--- a/drivers/net/hns3/hns3_ethdev_vf.c
+++ b/drivers/net/hns3/hns3_ethdev_vf.c
@@ -2290,6 +2290,7 @@ static const struct eth_dev_ops hns3vf_eth_dev_ops = {
.eth_dev_priv_dump = hns3_eth_dev_priv_dump,
.eth_rx_descriptor_dump = hns3_rx_descriptor_dump,
.eth_tx_descriptor_dump = hns3_tx_descriptor_dump,
+ .get_monitor_addr = hns3_get_monitor_addr,
};
static const struct hns3_reset_ops hns3vf_reset_ops = {
diff --git a/drivers/net/hns3/hns3_rxtx.c b/drivers/net/hns3/hns3_rxtx.c
index 81edd5258d..49f7177578 100644
--- a/drivers/net/hns3/hns3_rxtx.c
+++ b/drivers/net/hns3/hns3_rxtx.c
@@ -4883,3 +4883,24 @@ hns3_start_rxtx_datapath(struct rte_eth_dev *dev)
hns3_mp_req_start_rxtx(dev);
}
+
+static int
+hns3_monitor_callback(const uint64_t value,
+ const uint64_t arg[RTE_POWER_MONITOR_OPAQUE_SZ] __rte_unused)
+{
+ const uint64_t vld = rte_le_to_cpu_32(BIT(HNS3_RXD_VLD_B));
+ return (value & vld) == vld ? -1 : 0;
+}
+
+int
+hns3_get_monitor_addr(void *rx_queue, struct rte_power_monitor_cond *pmc)
+{
+ struct hns3_rx_queue *rxq = rx_queue;
+ struct hns3_desc *rxdp = &rxq->rx_ring[rxq->next_to_use];
+
+ pmc->addr = &rxdp->rx.bd_base_info;
+ pmc->fn = hns3_monitor_callback;
+ pmc->size = sizeof(uint32_t);
+
+ return 0;
+}
diff --git a/drivers/net/hns3/hns3_rxtx.h b/drivers/net/hns3/hns3_rxtx.h
index b6a6513307..18dcc75805 100644
--- a/drivers/net/hns3/hns3_rxtx.h
+++ b/drivers/net/hns3/hns3_rxtx.h
@@ -814,5 +814,6 @@ void hns3_stop_tx_datapath(struct rte_eth_dev *dev);
void hns3_start_tx_datapath(struct rte_eth_dev *dev);
void hns3_stop_rxtx_datapath(struct rte_eth_dev *dev);
void hns3_start_rxtx_datapath(struct rte_eth_dev *dev);
+int hns3_get_monitor_addr(void *rx_queue, struct rte_power_monitor_cond *pmc);
#endif /* HNS3_RXTX_H */
--
2.33.0

View File

@ -0,0 +1,100 @@
From 29169ffded36ddc6a0f6d127a70e256a7bd5479f Mon Sep 17 00:00:00 2001
From: Jie Hai <haijie1@huawei.com>
Date: Mon, 19 Feb 2024 16:32:52 +0800
Subject: [PATCH 422/431] ring: add telemetry command to list rings
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
[ upstream commit 36e5c1b91607cc41e73e1108bdc5843c68e3ebc6 ]
Add a telemetry command to list the rings used in the system.
An example using this command is shown below:
--> /ring/list
{
"/ring/list": [
"HT_0000:7d:00.2",
"MP_mb_pool_0"
]
}
Signed-off-by: Jie Hai <haijie1@huawei.com>
Acked-by: Konstantin Ananyev <konstantin.v.ananyev@yandex.ru>
Reviewed-by: Honnappa Nagarahalli <honnappa.nagarahalli@arm.com>
Acked-by: Huisong Li <lihuisong@huawei.com>
Acked-by: Chengwen Feng <fengchengwen@huawei.com>
Acked-by: Morten Brørup <mb@smartsharesystems.com>
Signed-off-by: chenyi <chenyi211@huawei.com>
---
lib/ring/meson.build | 1 +
lib/ring/rte_ring.c | 40 ++++++++++++++++++++++++++++++++++++++++
2 files changed, 41 insertions(+)
diff --git a/lib/ring/meson.build b/lib/ring/meson.build
index c20685c689..7fca958ed7 100644
--- a/lib/ring/meson.build
+++ b/lib/ring/meson.build
@@ -18,3 +18,4 @@ indirect_headers += files (
'rte_ring_rts.h',
'rte_ring_rts_elem_pvt.h',
)
+deps += ['telemetry']
diff --git a/lib/ring/rte_ring.c b/lib/ring/rte_ring.c
index f17bd966be..c6e5a738c3 100644
--- a/lib/ring/rte_ring.c
+++ b/lib/ring/rte_ring.c
@@ -31,6 +31,7 @@
#include <rte_string_fns.h>
#include <rte_spinlock.h>
#include <rte_tailq.h>
+#include <rte_telemetry.h>
#include "rte_ring.h"
#include "rte_ring_elem.h"
@@ -428,3 +429,42 @@ rte_ring_lookup(const char *name)
return r;
}
+
+static void
+ring_walk(void (*func)(struct rte_ring *, void *), void *arg)
+{
+ struct rte_ring_list *ring_list;
+ struct rte_tailq_entry *tailq_entry;
+
+ ring_list = RTE_TAILQ_CAST(rte_ring_tailq.head, rte_ring_list);
+ rte_mcfg_tailq_read_lock();
+
+ TAILQ_FOREACH(tailq_entry, ring_list, next) {
+ (*func)((struct rte_ring *) tailq_entry->data, arg);
+ }
+
+ rte_mcfg_tailq_read_unlock();
+}
+
+static void
+ring_list_cb(struct rte_ring *r, void *arg)
+{
+ struct rte_tel_data *d = (struct rte_tel_data *)arg;
+
+ rte_tel_data_add_array_string(d, r->name);
+}
+
+static int
+ring_handle_list(const char *cmd __rte_unused,
+ const char *params __rte_unused, struct rte_tel_data *d)
+{
+ rte_tel_data_start_array(d, RTE_TEL_STRING_VAL);
+ ring_walk(ring_list_cb, d);
+ return 0;
+}
+
+RTE_INIT(ring_init_telemetry)
+{
+ rte_telemetry_register_cmd("/ring/list", ring_handle_list,
+ "Returns list of available rings. Takes no parameters");
+}
--
2.33.0

View File

@ -0,0 +1,155 @@
From 5ebb87f1d880410aec6131e7b21ed0c1d9eae225 Mon Sep 17 00:00:00 2001
From: Jie Hai <haijie1@huawei.com>
Date: Mon, 19 Feb 2024 16:32:53 +0800
Subject: [PATCH 1/9] ring: add telemetry command for ring info
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
[ upstream commit 2e99bd65ca788f7f540b2c155208dae2b0128b36 ]
This patch supports dump of ring information by its name.
An example using this command is shown below:
--> /ring/info,MP_mb_pool_0
{
"/ring/info": {
"name": "MP_mb_pool_0",
"socket": 0,
"flags": 0,
"producer_type": "MP",
"consumer_type": "MC",
"size": 262144,
"mask": "0x3ffff",
"capacity": 262143,
"used_count": 153197,
"mz_name": "RG_MP_mb_pool_0",
"mz_len": 2097536,
"mz_hugepage_sz": 1073741824,
"mz_socket_id": 0,
"mz_flags": "0x0"
}
}
Signed-off-by: Jie Hai <haijie1@huawei.com>
Reviewed-by: Honnappa Nagarahalli <honnappa.nagarahalli@arm.com>
Acked-by: Konstantin Ananyev <konstantin.v.ananyev@yandex.ru>
Acked-by: Huisong Li <lihuisong@huawei.com>
Acked-by: Chengwen Feng <fengchengwen@huawei.com>
Acked-by: Morten Brørup <mb@smartsharesystems.com>
Signed-off-by: chenyi <chenyi211@huawei.com>
---
lib/ring/rte_ring.c | 95 +++++++++++++++++++++++++++++++++++++++++++++
1 file changed, 95 insertions(+)
diff --git a/lib/ring/rte_ring.c b/lib/ring/rte_ring.c
index c6e5a738c3..72ef981c22 100644
--- a/lib/ring/rte_ring.c
+++ b/lib/ring/rte_ring.c
@@ -463,8 +463,103 @@ ring_handle_list(const char *cmd __rte_unused,
return 0;
}
+static const char *
+ring_prod_sync_type_to_name(struct rte_ring *r)
+{
+ switch (r->prod.sync_type) {
+ case RTE_RING_SYNC_MT:
+ return "MP";
+ case RTE_RING_SYNC_ST:
+ return "SP";
+ case RTE_RING_SYNC_MT_RTS:
+ return "MP_RTS";
+ case RTE_RING_SYNC_MT_HTS:
+ return "MP_HTS";
+ default:
+ return "Unknown";
+ }
+}
+
+static const char *
+ring_cons_sync_type_to_name(struct rte_ring *r)
+{
+ switch (r->cons.sync_type) {
+ case RTE_RING_SYNC_MT:
+ return "MC";
+ case RTE_RING_SYNC_ST:
+ return "SC";
+ case RTE_RING_SYNC_MT_RTS:
+ return "MC_RTS";
+ case RTE_RING_SYNC_MT_HTS:
+ return "MC_HTS";
+ default:
+ return "Unknown";
+ }
+}
+
+struct ring_info_cb_arg {
+ char *ring_name;
+ struct rte_tel_data *d;
+};
+
+static void
+ring_info_cb(struct rte_ring *r, void *arg)
+{
+ struct ring_info_cb_arg *ring_arg = (struct ring_info_cb_arg *)arg;
+ struct rte_tel_data *d = ring_arg->d;
+ const struct rte_memzone *mz;
+
+ if (strncmp(r->name, ring_arg->ring_name, RTE_RING_NAMESIZE))
+ return;
+
+ rte_tel_data_add_dict_string(d, "name", r->name);
+ rte_tel_data_add_dict_int(d, "socket", r->memzone->socket_id);
+ rte_tel_data_add_dict_int(d, "flags", r->flags);
+ rte_tel_data_add_dict_string(d, "producer_type",
+ ring_prod_sync_type_to_name(r));
+ rte_tel_data_add_dict_string(d, "consumer_type",
+ ring_cons_sync_type_to_name(r));
+ rte_tel_data_add_dict_int(d, "size", r->size);
+ rte_tel_data_add_dict_uint_hex(d, "mask", r->mask, 0);
+ rte_tel_data_add_dict_int(d, "capacity", r->capacity);
+ rte_tel_data_add_dict_int(d, "used_count", rte_ring_count(r));
+
+ mz = r->memzone;
+ if (mz == NULL)
+ return;
+ rte_tel_data_add_dict_string(d, "mz_name", mz->name);
+ rte_tel_data_add_dict_int(d, "mz_len", mz->len);
+ rte_tel_data_add_dict_int(d, "mz_hugepage_sz", mz->hugepage_sz);
+ rte_tel_data_add_dict_int(d, "mz_socket_id", mz->socket_id);
+ rte_tel_data_add_dict_uint_hex(d, "mz_flags", mz->flags, 0);
+}
+
+static int
+ring_handle_info(const char *cmd __rte_unused, const char *params,
+ struct rte_tel_data *d)
+{
+ char name[RTE_RING_NAMESIZE] = {0};
+ struct ring_info_cb_arg ring_arg;
+
+ if (params == NULL || strlen(params) == 0 ||
+ strlen(params) >= RTE_RING_NAMESIZE)
+ return -EINVAL;
+
+ rte_strlcpy(name, params, RTE_RING_NAMESIZE);
+
+ ring_arg.ring_name = name;
+ ring_arg.d = d;
+
+ rte_tel_data_start_dict(d);
+ ring_walk(ring_info_cb, &ring_arg);
+
+ return 0;
+}
+
RTE_INIT(ring_init_telemetry)
{
rte_telemetry_register_cmd("/ring/list", ring_handle_list,
"Returns list of available rings. Takes no parameters");
+ rte_telemetry_register_cmd("/ring/info", ring_handle_info,
+ "Returns ring info. Parameters: ring_name.");
}
--
2.33.0

View File

@ -0,0 +1,55 @@
From e6ecd7b0cb7c8f7461ebdfcb394d7ae80392a072 Mon Sep 17 00:00:00 2001
From: Jie Hai <haijie1@huawei.com>
Date: Wed, 6 Mar 2024 17:20:47 +0800
Subject: [PATCH 424/431] net/hns3: enable PFC for all user priorities
[ upstream commit aae6989df36c105b917cf69975c075dfde2e6b84 ]
When user set TC number to 4 and enable PFC and ETS by dev_configure,
driver only enable user priority 0-3.
The packet with user priority 4-7 cannot trigger PFC frame.
Fix by enabling PFC for all user priorities.
By the way, the nb_tcs from user can never be 0 because of the ahead
check in driver. So remove this redundant code.
Fixes: 62e3ccc2b94c ("net/hns3: support flow control")
Cc: stable@dpdk.org
Signed-off-by: Jie Hai <haijie1@huawei.com>
Signed-off-by: chenyi <chenyi211@huawei.com>
---
drivers/net/hns3/hns3_dcb.c | 9 ++-------
1 file changed, 2 insertions(+), 7 deletions(-)
diff --git a/drivers/net/hns3/hns3_dcb.c b/drivers/net/hns3/hns3_dcb.c
index 2831d3dc62..915e4eb768 100644
--- a/drivers/net/hns3/hns3_dcb.c
+++ b/drivers/net/hns3/hns3_dcb.c
@@ -1499,7 +1499,6 @@ hns3_dcb_info_update(struct hns3_adapter *hns, uint8_t num_tc)
static int
hns3_dcb_hw_configure(struct hns3_adapter *hns)
{
- struct rte_eth_dcb_rx_conf *dcb_rx_conf;
struct hns3_pf *pf = &hns->pf;
struct hns3_hw *hw = &hns->hw;
enum hns3_fc_status fc_status = hw->current_fc_status;
@@ -1519,12 +1518,8 @@ hns3_dcb_hw_configure(struct hns3_adapter *hns)
}
if (hw->data->dev_conf.dcb_capability_en & RTE_ETH_DCB_PFC_SUPPORT) {
- dcb_rx_conf = &hw->data->dev_conf.rx_adv_conf.dcb_rx_conf;
- if (dcb_rx_conf->nb_tcs == 0)
- hw->dcb_info.pfc_en = 1; /* tc0 only */
- else
- hw->dcb_info.pfc_en =
- RTE_LEN2MASK((uint8_t)dcb_rx_conf->nb_tcs, uint8_t);
+ hw->dcb_info.pfc_en =
+ RTE_LEN2MASK((uint8_t)HNS3_MAX_USER_PRIO, uint8_t);
hw->dcb_info.hw_pfc_map =
hns3_dcb_undrop_tc_map(hw, hw->dcb_info.pfc_en);
--
2.33.0

View File

@ -0,0 +1,36 @@
From 88fe688b023c5f652be22519302b305dc586c5bd Mon Sep 17 00:00:00 2001
From: Dengdui Huang <huangdengdui@huawei.com>
Date: Wed, 3 Apr 2024 18:16:22 +0800
Subject: [PATCH 425/431] net/hns3: fix variable overflow
[ upstream commit 861bfb275cb4aea37253c3171f922a0131afb1a3 ]
The function strtoul() returns an unsigned long, which should
be received using the variable uint64_t.
Fixes: 2fc3e696a7f1 ("net/hns3: add runtime config for mailbox limit time")
Cc: stable@dpdk.org
Signed-off-by: Dengdui Huang <huangdengdui@huawei.com>
Signed-off-by: Jie Hai <haijie1@huawei.com>
Signed-off-by: chenyi <chenyi211@huawei.com>
---
drivers/net/hns3/hns3_common.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/net/hns3/hns3_common.c b/drivers/net/hns3/hns3_common.c
index 717649f259..d880dc9c54 100644
--- a/drivers/net/hns3/hns3_common.c
+++ b/drivers/net/hns3/hns3_common.c
@@ -222,7 +222,7 @@ hns3_parse_dev_caps_mask(const char *key, const char *value, void *extra_args)
static int
hns3_parse_mbx_time_limit(const char *key, const char *value, void *extra_args)
{
- uint32_t val;
+ uint64_t val;
RTE_SET_USED(key);
--
2.33.0

View File

@ -0,0 +1,68 @@
From c73d2a88d8731412cfa5c4e9f10facbeb74e5a04 Mon Sep 17 00:00:00 2001
From: Dengdui Huang <huangdengdui@huawei.com>
Date: Wed, 3 Apr 2024 18:16:21 +0800
Subject: [PATCH 426/431] net/hns3: fix double free for Rx/Tx queue
[ upstream commit 833a5beab5bfc16708ee9b53c83e2f221cd99f90 ]
The Pointers to some resources on the Rx/Tx queue need to be set to NULL
after free inside the hns3_rx/tx_queue_release(), as this function is
called from multiple threads (reset thread, device config thread, etc),
leading to double memory free error.
Fixes: bba636698316 ("net/hns3: support Rx/Tx and related operations")
Cc: stable@dpdk.org
Signed-off-by: Dengdui Huang <huangdengdui@huawei.com>
Signed-off-by: Jie Hai <haijie1@huawei.com>
Signed-off-by: chenyi <chenyi211@huawei.com>
---
drivers/net/hns3/hns3_rxtx.c | 23 ++++++++++++++++++-----
1 file changed, 18 insertions(+), 5 deletions(-)
diff --git a/drivers/net/hns3/hns3_rxtx.c b/drivers/net/hns3/hns3_rxtx.c
index 49f7177578..0b8c59f4f9 100644
--- a/drivers/net/hns3/hns3_rxtx.c
+++ b/drivers/net/hns3/hns3_rxtx.c
@@ -86,9 +86,14 @@ hns3_rx_queue_release(void *queue)
struct hns3_rx_queue *rxq = queue;
if (rxq) {
hns3_rx_queue_release_mbufs(rxq);
- if (rxq->mz)
+ if (rxq->mz) {
rte_memzone_free(rxq->mz);
- rte_free(rxq->sw_ring);
+ rxq->mz = NULL;
+ }
+ if (rxq->sw_ring) {
+ rte_free(rxq->sw_ring);
+ rxq->sw_ring = NULL;
+ }
rte_free(rxq);
}
}
@@ -99,10 +104,18 @@ hns3_tx_queue_release(void *queue)
struct hns3_tx_queue *txq = queue;
if (txq) {
hns3_tx_queue_release_mbufs(txq);
- if (txq->mz)
+ if (txq->mz) {
rte_memzone_free(txq->mz);
- rte_free(txq->sw_ring);
- rte_free(txq->free);
+ txq->mz = NULL;
+ }
+ if (txq->sw_ring) {
+ rte_free(txq->sw_ring);
+ txq->sw_ring = NULL;
+ }
+ if (txq->free) {
+ rte_free(txq->free);
+ txq->free = NULL;
+ }
rte_free(txq);
}
}
--
2.33.0

View File

@ -0,0 +1,37 @@
From da365adce5e00a7dd7791e6ae7ed702de20af30c Mon Sep 17 00:00:00 2001
From: Dengdui Huang <huangdengdui@huawei.com>
Date: Wed, 3 Apr 2024 18:16:20 +0800
Subject: [PATCH 427/431] net/hns3: fix read Rx timestamp handle
[ upstream commit 0a96792880b7eb410f3c4ae4843d82df7005a627 ]
The flag RTE_MBUF_F_RX_IEEE1588_PTP depends on the packet
type and does not need to be set when reading Rx timestamp.
Fixes: 38b539d96eb6 ("net/hns3: support IEEE 1588 PTP")
Cc: stable@dpdk.org
Signed-off-by: Dengdui Huang <huangdengdui@huawei.com>
Signed-off-by: Jie Hai <haijie1@huawei.com>
Signed-off-by: chenyi <chenyi211@huawei.com>
---
drivers/net/hns3/hns3_rxtx.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/drivers/net/hns3/hns3_rxtx.c b/drivers/net/hns3/hns3_rxtx.c
index 0b8c59f4f9..2de31ab9a3 100644
--- a/drivers/net/hns3/hns3_rxtx.c
+++ b/drivers/net/hns3/hns3_rxtx.c
@@ -2401,8 +2401,7 @@ hns3_rx_ptp_timestamp_handle(struct hns3_rx_queue *rxq, struct rte_mbuf *mbuf,
{
struct hns3_pf *pf = HNS3_DEV_PRIVATE_TO_PF(rxq->hns);
- mbuf->ol_flags |= RTE_MBUF_F_RX_IEEE1588_PTP |
- RTE_MBUF_F_RX_IEEE1588_TMST;
+ mbuf->ol_flags |= RTE_MBUF_F_RX_IEEE1588_TMST;
if (hns3_timestamp_rx_dynflag > 0) {
*RTE_MBUF_DYNFIELD(mbuf, hns3_timestamp_dynfield_offset,
rte_mbuf_timestamp_t *) = timestamp;
--
2.33.0

View File

@ -0,0 +1,45 @@
From 3d7475b7bbb96565726a4e0f387fd35974682022 Mon Sep 17 00:00:00 2001
From: Dengdui Huang <huangdengdui@huawei.com>
Date: Wed, 3 Apr 2024 18:16:19 +0800
Subject: [PATCH 428/431] net/hns3: fix offload flag of IEEE 1588
[ upstream commit 5fde4c41f26d2ad607935b76b528e1b64727b5c7 ]
Currently, the RTE_MBUF_F_RX_IEEE1588_TMST offload flag will
not be set when the scatter algorithm is used.
This patch fixes it.
Fixes: 4801f0403b58 ("net/hns3: fix IEEE 1588 PTP for scalar scattered Rx")
Cc: stable@dpdk.org
Signed-off-by: Dengdui Huang <huangdengdui@huawei.com>
Signed-off-by: Jie Hai <haijie1@huawei.com>
Signed-off-by: chenyi <chenyi211@huawei.com>
---
drivers/net/hns3/hns3_rxtx.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/drivers/net/hns3/hns3_rxtx.c b/drivers/net/hns3/hns3_rxtx.c
index 2de31ab9a3..5cf2b3af33 100644
--- a/drivers/net/hns3/hns3_rxtx.c
+++ b/drivers/net/hns3/hns3_rxtx.c
@@ -2680,6 +2680,7 @@ hns3_recv_scattered_pkts(void *rx_queue,
continue;
}
+ first_seg->ol_flags = 0;
if (unlikely(bd_base_info & BIT(HNS3_RXD_TS_VLD_B)))
hns3_rx_ptp_timestamp_handle(rxq, first_seg, timestamp);
@@ -2709,7 +2710,7 @@ hns3_recv_scattered_pkts(void *rx_queue,
first_seg->port = rxq->port_id;
first_seg->hash.rss = rte_le_to_cpu_32(rxd.rx.rss_hash);
- first_seg->ol_flags = RTE_MBUF_F_RX_RSS_HASH;
+ first_seg->ol_flags |= RTE_MBUF_F_RX_RSS_HASH;
if (unlikely(bd_base_info & BIT(HNS3_RXD_LUM_B))) {
first_seg->hash.fdir.hi =
rte_le_to_cpu_16(rxd.rx.fd_id);
--
2.33.0

View File

@ -0,0 +1,85 @@
From 6568baa18852528dafc7559b43fad1dc9f0ff717 Mon Sep 17 00:00:00 2001
From: Dengdui Huang <huangdengdui@huawei.com>
Date: Tue, 30 Jan 2024 09:32:49 +0800
Subject: [PATCH 429/431] app/testpmd: fix crash in multi-process forwarding
[ upstream commit b3a33138f317d1c651cd86f423cc703176eb7b07 ]
On multi-process scenario, each process creates flows based on the
number of queues. When nbcore is greater than 1, multiple cores may
use the same queue to forward packet, like:
dpdk-testpmd -a BDF --proc-type=auto -- -i --rxq=4 --txq=4
--nb-cores=2 --num-procs=2 --proc-id=0
testpmd> start
mac packet forwarding - ports=1 - cores=2 - streams=4 - NUMA support
enabled, MP allocation mode: native
Logical Core 2 (socket 0) forwards packets on 2 streams:
RX P=0/Q=0 (socket 0) -> TX P=0/Q=0 (socket 0) peer=02:00:00:00:00:00
RX P=0/Q=1 (socket 0) -> TX P=0/Q=1 (socket 0) peer=02:00:00:00:00:00
Logical Core 3 (socket 0) forwards packets on 2 streams:
RX P=0/Q=0 (socket 0) -> TX P=0/Q=0 (socket 0) peer=02:00:00:00:00:00
RX P=0/Q=1 (socket 0) -> TX P=0/Q=1 (socket 0) peer=02:00:00:00:00:00
After this commit, the result will be:
dpdk-testpmd -a BDF --proc-type=auto -- -i --rxq=4 --txq=4
--nb-cores=2 --num-procs=2 --proc-id=0
testpmd> start
io packet forwarding - ports=1 - cores=2 - streams=2 - NUMA support
enabled, MP allocation mode: native
Logical Core 2 (socket 0) forwards packets on 1 streams:
RX P=0/Q=0 (socket 2) -> TX P=0/Q=0 (socket 2) peer=02:00:00:00:00:00
Logical Core 3 (socket 0) forwards packets on 1 streams:
RX P=0/Q=1 (socket 2) -> TX P=0/Q=1 (socket 2) peer=02:00:00:00:00:00
Fixes: a550baf24af9 ("app/testpmd: support multi-process")
Cc: stable@dpdk.org
Signed-off-by: Dengdui Huang <huangdengdui@huawei.com>
Acked-by: Chengwen Feng <fengchengwen@huawei.com>
Acked-by: Ferruh Yigit <ferruh.yigit@amd.com>
Signed-off-by: chenyi <chenyi211@huawei.com>
---
app/test-pmd/config.c | 6 +-----
1 file changed, 1 insertion(+), 5 deletions(-)
diff --git a/app/test-pmd/config.c b/app/test-pmd/config.c
index fbb0cabf3d..dac6be0daf 100644
--- a/app/test-pmd/config.c
+++ b/app/test-pmd/config.c
@@ -3385,7 +3385,6 @@ rss_fwd_config_setup(void)
queueid_t nb_q;
streamid_t sm_id;
int start;
- int end;
nb_q = nb_rxq;
if (nb_q > nb_txq)
@@ -3393,7 +3392,7 @@ rss_fwd_config_setup(void)
cur_fwd_config.nb_fwd_lcores = (lcoreid_t) nb_fwd_lcores;
cur_fwd_config.nb_fwd_ports = nb_fwd_ports;
cur_fwd_config.nb_fwd_streams =
- (streamid_t) (nb_q * cur_fwd_config.nb_fwd_ports);
+ (streamid_t) (nb_q / num_procs * cur_fwd_config.nb_fwd_ports);
if (cur_fwd_config.nb_fwd_streams < cur_fwd_config.nb_fwd_lcores)
cur_fwd_config.nb_fwd_lcores =
@@ -3415,7 +3414,6 @@ rss_fwd_config_setup(void)
* the 2~3 queue for secondary process.
*/
start = proc_id * nb_q / num_procs;
- end = start + nb_q / num_procs;
rxp = 0;
rxq = start;
for (sm_id = 0; sm_id < cur_fwd_config.nb_fwd_streams; sm_id++) {
@@ -3434,8 +3432,6 @@ rss_fwd_config_setup(void)
continue;
rxp = 0;
rxq++;
- if (rxq >= end)
- rxq = start;
}
}
--
2.33.0

View File

@ -0,0 +1,182 @@
From 105935aea2804a338160d5828735e1bdb9668d78 Mon Sep 17 00:00:00 2001
From: Chengwen Feng <fengchengwen@huawei.com>
Date: Mon, 29 Apr 2024 15:15:31 +0800
Subject: [PATCH 431/432] dma/hisilicon: remove support for HIP09 platform
The DMA for HIP09 is no longer available, so delete it.
Cc: stable@dpdk.org
Signed-off-by: Chengwen Feng <fengchengwen@huawei.com>
Signed-off-by: chenyi <chenyi211@huawei.com>
---
doc/guides/dmadevs/hisilicon.rst | 1 -
drivers/dma/hisilicon/hisi_dmadev.c | 40 +----------------------------
drivers/dma/hisilicon/hisi_dmadev.h | 35 +------------------------
3 files changed, 2 insertions(+), 74 deletions(-)
diff --git a/doc/guides/dmadevs/hisilicon.rst b/doc/guides/dmadevs/hisilicon.rst
index 8c1f0f8886..974bc49376 100644
--- a/doc/guides/dmadevs/hisilicon.rst
+++ b/doc/guides/dmadevs/hisilicon.rst
@@ -13,7 +13,6 @@ Supported Kunpeng SoCs
----------------------
* Kunpeng 920
-* Kunpeng 930
Device Setup
diff --git a/drivers/dma/hisilicon/hisi_dmadev.c b/drivers/dma/hisilicon/hisi_dmadev.c
index 9494b60779..9ea85c86a7 100644
--- a/drivers/dma/hisilicon/hisi_dmadev.c
+++ b/drivers/dma/hisilicon/hisi_dmadev.c
@@ -39,8 +39,6 @@ hisi_dma_queue_base(struct hisi_dma_dev *hw)
{
if (hw->reg_layout == HISI_DMA_REG_LAYOUT_HIP08)
return HISI_DMA_HIP08_QUEUE_BASE;
- else if (hw->reg_layout == HISI_DMA_REG_LAYOUT_HIP09)
- return HISI_DMA_HIP09_QUEUE_BASE;
else
return 0;
}
@@ -216,25 +214,6 @@ hisi_dma_init_hw(struct hisi_dma_dev *hw)
HISI_DMA_HIP08_QUEUE_INT_MASK_M, true);
hisi_dma_update_queue_mbit(hw, HISI_DMA_QUEUE_INT_MASK_REG,
HISI_DMA_HIP08_QUEUE_INT_MASK_M, true);
- } else if (hw->reg_layout == HISI_DMA_REG_LAYOUT_HIP09) {
- hisi_dma_update_queue_mbit(hw, HISI_DMA_QUEUE_CTRL0_REG,
- HISI_DMA_HIP09_QUEUE_CTRL0_ERR_ABORT_M, false);
- hisi_dma_update_queue_mbit(hw, HISI_DMA_QUEUE_INT_STATUS_REG,
- HISI_DMA_HIP09_QUEUE_INT_MASK_M, true);
- hisi_dma_update_queue_mbit(hw, HISI_DMA_QUEUE_INT_MASK_REG,
- HISI_DMA_HIP09_QUEUE_INT_MASK_M, true);
- hisi_dma_update_queue_mbit(hw,
- HISI_DMA_HIP09_QUEUE_ERR_INT_STATUS_REG,
- HISI_DMA_HIP09_QUEUE_ERR_INT_MASK_M, true);
- hisi_dma_update_queue_mbit(hw,
- HISI_DMA_HIP09_QUEUE_ERR_INT_MASK_REG,
- HISI_DMA_HIP09_QUEUE_ERR_INT_MASK_M, true);
- hisi_dma_update_queue_bit(hw, HISI_DMA_QUEUE_CTRL1_REG,
- HISI_DMA_HIP09_QUEUE_CTRL1_VA_ENABLE_B, true);
- hisi_dma_update_bit(hw,
- HISI_DMA_HIP09_QUEUE_CFG_REG(hw->queue_id),
- HISI_DMA_HIP09_QUEUE_CFG_LINK_DOWN_MASK_B,
- true);
}
}
@@ -256,8 +235,6 @@ hisi_dma_reg_layout(uint8_t revision)
{
if (revision == HISI_DMA_REVISION_HIP08B)
return HISI_DMA_REG_LAYOUT_HIP08;
- else if (revision >= HISI_DMA_REVISION_HIP09A)
- return HISI_DMA_REG_LAYOUT_HIP09;
else
return HISI_DMA_REG_LAYOUT_INVALID;
}
@@ -328,14 +305,11 @@ hisi_dma_info_get(const struct rte_dma_dev *dev,
struct rte_dma_info *dev_info,
uint32_t info_sz)
{
- struct hisi_dma_dev *hw = dev->data->dev_private;
+ RTE_SET_USED(dev);
RTE_SET_USED(info_sz);
dev_info->dev_capa = RTE_DMA_CAPA_MEM_TO_MEM |
RTE_DMA_CAPA_OPS_COPY;
- if (hw->reg_layout == HISI_DMA_REG_LAYOUT_HIP09)
- dev_info->dev_capa |= RTE_DMA_CAPA_HANDLES_ERRORS;
-
dev_info->max_vchans = 1;
dev_info->max_desc = HISI_DMA_MAX_DESC_NUM;
dev_info->min_desc = HISI_DMA_MIN_DESC_NUM;
@@ -514,18 +488,6 @@ hisi_dma_dump_common(struct hisi_dma_dev *hw, FILE *f)
{ HISI_DMA_REG_LAYOUT_HIP08,
HISI_DMA_HIP08_DUMP_START_REG,
HISI_DMA_HIP08_DUMP_END_REG },
- { HISI_DMA_REG_LAYOUT_HIP09,
- HISI_DMA_HIP09_DUMP_REGION_A_START_REG,
- HISI_DMA_HIP09_DUMP_REGION_A_END_REG },
- { HISI_DMA_REG_LAYOUT_HIP09,
- HISI_DMA_HIP09_DUMP_REGION_B_START_REG,
- HISI_DMA_HIP09_DUMP_REGION_B_END_REG },
- { HISI_DMA_REG_LAYOUT_HIP09,
- HISI_DMA_HIP09_DUMP_REGION_C_START_REG,
- HISI_DMA_HIP09_DUMP_REGION_C_END_REG },
- { HISI_DMA_REG_LAYOUT_HIP09,
- HISI_DMA_HIP09_DUMP_REGION_D_START_REG,
- HISI_DMA_HIP09_DUMP_REGION_D_END_REG },
};
uint32_t i;
diff --git a/drivers/dma/hisilicon/hisi_dmadev.h b/drivers/dma/hisilicon/hisi_dmadev.h
index deb1357eea..9638823b7b 100644
--- a/drivers/dma/hisilicon/hisi_dmadev.h
+++ b/drivers/dma/hisilicon/hisi_dmadev.h
@@ -23,22 +23,14 @@
#define HISI_DMA_DEVICE_ID 0xA122
#define HISI_DMA_PCI_REVISION_ID_REG 0x08
#define HISI_DMA_REVISION_HIP08B 0x21
-#define HISI_DMA_REVISION_HIP09A 0x30
#define HISI_DMA_MAX_HW_QUEUES 4
#define HISI_DMA_MAX_DESC_NUM 8192
#define HISI_DMA_MIN_DESC_NUM 32
-/**
- * The HIP08B(HiSilicon IP08) and HIP09B(HiSilicon IP09) are DMA iEPs, they
- * have the same pci device id but different pci revision.
- * Unfortunately, they have different register layouts, so two layout
- * enumerations are defined.
- */
enum {
HISI_DMA_REG_LAYOUT_INVALID = 0,
- HISI_DMA_REG_LAYOUT_HIP08,
- HISI_DMA_REG_LAYOUT_HIP09
+ HISI_DMA_REG_LAYOUT_HIP08
};
/**
@@ -67,9 +59,6 @@ enum {
* length of queue-region. The global offset for a single queue register is
* calculated by:
* offset = queue-base + (queue-id * queue-region) + reg-offset-in-region.
- *
- * The first part of queue region is basically the same for HIP08 and HIP09
- * register layouts, therefore, HISI_QUEUE_* registers are defined for it.
*/
#define HISI_DMA_QUEUE_SQ_BASE_L_REG 0x0
#define HISI_DMA_QUEUE_SQ_BASE_H_REG 0x4
@@ -108,28 +97,6 @@ enum {
#define HISI_DMA_HIP08_DUMP_START_REG 0x2000
#define HISI_DMA_HIP08_DUMP_END_REG 0x2280
-/**
- * HiSilicon IP09 DMA register and field define:
- */
-#define HISI_DMA_HIP09_QUEUE_BASE 0x2000
-#define HISI_DMA_HIP09_QUEUE_CTRL0_ERR_ABORT_M GENMASK(31, 28)
-#define HISI_DMA_HIP09_QUEUE_CTRL1_VA_ENABLE_B 2
-#define HISI_DMA_HIP09_QUEUE_INT_MASK_M 0x1
-#define HISI_DMA_HIP09_QUEUE_ERR_INT_STATUS_REG 0x48
-#define HISI_DMA_HIP09_QUEUE_ERR_INT_MASK_REG 0x4C
-#define HISI_DMA_HIP09_QUEUE_ERR_INT_MASK_M GENMASK(18, 1)
-#define HISI_DMA_HIP09_QUEUE_CFG_REG(queue_id) (0x800 + \
- (queue_id) * 0x20)
-#define HISI_DMA_HIP09_QUEUE_CFG_LINK_DOWN_MASK_B 16
-#define HISI_DMA_HIP09_DUMP_REGION_A_START_REG 0x0
-#define HISI_DMA_HIP09_DUMP_REGION_A_END_REG 0x368
-#define HISI_DMA_HIP09_DUMP_REGION_B_START_REG 0x800
-#define HISI_DMA_HIP09_DUMP_REGION_B_END_REG 0xA08
-#define HISI_DMA_HIP09_DUMP_REGION_C_START_REG 0x1800
-#define HISI_DMA_HIP09_DUMP_REGION_C_END_REG 0x1A4C
-#define HISI_DMA_HIP09_DUMP_REGION_D_START_REG 0x1C00
-#define HISI_DMA_HIP09_DUMP_REGION_D_END_REG 0x1CC4
-
/**
* In fact, there are multiple states, but it need to pay attention to
* the following three states for the driver:
--
2.33.0

View File

@ -0,0 +1,80 @@
From 14314efc4ecdaff54334303e21b73ef434726a1d Mon Sep 17 00:00:00 2001
From: Jie Hai <haijie1@huawei.com>
Date: Fri, 15 Mar 2024 10:54:48 +0800
Subject: [PATCH 432/432] 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.
Cc: stable@dpdk.org
Signed-off-by: Jie Hai <haijie1@huawei.com>
Signed-off-by: chenyi <chenyi211@huawei.com>
---
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 5ac64495a6..ebe3f7f7dd 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 2c1664485b..001ff49b36 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 0e1ca1b314..325e745797 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 12d8299def..e70c5fff2a 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

View File

@ -1,6 +1,6 @@
Name: dpdk
Version: 21.11
Release: 62
Release: 67
Packager: packaging@6wind.com
URL: http://dpdk.org
%global source_version 21.11
@ -448,12 +448,30 @@ Patch6414: 0414-net-hns3-refactor-handle-mailbox-function.patch
Patch6415: 0415-net-hns3-fix-VF-multiple-count-on-one-reset.patch
Patch6416: 0416-net-hns3-fix-disable-command-with-firmware.patch
Patch6417: 0417-net-hns3-fix-reset-level-comparison.patch
Patch6418: 0418-net-hns3-don-t-support-QinQ-insert-for-VF.patch
Patch9024: 0419-add-rte_eth_bond_link_monitoring_get-in-map.patch
Patch6419: 0420-app-testpmd-fix-RSS-algorithm-choice.patch
Patch6420: 0421-net-hns3-disable-SCTP-verification-tag-for-RSS-hash-.patch
Patch6421: 0422-net-hns3-support-power-monitor.patch
Patch6422: 0423-ring-add-telemetry-command-to-list-rings.patch
Patch6423: 0424-ring-add-telemetry-command-for-ring-info.patch
Patch6424: 0425-net-hns3-enable-PFC-for-all-user-priorities.patch
Patch6425: 0426-net-hns3-fix-variable-overflow.patch
Patch6426: 0427-net-hns3-fix-double-free-for-Rx-Tx-queue.patch
Patch6427: 0428-net-hns3-fix-read-Rx-timestamp-handle.patch
Patch6428: 0429-net-hns3-fix-offload-flag-of-IEEE-1588.patch
Patch6429: 0430-app-testpmd-fix-crash-in-multi-process-forwarding.patch
Patch6430: 0431-dma-hisilicon-remove-support-for-HIP09-platform.patch
Patch6431: 0432-net-hns3-support-new-device.patch
Summary: Data Plane Development Kit core
Group: System Environment/Libraries
License: BSD and LGPLv2 and GPLv2
ExclusiveArch: i686 x86_64 aarch64 loongarch64 sw_64
ExclusiveArch: i686 x86_64 aarch64 loongarch64 sw_64 ppc64le
BuildRequires: meson ninja-build gcc diffutils python3-pyelftools
BuildRequires: kernel-devel numactl-devel
@ -462,6 +480,7 @@ BuildRequires: rdma-core-devel
BuildRequires: uname-build-checks
BuildRequires: chrpath
BuildRequires: groff-base
BuildRequires: libibverbs
%define kern_devel_ver %(uname -r)
%define arch_type %(uname -m)
@ -603,6 +622,36 @@ strip -g $RPM_BUILD_ROOT/lib/modules/%{kern_devel_ver}/extra/dpdk/igb_uio.ko
/usr/sbin/depmod
%changelog
* Mon Jun 3 2024 chenyi <chenyi211@huawei.com> - 21.11-67
Sync some patches from upstream about bugfix, modifies
are as follow:
- net/hns3: support new device
- dma/hisilicon: remove support for HIP09 platform
* Tue May 28 2024 chenyi <chenyi211@huawei.com> - 21.11-66
Sync some patches from upstream about bugfix, modifies
are as follow:
- app/testpmd: fix crash in multi-process forwarding
- net/hns3: fix offload flag of IEEE 1588
- net/hns3: fix read Rx timestamp handle
- net/hns3: fix double free for Rx/Tx queue
- net/hns3: fix variable overflow
- net/hns3: enable PFC for all user priorities
- ring: add telemetry command for ring info
- ring: add telemetry command to list rings
- net/hns3: support power monitor
- net/hns3: disable SCTP verification tag for RSS hash input
- app/testpmd: fix RSS algorithm choice
* Mon Apr 8 2024 zhangmengxuan <zhangmengxuan@kylino.cn> - 21.11-65
Add add-rte_eth_bond_link_monitoring_get API in map
* Fri Feb 2 2024 peng.zou <peng.zou@shingroup.cn> - 21.11-64
Add support for ppc64le
* Fri Dec 29 2023 huangdengdui <huangdengui@huawei.com> - 21.11-63
The hns3 driver don't support QinQ insert for VF
* Fri Dec 15 2023 huangdengdui <huangdengui@huawei.com> - 21.11-62
Sync some patches for hns3 about refactor mailbox and bugfix, modifies
are as follow: