From: Shaopeng He <shaopeng.he@intel.com>
To: dev@dpdk.org
Subject: [dpdk-dev] [PATCH v4 1/4] fm10k: add multi-queue checking
Date: Sat, 31 Oct 2015 10:44:41 +0800 [thread overview]
Message-ID: <1446259484-21070-2-git-send-email-shaopeng.he@intel.com> (raw)
In-Reply-To: <1446259484-21070-1-git-send-email-shaopeng.he@intel.com>
Add multi-queue checking in device configure function.
Currently, VMDQ and RSS are supported.
Signed-off-by: Shaopeng He <shaopeng.he@intel.com>
Acked-by: Jingjing Wu <jingjing.wu@intel.com>
Acked-by: Michael Qiu <michael.qiu@intel.com>
---
drivers/net/fm10k/fm10k_ethdev.c | 44 ++++++++++++++++++++++++++++++++++++++++
1 file changed, 44 insertions(+)
diff --git a/drivers/net/fm10k/fm10k_ethdev.c b/drivers/net/fm10k/fm10k_ethdev.c
index b104fc2..75d1fa3 100644
--- a/drivers/net/fm10k/fm10k_ethdev.c
+++ b/drivers/net/fm10k/fm10k_ethdev.c
@@ -283,12 +283,56 @@ tx_queue_disable(struct fm10k_hw *hw, uint16_t qnum)
}
static int
+fm10k_check_mq_mode(struct rte_eth_dev *dev)
+{
+ enum rte_eth_rx_mq_mode rx_mq_mode = dev->data->dev_conf.rxmode.mq_mode;
+ struct fm10k_hw *hw = FM10K_DEV_PRIVATE_TO_HW(dev->data->dev_private);
+ struct rte_eth_vmdq_rx_conf *vmdq_conf;
+ uint16_t nb_rx_q = dev->data->nb_rx_queues;
+
+ vmdq_conf = &dev->data->dev_conf.rx_adv_conf.vmdq_rx_conf;
+
+ if (rx_mq_mode & ETH_MQ_RX_DCB_FLAG) {
+ PMD_INIT_LOG(ERR, "DCB mode is not supported.");
+ return -EINVAL;
+ }
+
+ if (!(rx_mq_mode & ETH_MQ_RX_VMDQ_FLAG))
+ return 0;
+
+ if (hw->mac.type == fm10k_mac_vf) {
+ PMD_INIT_LOG(ERR, "VMDQ mode is not supported in VF.");
+ return -EINVAL;
+ }
+
+ /* Check VMDQ queue pool number */
+ if (vmdq_conf->nb_queue_pools >
+ sizeof(vmdq_conf->pool_map[0].pools) * CHAR_BIT ||
+ vmdq_conf->nb_queue_pools > nb_rx_q) {
+ PMD_INIT_LOG(ERR, "Too many of queue pools: %d",
+ vmdq_conf->nb_queue_pools);
+ return -EINVAL;
+ }
+
+ return 0;
+}
+
+static int
fm10k_dev_configure(struct rte_eth_dev *dev)
{
+ int ret;
+
PMD_INIT_FUNC_TRACE();
if (dev->data->dev_conf.rxmode.hw_strip_crc == 0)
PMD_INIT_LOG(WARNING, "fm10k always strip CRC");
+ /* multipe queue mode checking */
+ ret = fm10k_check_mq_mode(dev);
+ if (ret != 0) {
+ PMD_DRV_LOG(ERR, "fm10k_check_mq_mode fails with %d.",
+ ret);
+ return ret;
+ }
return 0;
}
--
1.9.3
next prev parent reply other threads:[~2015-10-31 2:45 UTC|newest]
Thread overview: 27+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-09-30 7:28 [dpdk-dev] [PATCH 0/3] fm10k: add VMDQ support Shaopeng He
2015-09-30 7:28 ` [dpdk-dev] [PATCH 1/3] fm10k: add multi-queue checking Shaopeng He
2015-10-15 6:27 ` Qiu, Michael
2015-10-15 11:07 ` He, Shaopeng
2015-10-22 1:23 ` Qiu, Michael
2015-09-30 7:28 ` [dpdk-dev] [PATCH 2/3] fm10k: add VMDQ support in MAC/VLAN filter Shaopeng He
2015-09-30 7:28 ` [dpdk-dev] [PATCH 3/3] fm10k: add VMDQ support in multi-queue configure Shaopeng He
2015-10-10 3:22 ` [dpdk-dev] [PATCH v2 0/4] fm10k: add VMDQ support Shaopeng He
2015-10-10 3:22 ` [dpdk-dev] [PATCH v2 1/4] fm10k: add multi-queue checking Shaopeng He
2015-10-10 3:22 ` [dpdk-dev] [PATCH v2 2/4] fm10k: add VMDQ support in MAC/VLAN filter Shaopeng He
2015-10-10 3:22 ` [dpdk-dev] [PATCH v2 3/4] fm10k: add VMDQ support in multi-queue configure Shaopeng He
2015-10-10 3:22 ` [dpdk-dev] [PATCH v2 4/4] doc: update release note for fm10k VMDQ support Shaopeng He
2015-10-27 9:21 ` [dpdk-dev] [PATCH v3 0/4] fm10k: add " Shaopeng He
2015-10-27 9:21 ` [dpdk-dev] [PATCH v3 1/4] fm10k: add multi-queue checking Shaopeng He
2015-10-27 9:21 ` [dpdk-dev] [PATCH v3 2/4] fm10k: add VMDQ support in MAC/VLAN filter Shaopeng He
2015-10-30 16:17 ` Thomas Monjalon
2015-10-31 2:22 ` He, Shaopeng
2015-10-27 9:21 ` [dpdk-dev] [PATCH v3 3/4] fm10k: add VMDQ support in multi-queue configure Shaopeng He
2015-10-27 9:21 ` [dpdk-dev] [PATCH v3 4/4] doc: update release note for fm10k VMDQ support Shaopeng He
2015-10-30 4:42 ` [dpdk-dev] [PATCH v3 0/4] fm10k: add " Wu, Jingjing
2015-10-30 14:07 ` Qiu, Michael
2015-10-31 2:44 ` [dpdk-dev] [PATCH v4 " Shaopeng He
2015-10-31 2:44 ` Shaopeng He [this message]
2015-10-31 2:44 ` [dpdk-dev] [PATCH v4 2/4] fm10k: add VMDQ support in MAC/VLAN filter Shaopeng He
2015-10-31 2:44 ` [dpdk-dev] [PATCH v4 3/4] fm10k: add VMDQ support in multi-queue configure Shaopeng He
2015-10-31 2:44 ` [dpdk-dev] [PATCH v4 4/4] doc: update release note for fm10k VMDQ support Shaopeng He
2015-11-01 15:15 ` [dpdk-dev] [PATCH v4 0/4] fm10k: add " Thomas Monjalon
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=1446259484-21070-2-git-send-email-shaopeng.he@intel.com \
--to=shaopeng.he@intel.com \
--cc=dev@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).