From: "Ouyang, Changchun" <changchun.ouyang@intel.com>
To: "Wodkowski, PawelX" <pawelx.wodkowski@intel.com>,
"dev@dpdk.org" <dev@dpdk.org>
Subject: Re: [dpdk-dev] [PATCH v4 5/7] pmd ixgbe: enable DCB in SRIOV
Date: Wed, 25 Feb 2015 03:36:47 +0000 [thread overview]
Message-ID: <F52918179C57134FAEC9EA62FA2F9625119F77BC@shsmsx102.ccr.corp.intel.com> (raw)
In-Reply-To: <1424361289-30718-6-git-send-email-pawelx.wodkowski@intel.com>
> -----Original Message-----
> From: dev [mailto:dev-bounces@dpdk.org] On Behalf Of Pawel Wodkowski
> Sent: Thursday, February 19, 2015 11:55 PM
> To: dev@dpdk.org
> Subject: [dpdk-dev] [PATCH v4 5/7] pmd ixgbe: enable DCB in SRIOV
>
> Enable DCB in SRIOV mode for ixgbe driver.
>
> To use DCB in VF PF must configure port as DCB + VMDQ and VF must
> configure port as DCB only. VF are not allowed to change DCB settings that
> are common to all ports like number of TC.
>
> Signed-off-by: Pawel Wodkowski <pawelx.wodkowski@intel.com>
> ---
> lib/librte_pmd_ixgbe/ixgbe_ethdev.c | 2 +-
> lib/librte_pmd_ixgbe/ixgbe_pf.c | 19 ++++++++++++-------
> lib/librte_pmd_ixgbe/ixgbe_rxtx.c | 18 +++++++++++-------
> 3 files changed, 24 insertions(+), 15 deletions(-)
>
> diff --git a/lib/librte_pmd_ixgbe/ixgbe_ethdev.c
> b/lib/librte_pmd_ixgbe/ixgbe_ethdev.c
> index 8e9da3b..7551bcc 100644
> --- a/lib/librte_pmd_ixgbe/ixgbe_ethdev.c
> +++ b/lib/librte_pmd_ixgbe/ixgbe_ethdev.c
> @@ -1514,7 +1514,7 @@ ixgbe_dev_configure(struct rte_eth_dev *dev)
> if (conf->nb_queue_pools != ETH_16_POOLS &&
> conf->nb_queue_pools != ETH_32_POOLS) {
> PMD_INIT_LOG(ERR, " VMDQ+DCB selected, "
> - "number of TX qqueue pools must
> be %d or %d\n",
> + "number of TX queue pools must
> be %d or %d\n",
> ETH_16_POOLS, ETH_32_POOLS);
> return (-EINVAL);
> }
> diff --git a/lib/librte_pmd_ixgbe/ixgbe_pf.c
> b/lib/librte_pmd_ixgbe/ixgbe_pf.c index a7b9333..7c4afba 100644
> --- a/lib/librte_pmd_ixgbe/ixgbe_pf.c
> +++ b/lib/librte_pmd_ixgbe/ixgbe_pf.c
> @@ -109,9 +109,12 @@ int ixgbe_pf_host_init(struct rte_eth_dev *eth_dev)
> /* Fill sriov structure using default configuration. */
> retval = ixgbe_pf_configure_mq_sriov(eth_dev);
> if (retval != 0) {
> - if (retval < 0)
> - PMD_INIT_LOG(ERR, " Setting up SRIOV with default
> device "
> + if (retval < 0) {
> + PMD_INIT_LOG(ERR, "Setting up SRIOV with default
> device "
> "configuration should not fail. This is a
> BUG.");
> + return retval;
> + }
> +
> return 0;
> }
>
> @@ -652,7 +655,9 @@ ixgbe_get_vf_queues(struct rte_eth_dev *dev,
> uint32_t vf, uint32_t *msgbuf) {
> struct ixgbe_vf_info *vfinfo =
> *IXGBE_DEV_PRIVATE_TO_P_VFDATA(dev->data-
> >dev_private);
> - uint32_t default_q = vf *
> RTE_ETH_DEV_SRIOV(dev).nb_tx_q_per_pool;
> + struct ixgbe_dcb_config *dcbinfo =
> + IXGBE_DEV_PRIVATE_TO_DCB_CFG(dev->data-
> >dev_private);
> + uint32_t default_q = RTE_ETH_DEV_SRIOV(dev).def_pool_q_idx;
Why need change the default_q here?
>
> /* Verify if the PF supports the mbox APIs version or not */
> switch (vfinfo[vf].api_version) {
> @@ -670,10 +675,10 @@ ixgbe_get_vf_queues(struct rte_eth_dev *dev,
> uint32_t vf, uint32_t *msgbuf)
> /* Notify VF of default queue */
> msgbuf[IXGBE_VF_DEF_QUEUE] = default_q;
>
> - /*
> - * FIX ME if it needs fill msgbuf[IXGBE_VF_TRANS_VLAN]
> - * for VLAN strip or VMDQ_DCB or VMDQ_DCB_RSS
> - */
> + if (dcbinfo->num_tcs.pg_tcs)
> + msgbuf[IXGBE_VF_TRANS_VLAN] = dcbinfo-
> >num_tcs.pg_tcs;
> + else
> + msgbuf[IXGBE_VF_TRANS_VLAN] = 1;
>
> return 0;
> }
> diff --git a/lib/librte_pmd_ixgbe/ixgbe_rxtx.c
> b/lib/librte_pmd_ixgbe/ixgbe_rxtx.c
> index e6766b3..2e3522c 100644
> --- a/lib/librte_pmd_ixgbe/ixgbe_rxtx.c
> +++ b/lib/librte_pmd_ixgbe/ixgbe_rxtx.c
> @@ -3166,10 +3166,9 @@ void ixgbe_configure_dcb(struct rte_eth_dev
> *dev)
>
> /* check support mq_mode for DCB */
> if ((dev_conf->rxmode.mq_mode != ETH_MQ_RX_VMDQ_DCB) &&
> - (dev_conf->rxmode.mq_mode != ETH_MQ_RX_DCB))
> - return;
> -
> - if (dev->data->nb_rx_queues != ETH_DCB_NUM_QUEUES)
> + (dev_conf->rxmode.mq_mode != ETH_MQ_RX_DCB) &&
> + (dev_conf->txmode.mq_mode != ETH_MQ_TX_VMDQ_DCB) &&
> + (dev_conf->txmode.mq_mode != ETH_MQ_TX_DCB))
> return;
>
> /** Configure DCB hardware **/
> @@ -3442,8 +3441,13 @@ ixgbe_dev_mq_rx_configure(struct rte_eth_dev
> *dev)
> ixgbe_config_vf_rss(dev);
> break;
>
> - /* FIXME if support DCB/RSS together with VMDq & SRIOV */
> + /*
> + * DCB will be configured during port startup.
> + */
> case ETH_MQ_RX_VMDQ_DCB:
> + break;
> +
> + /* FIXME if support DCB+RSS together with VMDq & SRIOV
> */
> case ETH_MQ_RX_VMDQ_DCB_RSS:
> PMD_INIT_LOG(ERR,
> "Could not support DCB with VMDq &
> SRIOV"); @@ -3488,8 +3492,8 @@ ixgbe_dev_mq_tx_configure(struct
> rte_eth_dev *dev)
> switch (RTE_ETH_DEV_SRIOV(dev).active) {
>
> /*
> - * SRIOV active scheme
> - * FIXME if support DCB together with VMDq & SRIOV
> + * SRIOV active scheme.
> + * Note: DCB will be configured during port startup.
> */
> case ETH_64_POOLS:
> mtqc = IXGBE_MTQC_VT_ENA | IXGBE_MTQC_64VF;
> --
> 1.9.1
next prev parent reply other threads:[~2015-02-25 3:36 UTC|newest]
Thread overview: 35+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-01-12 15:50 [dpdk-dev] [PATCH 0/2] Enable DCB in SRIOV mode for ixgbe driver Michal Jastrzebski
2015-01-12 15:50 ` [dpdk-dev] [PATCH 1/2] pmd: add DCB for VF for ixgbe Michal Jastrzebski
2015-01-13 10:14 ` Vlad Zolotarov
2015-01-13 11:00 ` Wodkowski, PawelX
2015-01-14 1:00 ` Ouyang, Changchun
2015-01-12 15:50 ` [dpdk-dev] [PATCH 2/2] testpmd: fix dcb in vt mode Michal Jastrzebski
2015-01-13 10:15 ` Vlad Zolotarov
2015-01-13 11:08 ` Wodkowski, PawelX
2015-01-13 9:50 ` [dpdk-dev] [PATCH 0/2] Enable DCB in SRIOV mode for ixgbe driver Wodkowski, PawelX
2015-01-13 10:11 ` Vlad Zolotarov
2015-01-19 13:02 ` [dpdk-dev] [PATCH v2 0/4] " Pawel Wodkowski
2015-01-19 13:02 ` [dpdk-dev] [PATCH v2 1/4] ethdev: Allow zero rx/tx queues in SRIOV mode Pawel Wodkowski
2015-01-19 13:02 ` [dpdk-dev] [PATCH v2 2/4] ethdev: prevent changing of nb_q_per_pool in rte_eth_dev_check_mq_mode() Pawel Wodkowski
2015-01-20 1:32 ` Ouyang, Changchun
2015-01-20 9:09 ` Wodkowski, PawelX
2015-01-19 13:02 ` [dpdk-dev] [PATCH v2 3/4] pmd: add support for DCB in SRIOV mode for ixgbe driver Pawel Wodkowski
2015-01-20 1:56 ` Ouyang, Changchun
2015-01-20 6:52 ` Thomas Monjalon
2015-01-19 13:02 ` [dpdk-dev] [PATCH v2 4/4] testpmd: fix dcb in vt mode Pawel Wodkowski
2015-02-19 15:54 ` [dpdk-dev] [PATCH v4 0/7] Enable DCB in SRIOV mode for ixgbe driver Pawel Wodkowski
2015-02-19 15:54 ` [dpdk-dev] [PATCH v4 1/7] ethdev: Allow zero rx/tx queues in SRIOV mode Pawel Wodkowski
2015-02-19 15:54 ` [dpdk-dev] [PATCH v4 2/7] pmd igb: fix VMDQ mode checking Pawel Wodkowski
2015-02-19 15:54 ` [dpdk-dev] [PATCH v4 3/7] pmd: igb/ixgbe split nb_q_per_pool to rx and tx nb_q_per_pool Pawel Wodkowski
2015-02-25 3:24 ` Ouyang, Changchun
2015-02-25 7:47 ` Pawel Wodkowski
2015-02-19 15:54 ` [dpdk-dev] [PATCH v4 4/7] move rte_eth_dev_check_mq_mode() logic to driver Pawel Wodkowski
2015-02-25 6:14 ` Ouyang, Changchun
2015-02-25 9:57 ` Pawel Wodkowski
2015-06-09 4:06 ` Wu, Jingjing
2015-02-19 15:54 ` [dpdk-dev] [PATCH v4 5/7] pmd ixgbe: enable DCB in SRIOV Pawel Wodkowski
2015-02-25 3:36 ` Ouyang, Changchun [this message]
2015-02-25 11:29 ` Pawel Wodkowski
2015-02-19 15:54 ` [dpdk-dev] [PATCH v4 6/7] tespmd: fix DCB in SRIOV mode support Pawel Wodkowski
2015-02-19 15:54 ` [dpdk-dev] [PATCH v4 7/7] pmd ixgbe: fix vlan setting in in PF Pawel Wodkowski
2015-06-08 3:00 ` [dpdk-dev] [PATCH v4 0/7] Enable DCB in SRIOV mode for ixgbe driver Zhang, Helin
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=F52918179C57134FAEC9EA62FA2F9625119F77BC@shsmsx102.ccr.corp.intel.com \
--to=changchun.ouyang@intel.com \
--cc=dev@dpdk.org \
--cc=pawelx.wodkowski@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).