Sync some patches for hns3 PMD, telemetry and testpmd. And main modifications are as follows: - backport some bugfixes for hns3 - revert Tx performance optimization for hns3 - add Rx/Tx descriptor dump feature for hns3 - refactor some RSS commands for testpmd - add ethdev telemetry private dump - add dmadev telemetry - sync telemetry lib Signed-off-by: Huisong Li <lihuisong@huawei.com> (cherry picked from commit 4f06d27eff9aa99c2e2073ac74328893990ed8ed)
51 lines
1.7 KiB
Diff
51 lines
1.7 KiB
Diff
From 3a1871f1dfbba831c9c6a65081d22e6021d78ffe Mon Sep 17 00:00:00 2001
|
|
From: Dongdong Liu <liudongdong3@huawei.com>
|
|
Date: Fri, 21 Oct 2022 15:36:07 +0800
|
|
Subject: [PATCH 131/189] net/hns3: clean some functions
|
|
|
|
Delete unnecessary code and adjust code to make code more clean.
|
|
|
|
Signed-off-by: Dongdong Liu <liudongdong3@huawei.com>
|
|
---
|
|
drivers/net/hns3/hns3_rxtx.c | 10 +++-------
|
|
1 file changed, 3 insertions(+), 7 deletions(-)
|
|
|
|
diff --git a/drivers/net/hns3/hns3_rxtx.c b/drivers/net/hns3/hns3_rxtx.c
|
|
index b7fe2352a1..840ca384ce 100644
|
|
--- a/drivers/net/hns3/hns3_rxtx.c
|
|
+++ b/drivers/net/hns3/hns3_rxtx.c
|
|
@@ -1909,8 +1909,6 @@ hns3_rx_queue_setup(struct rte_eth_dev *dev, uint16_t idx, uint16_t nb_desc,
|
|
rxq->pvid_sw_discard_en = false;
|
|
rxq->ptype_en = hns3_dev_get_support(hw, RXD_ADV_LAYOUT) ? true : false;
|
|
rxq->configured = true;
|
|
- rxq->io_base = (void *)((char *)hw->io_base + HNS3_TQP_REG_OFFSET +
|
|
- idx * HNS3_TQP_REG_SIZE);
|
|
rxq->io_base = (void *)((char *)hw->io_base +
|
|
hns3_get_tqp_reg_offset(idx));
|
|
rxq->io_head_reg = (volatile void *)((char *)rxq->io_base +
|
|
@@ -2442,10 +2440,8 @@ hns3_recv_pkts_simple(void *rx_queue,
|
|
|
|
nmb = hns3_rx_alloc_buffer(rxq);
|
|
if (unlikely(nmb == NULL)) {
|
|
- uint16_t port_id;
|
|
-
|
|
- port_id = rxq->port_id;
|
|
- rte_eth_devices[port_id].data->rx_mbuf_alloc_failed++;
|
|
+ rte_eth_devices[rxq->port_id].data->
|
|
+ rx_mbuf_alloc_failed++;
|
|
break;
|
|
}
|
|
|
|
@@ -3870,7 +3866,7 @@ hns3_prep_pkt_proc(struct hns3_tx_queue *tx_queue, struct rte_mbuf *m)
|
|
#endif
|
|
if (hns3_pkt_is_tso(m)) {
|
|
if (hns3_pkt_need_linearized(m, m->nb_segs,
|
|
- tx_queue->max_non_tso_bd_num) ||
|
|
+ tx_queue->max_non_tso_bd_num) ||
|
|
hns3_check_tso_pkt_valid(m)) {
|
|
rte_errno = EINVAL;
|
|
return -EINVAL;
|
|
--
|
|
2.23.0
|
|
|