From: "Min Hu (Connor)" <humin29@huawei.com>
To: <dev@dpdk.org>
Cc: <ferruh.yigit@intel.com>
Subject: [dpdk-dev] [PATCH 1/7] net/hns3: remove ariables of selecting Rx/Tx function
Date: Fri, 9 Apr 2021 18:15:59 +0800 [thread overview]
Message-ID: <1617963365-41299-2-git-send-email-humin29@huawei.com> (raw)
In-Reply-To: <1617963365-41299-1-git-send-email-humin29@huawei.com>
From: Chengwen Feng <fengchengwen@huawei.com>
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 6192705..19e2eca 100644
--- a/drivers/net/hns3/hns3_ethdev.c
+++ b/drivers/net/hns3/hns3_ethdev.c
@@ -2512,11 +2512,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 4efa403..225a173 100644
--- a/drivers/net/hns3/hns3_ethdev.h
+++ b/drivers/net/hns3/hns3_ethdev.h
@@ -777,11 +777,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 5f8a460..2043b54 100644
--- a/drivers/net/hns3/hns3_ethdev_vf.c
+++ b/drivers/net/hns3/hns3_ethdev_vf.c
@@ -854,11 +854,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 ebf7c82..7300f67 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
next prev parent reply other threads:[~2021-04-09 10:16 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-04-09 10:15 [dpdk-dev] [PATCH 0/7] Bugfix for hns3 PMD Min Hu (Connor)
2021-04-09 10:15 ` Min Hu (Connor) [this message]
2021-04-09 10:16 ` [dpdk-dev] [PATCH 2/7] net/hns3: fix missing rollback in PF init Min Hu (Connor)
2021-04-09 10:16 ` [dpdk-dev] [PATCH 3/7] net/hns3: fix FLR failure when RAS concurrently with FLR Min Hu (Connor)
2021-04-09 10:16 ` [dpdk-dev] [PATCH 4/7] net/hns3: fix some packet type calc error Min Hu (Connor)
2021-04-09 10:16 ` [dpdk-dev] [PATCH 5/7] net/hns3: fix incorrect timing in resetting queues Min Hu (Connor)
2021-04-09 10:16 ` [dpdk-dev] [PATCH 6/7] net/hns3: fix queue state when concurrent with reset Min Hu (Connor)
2021-04-09 10:16 ` [dpdk-dev] [PATCH 7/7] net/hns3: fix configure FEC " Min Hu (Connor)
2021-04-10 1:11 ` [dpdk-dev] [PATCH v2 0/7] Bugfix for hns3 PMD Min Hu (Connor)
2021-04-10 1:11 ` [dpdk-dev] [PATCH v2 1/7] net/hns3: remove variables of selecting Rx/Tx function Min Hu (Connor)
2021-04-10 1:11 ` [dpdk-dev] [PATCH v2 2/7] net/hns3: fix missing rollback in PF init Min Hu (Connor)
2021-04-10 1:11 ` [dpdk-dev] [PATCH v2 3/7] net/hns3: fix FLR failure when RAS concurrent with FLR Min Hu (Connor)
2021-04-10 1:11 ` [dpdk-dev] [PATCH v2 4/7] net/hns3: fix some packet type calc error Min Hu (Connor)
2021-04-10 1:11 ` [dpdk-dev] [PATCH v2 5/7] net/hns3: fix incorrect timing in resetting queues Min Hu (Connor)
2021-04-10 1:11 ` [dpdk-dev] [PATCH v2 6/7] net/hns3: fix queue state when concurrent with reset Min Hu (Connor)
2021-04-10 1:11 ` [dpdk-dev] [PATCH v2 7/7] net/hns3: fix configure FEC " Min Hu (Connor)
2021-04-13 9:28 ` [dpdk-dev] [PATCH v2 0/7] Bugfix for hns3 PMD Ferruh Yigit
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1617963365-41299-2-git-send-email-humin29@huawei.com \
--to=humin29@huawei.com \
--cc=dev@dpdk.org \
--cc=ferruh.yigit@intel.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).