From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga06.intel.com (mga06.intel.com [134.134.136.31]) by dpdk.org (Postfix) with ESMTP id 779002946 for ; Mon, 17 Oct 2016 08:12:06 +0200 (CEST) Received: from orsmga004.jf.intel.com ([10.7.209.38]) by orsmga104.jf.intel.com with ESMTP; 16 Oct 2016 23:12:05 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.31,356,1473145200"; d="scan'208";a="20700657" Received: from fmsmsx103.amr.corp.intel.com ([10.18.124.201]) by orsmga004.jf.intel.com with ESMTP; 16 Oct 2016 23:12:03 -0700 Received: from shsmsx103.ccr.corp.intel.com (10.239.4.69) by FMSMSX103.amr.corp.intel.com (10.18.124.201) with Microsoft SMTP Server (TLS) id 14.3.248.2; Sun, 16 Oct 2016 23:12:03 -0700 Received: from shsmsx102.ccr.corp.intel.com ([169.254.2.206]) by SHSMSX103.ccr.corp.intel.com ([169.254.4.139]) with mapi id 14.03.0248.002; Mon, 17 Oct 2016 14:12:00 +0800 From: "Lu, Wenzhuo" To: "Iremonger, Bernard" , "dev@dpdk.org" , "Shah, Rahul R" Thread-Topic: [PATCH v2] net/ixgbe: support multiqueue mode VMDq DCB with SRIOV Thread-Index: AQHSJh8BY+XgBspwfEi5wBOpQ26HZ6Cr90bA Date: Mon, 17 Oct 2016 06:12:00 +0000 Message-ID: <6A0DE07E22DDAD4C9103DF62FEBC09093933BE4F@shsmsx102.ccr.corp.intel.com> References: <1472202487-20119-1-git-send-email-bernard.iremonger@intel.com> <1476451768-21278-1-git-send-email-bernard.iremonger@intel.com> In-Reply-To: <1476451768-21278-1-git-send-email-bernard.iremonger@intel.com> Accept-Language: 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 v2] net/ixgbe: support multiqueue mode VMDq DCB with 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: Mon, 17 Oct 2016 06:12:07 -0000 Hi Bernard, Rahul, > -----Original Message----- > From: Iremonger, Bernard > Sent: Friday, October 14, 2016 9:29 PM > To: dev@dpdk.org; Shah, Rahul R; Lu, Wenzhuo > Cc: Iremonger, Bernard > Subject: [PATCH v2] net/ixgbe: support multiqueue mode VMDq DCB with SRIO= V >=20 > modify ixgbe_dcb_tx_hw_config function. > modify ixgbe_dev_mq_rx_configure function. > modify ixgbe_configure_dcb function. Would you like to add more details about why we need to modify these functi= ons and what has been done? Thanks. >=20 > Changes in v2: > Rebased to DPDK v16.11-rc1 >=20 > Signed-off-by: Rahul R Shah > Signed-off-by: Bernard Iremonger > --- > drivers/net/ixgbe/ixgbe_ethdev.c | 9 ++++----- > drivers/net/ixgbe/ixgbe_rxtx.c | 37 +++++++++++++++++++++-------------= --- > 2 files changed, 25 insertions(+), 21 deletions(-) >=20 > diff --git a/drivers/net/ixgbe/ixgbe_ethdev.c b/drivers/net/ixgbe/ixgbe_e= thdev.c > index 4ca5747..114698d 100644 > --- a/drivers/net/ixgbe/ixgbe_ethdev.c > +++ b/drivers/net/ixgbe/ixgbe_ethdev.c > @@ -1977,6 +1977,8 @@ ixgbe_check_mq_mode(struct rte_eth_dev *dev) > /* check multi-queue mode */ > switch (dev_conf->rxmode.mq_mode) { > case ETH_MQ_RX_VMDQ_DCB: Should we store the mq mode here? > + PMD_INIT_LOG(INFO, "ETH_MQ_RX_VMDQ_DCB > mode supported in SRIOV"); > + break; > case ETH_MQ_RX_VMDQ_DCB_RSS: > /* DCB/RSS VMDQ in SRIOV mode, not implement yet > */ > PMD_INIT_LOG(ERR, "SRIOV active," > @@ -2012,11 +2014,8 @@ ixgbe_check_mq_mode(struct rte_eth_dev *dev) >=20 > switch (dev_conf->txmode.mq_mode) { > case ETH_MQ_TX_VMDQ_DCB: > - /* DCB VMDQ in SRIOV mode, not implement yet */ > - PMD_INIT_LOG(ERR, "SRIOV is active," > - " unsupported VMDQ mq_mode > tx %d.", > - dev_conf->txmode.mq_mode); > - return -EINVAL; > + PMD_INIT_LOG(INFO, "ETH_MQ_TX_VMDQ_DCB mode > supported in SRIOV"); > + break; > default: /* ETH_MQ_TX_VMDQ_ONLY or ETH_MQ_TX_NONE > */ > dev->data->dev_conf.txmode.mq_mode =3D > ETH_MQ_TX_VMDQ_ONLY; > break; > diff --git a/drivers/net/ixgbe/ixgbe_rxtx.c b/drivers/net/ixgbe/ixgbe_rxt= x.c index > 2ce8234..bb13889 100644 > --- a/drivers/net/ixgbe/ixgbe_rxtx.c > +++ b/drivers/net/ixgbe/ixgbe_rxtx.c > @@ -1,7 +1,7 @@ > /*- > * BSD LICENSE > * > - * Copyright(c) 2010-2015 Intel Corporation. All rights reserved. > + * Copyright(c) 2010-2016 Intel Corporation. All rights reserved. > * Copyright 2014 6WIND S.A. > * All rights reserved. > * > @@ -3313,15 +3313,16 @@ ixgbe_vmdq_dcb_configure(struct rte_eth_dev > *dev) >=20 > /** > * ixgbe_dcb_config_tx_hw_config - Configure general DCB TX parameters > - * @hw: pointer to hardware structure > + * @dev: pointer to eth_dev structure > * @dcb_config: pointer to ixgbe_dcb_config structure > */ > static void > -ixgbe_dcb_tx_hw_config(struct ixgbe_hw *hw, > +ixgbe_dcb_tx_hw_config(struct rte_eth_dev *dev, > struct ixgbe_dcb_config *dcb_config) { > uint32_t reg; > uint32_t q; > + struct ixgbe_hw *hw =3D IXGBE_DEV_PRIVATE_TO_HW(dev->data- > >dev_private); >=20 > PMD_INIT_FUNC_TRACE(); > if (hw->mac.type !=3D ixgbe_mac_82598EB) { @@ -3339,11 +3340,17 @@ > ixgbe_dcb_tx_hw_config(struct ixgbe_hw *hw, > if (dcb_config->vt_mode) > reg |=3D IXGBE_MTQC_VT_ENA; > IXGBE_WRITE_REG(hw, IXGBE_MTQC, reg); > - > - /* Disable drop for all queues */ > - for (q =3D 0; q < 128; q++) > - IXGBE_WRITE_REG(hw, IXGBE_QDE, > - (IXGBE_QDE_WRITE | (q << > IXGBE_QDE_IDX_SHIFT))); > + if (RTE_ETH_DEV_SRIOV(dev).active =3D=3D 0) { > + /* Disable drop for all queues in VMDQ mode*/ > + for (q =3D 0; q < 128; q++) > + IXGBE_WRITE_REG(hw, IXGBE_QDE, > + (IXGBE_QDE_WRITE | (q << > IXGBE_QDE_IDX_SHIFT) | IXGBE_QDE_ENABLE)); > + } else { > + /* Enable drop for all queues in SRIOV mode */ > + for (q =3D 0; q < 128; q++) > + IXGBE_WRITE_REG(hw, IXGBE_QDE, > + (IXGBE_QDE_WRITE | (q << > IXGBE_QDE_IDX_SHIFT))); > + } I think it has nothing to do with mq mode. Do I miss something? >=20 > /* Enable the Tx desc arbiter */ > reg =3D IXGBE_READ_REG(hw, IXGBE_RTTDCS); @@ -3378,7 > +3385,7 @@ ixgbe_vmdq_dcb_hw_tx_config(struct rte_eth_dev *dev, > vmdq_tx_conf->nb_queue_pools =3D=3D ETH_16_POOLS ? > 0xFFFF : 0xFFFFFFFF); >=20 > /*Configure general DCB TX parameters*/ > - ixgbe_dcb_tx_hw_config(hw, dcb_config); > + ixgbe_dcb_tx_hw_config(dev, dcb_config); > } >=20 > static void > @@ -3661,7 +3668,7 @@ ixgbe_dcb_hw_configure(struct rte_eth_dev *dev, > /*get DCB TX configuration parameters from rte_eth_conf*/ > ixgbe_dcb_tx_config(dev, dcb_config); > /*Configure general DCB TX parameters*/ > - ixgbe_dcb_tx_hw_config(hw, dcb_config); > + ixgbe_dcb_tx_hw_config(dev, dcb_config); > break; > default: > PMD_INIT_LOG(ERR, "Incorrect DCB TX mode configuration"); > @@ -3810,9 +3817,6 @@ void ixgbe_configure_dcb(struct rte_eth_dev *dev) > (dev_conf->rxmode.mq_mode !=3D ETH_MQ_RX_DCB_RSS)) > return; >=20 > - if (dev->data->nb_rx_queues !=3D ETH_DCB_NUM_QUEUES) > - return; I remember it's a limitation of implementation. The reason is the resource = allocation. Why could we remove it now? > - > /** Configure DCB hardware **/ > ixgbe_dcb_hw_configure(dev, dcb_cfg); > } > @@ -4082,12 +4086,13 @@ ixgbe_dev_mq_rx_configure(struct rte_eth_dev > *dev) > case ETH_MQ_RX_VMDQ_RSS: > ixgbe_config_vf_rss(dev); > break; > - > - /* FIXME if support DCB/RSS together with VMDq & SRIOV */ > case ETH_MQ_RX_VMDQ_DCB: > + ixgbe_vmdq_dcb_configure(dev); > + 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"); > + "Could not support DCB/RSS with VMDq & > SRIOV"); > return -1; > default: > ixgbe_config_vf_default(dev); > -- > 2.10.1