DPDK patches and discussions
 help / color / mirror / Atom feed
From: "Min Hu (Connor)" <humin29@huawei.com>
To: <dev@dpdk.org>
Cc: <ferruh.yigit@intel.com>
Subject: [dpdk-dev] [PATCH 1/5] net/hns3: support preferred burst size and queues in VF
Date: Wed, 28 Apr 2021 15:20:51 +0800
Message-ID: <1619594455-56787-2-git-send-email-humin29@huawei.com> (raw)
In-Reply-To: <1619594455-56787-1-git-send-email-humin29@huawei.com>

From: Chengwen Feng <fengchengwen@huawei.com>

This patch supports get preferred burst size and queues when call
rte_eth_dev_info_get() API with VF.

Signed-off-by: Chengwen Feng <fengchengwen@huawei.com>
Signed-off-by: Min Hu (Connor) <humin29@huawei.com>
---
 drivers/net/hns3/hns3_ethdev.c    | 3 ---
 drivers/net/hns3/hns3_ethdev.h    | 3 +++
 drivers/net/hns3/hns3_ethdev_vf.c | 5 +++++
 3 files changed, 8 insertions(+), 3 deletions(-)

diff --git a/drivers/net/hns3/hns3_ethdev.c b/drivers/net/hns3/hns3_ethdev.c
index e3f1b7c..95d701c 100644
--- a/drivers/net/hns3/hns3_ethdev.c
+++ b/drivers/net/hns3/hns3_ethdev.c
@@ -16,9 +16,6 @@
 #include "hns3_dcb.h"
 #include "hns3_mp.h"
 
-#define HNS3_DEFAULT_PORT_CONF_BURST_SIZE	32
-#define HNS3_DEFAULT_PORT_CONF_QUEUES_NUM	1
-
 #define HNS3_SERVICE_INTERVAL		1000000 /* us */
 #define HNS3_SERVICE_QUICK_INTERVAL	10
 #define HNS3_INVALID_PVID		0xFFFF
diff --git a/drivers/net/hns3/hns3_ethdev.h b/drivers/net/hns3/hns3_ethdev.h
index d27c725..ba50e70 100644
--- a/drivers/net/hns3/hns3_ethdev.h
+++ b/drivers/net/hns3/hns3_ethdev.h
@@ -42,6 +42,9 @@
 #define HNS3_PF_FUNC_ID			0
 #define HNS3_1ST_VF_FUNC_ID		1
 
+#define HNS3_DEFAULT_PORT_CONF_BURST_SIZE	32
+#define HNS3_DEFAULT_PORT_CONF_QUEUES_NUM	1
+
 #define HNS3_SW_SHIFT_AND_DISCARD_MODE		0
 #define HNS3_HW_SHIFT_AND_DISCARD_MODE		1
 
diff --git a/drivers/net/hns3/hns3_ethdev_vf.c b/drivers/net/hns3/hns3_ethdev_vf.c
index 06a26fb..74b90e2 100644
--- a/drivers/net/hns3/hns3_ethdev_vf.c
+++ b/drivers/net/hns3/hns3_ethdev_vf.c
@@ -1027,6 +1027,11 @@ hns3vf_dev_infos_get(struct rte_eth_dev *eth_dev, struct rte_eth_dev_info *info)
 	info->reta_size = hw->rss_ind_tbl_size;
 	info->hash_key_size = HNS3_RSS_KEY_SIZE;
 	info->flow_type_rss_offloads = HNS3_ETH_RSS_SUPPORT;
+
+	info->default_rxportconf.burst_size = HNS3_DEFAULT_PORT_CONF_BURST_SIZE;
+	info->default_txportconf.burst_size = HNS3_DEFAULT_PORT_CONF_BURST_SIZE;
+	info->default_rxportconf.nb_queues = HNS3_DEFAULT_PORT_CONF_QUEUES_NUM;
+	info->default_txportconf.nb_queues = HNS3_DEFAULT_PORT_CONF_QUEUES_NUM;
 	info->default_rxportconf.ring_size = HNS3_DEFAULT_RING_DESC;
 	info->default_txportconf.ring_size = HNS3_DEFAULT_RING_DESC;
 
-- 
2.7.4


  reply	other threads:[~2021-04-28  7:20 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-04-28  7:20 [dpdk-dev] [PATCH 0/5] Features and bugfix for hns3 PMD Min Hu (Connor)
2021-04-28  7:20 ` Min Hu (Connor) [this message]
2021-04-28  7:20 ` [dpdk-dev] [PATCH 2/5] net/hns3: log time delta in decimal format Min Hu (Connor)
2021-04-28  7:20 ` [dpdk-dev] [PATCH 3/5] net/hns3: fix use wrong time API Min Hu (Connor)
2021-04-28  7:20 ` [dpdk-dev] [PATCH 4/5] net/hns3: delete unused macro of cmd module Min Hu (Connor)
2021-04-28  7:20 ` [dpdk-dev] [PATCH 5/5] net/hns3: select Tx prepare based on Tx offload Min Hu (Connor)
2021-05-07  9:26   ` David Marchand
2021-05-07 10:23     ` Ferruh Yigit
2021-05-07 12:20       ` [dpdk-dev] [PATCH] net/hns3: fix debug build Thomas Monjalon
2021-05-07 12:25         ` David Marchand
2021-05-07 12:49           ` Thomas Monjalon
2021-05-08  0:47           ` Min Hu (Connor)
2021-04-29 16:27 ` [dpdk-dev] [PATCH 0/5] Features and 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=1619594455-56787-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

DPDK patches and discussions

This inbox may be cloned and mirrored by anyone:

	git clone --mirror https://inbox.dpdk.org/dev/0 dev/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 dev dev/ https://inbox.dpdk.org/dev \
		dev@dpdk.org
	public-inbox-index dev

Example config snippet for mirrors.
Newsgroup available over NNTP:
	nntp://inbox.dpdk.org/inbox.dpdk.dev


AGPL code for this site: git clone https://public-inbox.org/public-inbox.git