From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga02.intel.com (mga02.intel.com [134.134.136.20]) by dpdk.org (Postfix) with ESMTP id 5E3B511F5 for ; Wed, 25 Feb 2015 04:36:52 +0100 (CET) Received: from fmsmga003.fm.intel.com ([10.253.24.29]) by orsmga101.jf.intel.com with ESMTP; 24 Feb 2015 19:36:51 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.09,642,1418112000"; d="scan'208";a="459232432" Received: from pgsmsx106.gar.corp.intel.com ([10.221.44.98]) by FMSMGA003.fm.intel.com with ESMTP; 24 Feb 2015 19:21:20 -0800 Received: from shsmsx104.ccr.corp.intel.com (10.239.110.15) by PGSMSX106.gar.corp.intel.com (10.221.44.98) with Microsoft SMTP Server (TLS) id 14.3.195.1; Wed, 25 Feb 2015 11:36:48 +0800 Received: from shsmsx102.ccr.corp.intel.com ([169.254.2.62]) by SHSMSX104.ccr.corp.intel.com ([169.254.5.161]) with mapi id 14.03.0195.001; Wed, 25 Feb 2015 11:36:47 +0800 From: "Ouyang, Changchun" To: "Wodkowski, PawelX" , "dev@dpdk.org" Thread-Topic: [dpdk-dev] [PATCH v4 5/7] pmd ixgbe: enable DCB in SRIOV Thread-Index: AQHQTF89SQdFNGIS7EGBiZrV5eI4gJ0Avo3A Date: Wed, 25 Feb 2015 03:36:47 +0000 Message-ID: References: <1421672551-11652-1-git-send-email-pawelx.wodkowski@intel.com> <1424361289-30718-1-git-send-email-pawelx.wodkowski@intel.com> <1424361289-30718-6-git-send-email-pawelx.wodkowski@intel.com> In-Reply-To: <1424361289-30718-6-git-send-email-pawelx.wodkowski@intel.com> Accept-Language: zh-CN, en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [10.239.127.40] Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Subject: Re: [dpdk-dev] [PATCH v4 5/7] pmd ixgbe: enable DCB in SRIOV X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: patches and discussions about DPDK List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 25 Feb 2015 03:36:52 -0000 > -----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 >=20 > Enable DCB in SRIOV mode for ixgbe driver. >=20 > 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 tha= t > are common to all ports like number of TC. >=20 > Signed-off-by: Pawel Wodkowski > --- > 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(-) >=20 > 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 !=3D ETH_16_POOLS && > conf->nb_queue_pools !=3D 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 =3D ixgbe_pf_configure_mq_sriov(eth_dev); > if (retval !=3D 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; > } >=20 > @@ -652,7 +655,9 @@ ixgbe_get_vf_queues(struct rte_eth_dev *dev, > uint32_t vf, uint32_t *msgbuf) { > struct ixgbe_vf_info *vfinfo =3D > *IXGBE_DEV_PRIVATE_TO_P_VFDATA(dev->data- > >dev_private); > - uint32_t default_q =3D vf * > RTE_ETH_DEV_SRIOV(dev).nb_tx_q_per_pool; > + struct ixgbe_dcb_config *dcbinfo =3D > + IXGBE_DEV_PRIVATE_TO_DCB_CFG(dev->data- > >dev_private); > + uint32_t default_q =3D RTE_ETH_DEV_SRIOV(dev).def_pool_q_idx; Why need change the default_q here? >=20 > /* 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] =3D default_q; >=20 > - /* > - * 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] =3D dcbinfo- > >num_tcs.pg_tcs; > + else > + msgbuf[IXGBE_VF_TRANS_VLAN] =3D 1; >=20 > 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) >=20 > /* check support mq_mode for DCB */ > if ((dev_conf->rxmode.mq_mode !=3D ETH_MQ_RX_VMDQ_DCB) && > - (dev_conf->rxmode.mq_mode !=3D ETH_MQ_RX_DCB)) > - return; > - > - if (dev->data->nb_rx_queues !=3D ETH_DCB_NUM_QUEUES) > + (dev_conf->rxmode.mq_mode !=3D ETH_MQ_RX_DCB) && > + (dev_conf->txmode.mq_mode !=3D ETH_MQ_TX_VMDQ_DCB) && > + (dev_conf->txmode.mq_mode !=3D ETH_MQ_TX_DCB)) > return; >=20 > /** Configure DCB hardware **/ > @@ -3442,8 +3441,13 @@ ixgbe_dev_mq_rx_configure(struct rte_eth_dev > *dev) > ixgbe_config_vf_rss(dev); > break; >=20 > - /* 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) { >=20 > /* > - * 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 =3D IXGBE_MTQC_VT_ENA | IXGBE_MTQC_64VF; > -- > 1.9.1