From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga09.intel.com (mga09.intel.com [134.134.136.24]) by dpdk.org (Postfix) with ESMTP id CF1877EEF for ; Mon, 24 Aug 2015 12:42:03 +0200 (CEST) Received: from orsmga002.jf.intel.com ([10.7.209.21]) by orsmga102.jf.intel.com with ESMTP; 24 Aug 2015 03:42:03 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.15,736,1432623600"; d="scan'208";a="789786841" Received: from pgsmsx106.gar.corp.intel.com ([10.221.44.98]) by orsmga002.jf.intel.com with ESMTP; 24 Aug 2015 03:42:02 -0700 Received: from shsmsx103.ccr.corp.intel.com (10.239.110.14) by PGSMSX106.gar.corp.intel.com (10.221.44.98) with Microsoft SMTP Server (TLS) id 14.3.224.2; Mon, 24 Aug 2015 18:42:00 +0800 Received: from shsmsx101.ccr.corp.intel.com ([169.254.1.171]) by SHSMSX103.ccr.corp.intel.com ([169.254.4.248]) with mapi id 14.03.0224.002; Mon, 24 Aug 2015 18:41:53 +0800 From: "Qiu, Michael" To: "Ouyang, Changchun" , "dev@dpdk.org" Thread-Topic: [dpdk-dev] [PATCH 1/6] ixgbe: Support VMDq RSS in non-SRIOV environment Thread-Index: AQHQk5rR6LQRdJ+YbU+GgNlWAZfCwQ== Date: Mon, 24 Aug 2015 10:41:53 +0000 Message-ID: <533710CFB86FA344BFBF2D6802E60286047378F7@SHSMSX101.ccr.corp.intel.com> References: <1432194581-15301-1-git-send-email-changchun.ouyang@intel.com> <1432194581-15301-2-git-send-email-changchun.ouyang@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 1/6] ixgbe: Support VMDq RSS in non-SRIOV environment 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, 24 Aug 2015 10:42:04 -0000 On 5/21/2015 3:50 PM, Ouyang Changchun wrote:=0A= > In non-SRIOV environment, VMDq RSS could be enabled by MRQC register.=0A= > In theory, the queue number per pool could be 2 or 4, but only 2 queues a= re=0A= > available due to HW limitation, the same limit also exist in Linux ixgbe = driver.=0A= >=0A= > Signed-off-by: Changchun Ouyang =0A= > ---=0A= > lib/librte_ether/rte_ethdev.c | 40 +++++++++++++++++++=0A= > lib/librte_pmd_ixgbe/ixgbe_rxtx.c | 82 +++++++++++++++++++++++++++++++++= ------=0A= > 2 files changed, 111 insertions(+), 11 deletions(-)=0A= >=0A= > diff --git a/lib/librte_ether/rte_ethdev.c b/lib/librte_ether/rte_ethdev.= c=0A= > index 024fe8b..6535715 100644=0A= > --- a/lib/librte_ether/rte_ethdev.c=0A= > +++ b/lib/librte_ether/rte_ethdev.c=0A= > @@ -933,6 +933,16 @@ rte_eth_dev_check_vf_rss_rxq_num(uint8_t port_id, ui= nt16_t nb_rx_q)=0A= > return 0;=0A= > }=0A= > =0A= > +#define VMDQ_RSS_RX_QUEUE_NUM_MAX 4=0A= > +=0A= > +static int=0A= > +rte_eth_dev_check_vmdq_rss_rxq_num(__rte_unused uint8_t port_id, uint16_= t nb_rx_q)=0A= > +{=0A= > + if (nb_rx_q > VMDQ_RSS_RX_QUEUE_NUM_MAX)=0A= > + return -EINVAL;=0A= > + return 0;=0A= > +}=0A= > +=0A= > static int=0A= > rte_eth_dev_check_mq_mode(uint8_t port_id, uint16_t nb_rx_q, uint16_t nb= _tx_q,=0A= > const struct rte_eth_conf *dev_conf)=0A= > @@ -1093,6 +1103,36 @@ rte_eth_dev_check_mq_mode(uint8_t port_id, uint16_= t nb_rx_q, uint16_t nb_tx_q,=0A= > return -EINVAL;=0A= > }=0A= > }=0A= > +=0A= > + if (dev_conf->rxmode.mq_mode =3D=3D ETH_MQ_RX_VMDQ_RSS) {=0A= > + uint32_t nb_queue_pools =3D=0A= > + dev_conf->rx_adv_conf.vmdq_rx_conf.nb_queue_pools;=0A= > + struct rte_eth_dev_info dev_info;=0A= > +=0A= > + rte_eth_dev_info_get(port_id, &dev_info);=0A= > + dev->data->dev_conf.rxmode.mq_mode =3D ETH_MQ_RX_VMDQ_RSS;=0A= > + if (nb_queue_pools =3D=3D ETH_32_POOLS || nb_queue_pools =3D=3D ETH_6= 4_POOLS)=0A= > + RTE_ETH_DEV_SRIOV(dev).nb_q_per_pool =3D=0A= > + dev_info.max_rx_queues/nb_queue_pools;=0A= > + else {=0A= > + PMD_DEBUG_TRACE("ethdev port_id=3D%d VMDQ "=0A= > + "nb_queue_pools=3D%d invalid "=0A= > + "in VMDQ RSS\n"=0A= =0A= Does here miss "," ?=0A= =0A= Thanks,=0A= Michael=0A= =0A= > + port_id,=0A= > + nb_queue_pools);=0A= > + return -EINVAL;=0A= > + }=0A= > +=0A= > + if (rte_eth_dev_check_vmdq_rss_rxq_num(port_id,=0A= > + RTE_ETH_DEV_SRIOV(dev).nb_q_per_pool) !=3D 0) {=0A= > + PMD_DEBUG_TRACE("ethdev port_id=3D%d"=0A= > + " SRIOV active, invalid queue"=0A= > + " number for VMDQ RSS, allowed"=0A= > + " value are 1, 2 or 4\n",=0A= > + port_id);=0A= > + return -EINVAL;=0A= > + }=0A= > + }=0A= > }=0A= > return 0;=0A= > }=0A= >=0A= =0A=