Update DPDK version from 19.11 to 20.11 and also support hns3 PMD for Kunpeng 920 and Kunpeng 930. Signed-off-by: speech_white <humin29@huawei.com>
110 lines
3.8 KiB
Diff
110 lines
3.8 KiB
Diff
From 2633d60f38e8ce132379c3af0dda026e1812a7a2 Mon Sep 17 00:00:00 2001
|
|
From: Chengwen Feng <fengchengwen@huawei.com>
|
|
Date: Sat, 10 Apr 2021 09:11:14 +0800
|
|
Subject: [PATCH 090/189] net/hns3: simplify selecting Rx/Tx function
|
|
|
|
Currently, there are four control variables (rx_simple_allowed,
|
|
rx_vec_allowed, tx_simple_allowed and tx_vec_allowed) which are used
|
|
to impact the selection of Rx/Tx burst function.
|
|
|
|
The purpose of the design is to provide a way to control the selection
|
|
of Rx/Tx burst function by modifying it's values, but these variables
|
|
have no entry to modify unless make intrusive modifications.
|
|
|
|
Now we already support runtime config to select Rx/Tx function, these
|
|
variables could be removed.
|
|
|
|
Fixes: a124f9e9591b ("net/hns3: add runtime config to select IO burst function")
|
|
|
|
Signed-off-by: Chengwen Feng <fengchengwen@huawei.com>
|
|
Signed-off-by: Min Hu (Connor) <humin29@huawei.com>
|
|
---
|
|
drivers/net/hns3/hns3_ethdev.c | 5 -----
|
|
drivers/net/hns3/hns3_ethdev.h | 5 -----
|
|
drivers/net/hns3/hns3_ethdev_vf.c | 5 -----
|
|
drivers/net/hns3/hns3_rxtx.c | 11 ++++-------
|
|
4 files changed, 4 insertions(+), 22 deletions(-)
|
|
|
|
diff --git a/drivers/net/hns3/hns3_ethdev.c b/drivers/net/hns3/hns3_ethdev.c
|
|
index 54c72e9..40af6b8 100644
|
|
--- a/drivers/net/hns3/hns3_ethdev.c
|
|
+++ b/drivers/net/hns3/hns3_ethdev.c
|
|
@@ -2513,11 +2513,6 @@ hns3_dev_configure(struct rte_eth_dev *dev)
|
|
if (ret)
|
|
goto cfg_err;
|
|
|
|
- hns->rx_simple_allowed = true;
|
|
- hns->rx_vec_allowed = true;
|
|
- hns->tx_simple_allowed = true;
|
|
- hns->tx_vec_allowed = true;
|
|
-
|
|
hns3_init_rx_ptype_tble(dev);
|
|
hw->adapter_state = HNS3_NIC_CONFIGURED;
|
|
|
|
diff --git a/drivers/net/hns3/hns3_ethdev.h b/drivers/net/hns3/hns3_ethdev.h
|
|
index 585eeaf..cd15bf3 100644
|
|
--- a/drivers/net/hns3/hns3_ethdev.h
|
|
+++ b/drivers/net/hns3/hns3_ethdev.h
|
|
@@ -795,11 +795,6 @@ struct hns3_adapter {
|
|
struct hns3_vf vf;
|
|
};
|
|
|
|
- bool rx_simple_allowed;
|
|
- bool rx_vec_allowed;
|
|
- bool tx_simple_allowed;
|
|
- bool tx_vec_allowed;
|
|
-
|
|
uint32_t rx_func_hint;
|
|
uint32_t tx_func_hint;
|
|
|
|
diff --git a/drivers/net/hns3/hns3_ethdev_vf.c b/drivers/net/hns3/hns3_ethdev_vf.c
|
|
index 13f92da..dd8f248 100644
|
|
--- a/drivers/net/hns3/hns3_ethdev_vf.c
|
|
+++ b/drivers/net/hns3/hns3_ethdev_vf.c
|
|
@@ -857,11 +857,6 @@ hns3vf_dev_configure(struct rte_eth_dev *dev)
|
|
if (ret)
|
|
goto cfg_err;
|
|
|
|
- hns->rx_simple_allowed = true;
|
|
- hns->rx_vec_allowed = true;
|
|
- hns->tx_simple_allowed = true;
|
|
- hns->tx_vec_allowed = true;
|
|
-
|
|
hns3_init_rx_ptype_tble(dev);
|
|
|
|
hw->adapter_state = HNS3_NIC_CONFIGURED;
|
|
diff --git a/drivers/net/hns3/hns3_rxtx.c b/drivers/net/hns3/hns3_rxtx.c
|
|
index e81344c..4ea6b8b 100644
|
|
--- a/drivers/net/hns3/hns3_rxtx.c
|
|
+++ b/drivers/net/hns3/hns3_rxtx.c
|
|
@@ -2805,10 +2805,9 @@ hns3_get_rx_function(struct rte_eth_dev *dev)
|
|
uint64_t offloads = dev->data->dev_conf.rxmode.offloads;
|
|
bool vec_allowed, sve_allowed, simple_allowed;
|
|
|
|
- vec_allowed = hns->rx_vec_allowed &&
|
|
- hns3_rx_check_vec_support(dev) == 0;
|
|
+ vec_allowed = hns3_rx_check_vec_support(dev) == 0;
|
|
sve_allowed = vec_allowed && hns3_check_sve_support();
|
|
- simple_allowed = hns->rx_simple_allowed && !dev->data->scattered_rx &&
|
|
+ simple_allowed = !dev->data->scattered_rx &&
|
|
(offloads & DEV_RX_OFFLOAD_TCP_LRO) == 0;
|
|
|
|
if (hns->rx_func_hint == HNS3_IO_FUNC_HINT_VEC && vec_allowed)
|
|
@@ -4195,11 +4194,9 @@ hns3_get_tx_function(struct rte_eth_dev *dev, eth_tx_prep_t *prep)
|
|
struct hns3_adapter *hns = dev->data->dev_private;
|
|
bool vec_allowed, sve_allowed, simple_allowed;
|
|
|
|
- vec_allowed = hns->tx_vec_allowed &&
|
|
- hns3_tx_check_vec_support(dev) == 0;
|
|
+ vec_allowed = hns3_tx_check_vec_support(dev) == 0;
|
|
sve_allowed = vec_allowed && hns3_check_sve_support();
|
|
- simple_allowed = hns->tx_simple_allowed &&
|
|
- hns3_tx_check_simple_support(dev);
|
|
+ simple_allowed = hns3_tx_check_simple_support(dev);
|
|
|
|
*prep = NULL;
|
|
|
|
--
|
|
2.7.4
|
|
|