From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga03.intel.com (mga03.intel.com [134.134.136.65]) by dpdk.org (Postfix) with ESMTP id D37088E93 for ; Thu, 15 Oct 2015 13:07:43 +0200 (CEST) Received: from orsmga003.jf.intel.com ([10.7.209.27]) by orsmga103.jf.intel.com with ESMTP; 15 Oct 2015 04:07:42 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.17,684,1437462000"; d="scan'208";a="664866929" Received: from fmsmsx106.amr.corp.intel.com ([10.18.124.204]) by orsmga003.jf.intel.com with ESMTP; 15 Oct 2015 04:07:42 -0700 Received: from shsmsx101.ccr.corp.intel.com (10.239.4.153) by FMSMSX106.amr.corp.intel.com (10.18.124.204) with Microsoft SMTP Server (TLS) id 14.3.248.2; Thu, 15 Oct 2015 04:07:42 -0700 Received: from shsmsx102.ccr.corp.intel.com ([169.254.2.253]) by SHSMSX101.ccr.corp.intel.com ([169.254.1.96]) with mapi id 14.03.0248.002; Thu, 15 Oct 2015 19:07:40 +0800 From: "He, Shaopeng" To: "Qiu, Michael" , "dev@dpdk.org" Thread-Topic: [dpdk-dev] [PATCH 1/3] fm10k: add multi-queue checking Thread-Index: AQHQ+1HAXW5aCLIcxUaftujKQ/5Pq55seAJA Date: Thu, 15 Oct 2015 11:07:40 +0000 Message-ID: References: <1443598134-11510-1-git-send-email-shaopeng.he@intel.com> <1443598134-11510-2-git-send-email-shaopeng.he@intel.com> <533710CFB86FA344BFBF2D6802E6028621B49E9A@SHSMSX101.ccr.corp.intel.com> In-Reply-To: <533710CFB86FA344BFBF2D6802E6028621B49E9A@SHSMSX101.ccr.corp.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 1/3] fm10k: add multi-queue checking 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: Thu, 15 Oct 2015 11:07:44 -0000 Hi, Michael > -----Original Message----- > From: Qiu, Michael > Sent: Thursday, October 15, 2015 2:28 PM > To: He, Shaopeng; dev@dpdk.org > Subject: Re: [dpdk-dev] [PATCH 1/3] fm10k: add multi-queue checking >=20 > On 2015/9/30 15:29, Shaopeng He wrote: > > Add multi-queue checking in device configure process. > > Currently, VMDQ and RSS are supported. > > > > Signed-off-by: Shaopeng He > > --- > > 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 a69c990..082937d 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 =3D dev->data- > >dev_conf.rxmode.mq_mode; > > + struct fm10k_hw *hw =3D FM10K_DEV_PRIVATE_TO_HW(dev->data- > >dev_private); > > + struct rte_eth_vmdq_rx_conf *vmdq_conf; > > + uint16_t nb_rx_q =3D dev->data->nb_rx_queues; > > + > > + vmdq_conf =3D &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 =3D=3D fm10k_mac_vf) { > > + PMD_INIT_LOG(ERR, "VMDQ mode is not supported in VF."); > > + return -EINVAL; > > + } >=20 > I think vf check should be the first one, then we do not need check dcb a= nd > VMDq flag. >=20 > Thanks, > Michael Thanks for the comments. There is a case of RSS support on VF, if vf check = be=20 the first one, it will return fail, which is not correct. Thanks, --Shaopeng > > + > > + /* 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 =3D=3D 0) > > PMD_INIT_LOG(WARNING, "fm10k always strip CRC"); > > + /* multipe queue mode checking */ > > + ret =3D fm10k_check_mq_mode(dev); > > + if (ret !=3D 0) { > > + PMD_DRV_LOG(ERR, "fm10k_check_mq_mode fails > with %d.", > > + ret); > > + return ret; > > + } > > > > return 0; > > }