From: Lijun Ou <oulijun@huawei.com>
To: <luca.boccassi@gmail.com>, <stable@dpdk.org>
Subject: [dpdk-stable] [PATCH v4 19.11.6 3/6] net/hns3: report Rx drop packets enable configuration
Date: Wed, 25 Nov 2020 19:15:20 +0800 [thread overview]
Message-ID: <1606302923-12997-4-git-send-email-oulijun@huawei.com> (raw)
In-Reply-To: <1606302923-12997-1-git-send-email-oulijun@huawei.com>
From: "Wei Hu (Xavier)" <xavier.huwei@huawei.com>
Currently, if there are not available Rx buffer descriptors in receiving
direction based on hns3 network engine, incoming packets will always be
dropped by hardware. This patch reports the '.rx_drop_en' information to
DPDK framework in the '.dev_infos_get', '.rxq_info_get' and
'.rx_queue_setup' ops implementation function.
Signed-off-by: Huisong Li <lihuisong@huawei.com>
Signed-off-by: Wei Hu (Xavier) <xavier.huwei@huawei.com>
---
drivers/net/hns3/hns3_ethdev.c | 9 +++++++++
drivers/net/hns3/hns3_ethdev_vf.c | 9 +++++++++
drivers/net/hns3/hns3_rxtx.c | 6 ++++++
3 files changed, 24 insertions(+)
diff --git a/drivers/net/hns3/hns3_ethdev.c b/drivers/net/hns3/hns3_ethdev.c
index 3a92bd4..d14c96d 100644
--- a/drivers/net/hns3/hns3_ethdev.c
+++ b/drivers/net/hns3/hns3_ethdev.c
@@ -2501,6 +2501,15 @@ hns3_dev_infos_get(struct rte_eth_dev *eth_dev, struct rte_eth_dev_info *info)
.nb_align = HNS3_ALIGN_RING_DESC,
};
+ info->default_rxconf = (struct rte_eth_rxconf) {
+ /*
+ * If there are no available Rx buffer descriptors, incoming
+ * packets are always dropped by hardware based on hns3 network
+ * engine.
+ */
+ .rx_drop_en = 1,
+ };
+
info->vmdq_queue_num = 0;
info->reta_size = HNS3_RSS_IND_TBL_SIZE;
diff --git a/drivers/net/hns3/hns3_ethdev_vf.c b/drivers/net/hns3/hns3_ethdev_vf.c
index 4359b2e..ee272da 100644
--- a/drivers/net/hns3/hns3_ethdev_vf.c
+++ b/drivers/net/hns3/hns3_ethdev_vf.c
@@ -868,6 +868,15 @@ hns3vf_dev_infos_get(struct rte_eth_dev *eth_dev, struct rte_eth_dev_info *info)
.nb_align = HNS3_ALIGN_RING_DESC,
};
+ info->default_rxconf = (struct rte_eth_rxconf) {
+ /*
+ * If there are no available Rx buffer descriptors, incoming
+ * packets are always dropped by hardware based on hns3 network
+ * engine.
+ */
+ .rx_drop_en = 1,
+ };
+
info->vmdq_queue_num = 0;
info->reta_size = HNS3_RSS_IND_TBL_SIZE;
diff --git a/drivers/net/hns3/hns3_rxtx.c b/drivers/net/hns3/hns3_rxtx.c
index 9eccca0..3ec589f 100644
--- a/drivers/net/hns3/hns3_rxtx.c
+++ b/drivers/net/hns3/hns3_rxtx.c
@@ -1251,6 +1251,12 @@ hns3_rx_queue_setup(struct rte_eth_dev *dev, uint16_t idx, uint16_t nb_desc,
return -EINVAL;
}
+ if (conf->rx_drop_en == 0)
+ hns3_warn(hw, "if there are no available Rx descriptors,"
+ "incoming packets are always dropped. input parameter"
+ " conf->rx_drop_en(%u) is uneffective.",
+ conf->rx_drop_en);
+
if (dev->data->rx_queues[idx]) {
hns3_rx_queue_release(dev->data->rx_queues[idx]);
dev->data->rx_queues[idx] = NULL;
--
2.7.4
next prev parent reply other threads:[~2020-11-25 11:15 UTC|newest]
Thread overview: 42+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-11-13 13:36 [dpdk-stable] [PATCH 19.11.6 00/13] backport for 19.11.6 Lijun Ou
2020-11-13 13:36 ` [dpdk-stable] [PATCH 19.11.6 01/13] net/hns3: support TSO Lijun Ou
2020-11-13 13:36 ` [dpdk-stable] [PATCH 19.11.6 02/13] net/hns3: check TSO segment size during Tx Lijun Ou
2020-11-13 13:37 ` [dpdk-stable] [PATCH 19.11.6 03/13] net/hns3: fix reassembling multiple segment packets in Tx Lijun Ou
2020-11-13 13:37 ` [dpdk-stable] [PATCH 19.11.6 04/13] net/hns3: support promiscuous and allmulticast mode for VF Lijun Ou
2020-11-13 13:37 ` [dpdk-stable] [PATCH 19.11.6 05/13] net/hns3: decrease non-nearby memory access in Rx Lijun Ou
2020-11-13 13:37 ` [dpdk-stable] [PATCH 19.11.6 06/13] net/hns3: cleanup duplicated code on processing TSO in Tx Lijun Ou
2020-11-13 13:37 ` [dpdk-stable] [PATCH 19.11.6 07/13] net/hns3: fix inserted VLAN tag position " Lijun Ou
2020-11-13 13:37 ` [dpdk-stable] [PATCH 19.11.6 08/13] net/hns3: report Tx descriptor segment limitations Lijun Ou
2020-11-13 13:37 ` [dpdk-stable] [PATCH 19.11.6 09/13] net/hns3: report Rx drop packets enable configuration Lijun Ou
2020-11-13 13:37 ` [dpdk-stable] [PATCH 19.11.6 10/13] net/hns3: report Rx free threshold Lijun Ou
2020-11-13 13:37 ` [dpdk-stable] [PATCH 19.11.6 11/13] net/hns3: reduce address calculation in Rx Lijun Ou
2020-11-13 13:37 ` [dpdk-stable] [PATCH 19.11.6 12/13] net/hns3: fix Tx checksum outer header prepare Lijun Ou
2020-11-13 13:37 ` [dpdk-stable] [PATCH 19.11.6 13/13] net/hns3: fix Tx checksum with fixed header length Lijun Ou
2020-11-23 15:52 ` [dpdk-stable] [PATCH 19.11.6 00/13] backport for 19.11.6 Luca Boccassi
2020-11-24 14:27 ` oulijun
2020-11-24 15:35 ` Luca Boccassi
2020-11-25 3:24 ` [dpdk-stable] [PATCH v2 19.11.6 0/7] " Lijun Ou
2020-11-25 3:24 ` [dpdk-stable] [PATCH v2 19.11.6 1/7] net/hns3: fix reassembling multiple segment packets in Tx Lijun Ou
2020-11-25 3:24 ` [dpdk-stable] [PATCH v2 19.11.6 2/7] net/hns3: decrease non-nearby memory access in Rx Lijun Ou
2020-11-25 3:24 ` [dpdk-stable] [PATCH v2 19.11.6 3/7] net/hns3: report Tx descriptor segment limitations Lijun Ou
2020-11-25 9:16 ` Luca Boccassi
2020-11-25 10:59 ` oulijun
2020-11-25 3:24 ` [dpdk-stable] [PATCH v2 19.11.6 4/7] net/hns3: report Rx drop packets enable configuration Lijun Ou
2020-11-25 3:24 ` [dpdk-stable] [PATCH v2 19.11.6 5/7] net/hns3: report Rx free threshold Lijun Ou
2020-11-25 3:24 ` [dpdk-stable] [PATCH v2 19.11.6 6/7] net/hns3: reduce address calculation in Rx Lijun Ou
2020-11-25 3:24 ` [dpdk-stable] [PATCH v2 19.11.6 7/7] net/hns3: fix TX checksum with fix header length Lijun Ou
2020-11-25 10:58 ` [dpdk-stable] [PATCH v3 19.11.6 0/6] backport for 19.11.6 Lijun Ou
2020-11-25 10:58 ` [dpdk-stable] [PATCH v3 19.11.6 1/6] net/hns3: fix reassembling multiple segment packets in Tx Lijun Ou
2020-11-25 10:58 ` [dpdk-stable] [PATCH v3 19.11.6 2/6] net/hns3: decrease non-nearby memory access in Rx Lijun Ou
2020-11-25 10:58 ` [dpdk-stable] [PATCH v3 19.11.6 3/6] net/hns3: report Rx drop packets enable configuration Lijun Ou
2020-11-25 10:58 ` [dpdk-stable] [PATCH v3 19.11.6 4/6] net/hns3: report Rx free threshold Lijun Ou
2020-11-25 10:58 ` [dpdk-stable] [PATCH v3 19.11.6 5/6] net/hns3: reduce address calculation in Rx Lijun Ou
2020-11-25 10:58 ` [dpdk-stable] [PATCH v3 19.11.6 6/6] net/hns3: fix TX checksum with fix header length Lijun Ou
2020-11-25 11:15 ` [dpdk-stable] [PATCH v4 19.11.6 0/6] backport for 19.11.6 Lijun Ou
2020-11-25 11:15 ` [dpdk-stable] [PATCH v4 19.11.6 1/6] net/hns3: fix reassembling multiple segment packets in Tx Lijun Ou
2020-11-25 11:15 ` [dpdk-stable] [PATCH v4 19.11.6 2/6] net/hns3: decrease non-nearby memory access in Rx Lijun Ou
2020-11-25 11:15 ` Lijun Ou [this message]
2020-11-25 11:15 ` [dpdk-stable] [PATCH v4 19.11.6 4/6] net/hns3: report Rx free threshold Lijun Ou
2020-11-25 11:15 ` [dpdk-stable] [PATCH v4 19.11.6 5/6] net/hns3: reduce address calculation in Rx Lijun Ou
2020-11-25 11:15 ` [dpdk-stable] [PATCH v4 19.11.6 6/6] net/hns3: fix TX checksum with fix header length Lijun Ou
2020-11-26 9:21 ` [dpdk-stable] [PATCH v4 19.11.6 0/6] backport for 19.11.6 Luca Boccassi
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=1606302923-12997-4-git-send-email-oulijun@huawei.com \
--to=oulijun@huawei.com \
--cc=luca.boccassi@gmail.com \
--cc=stable@dpdk.org \
/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).