From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga14.intel.com (mga14.intel.com [192.55.52.115]) by dpdk.org (Postfix) with ESMTP id BA923902 for ; Tue, 25 Aug 2015 02:38:14 +0200 (CEST) Received: from fmsmga001.fm.intel.com ([10.253.24.23]) by fmsmga103.fm.intel.com with ESMTP; 24 Aug 2015 17:38:13 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.15,742,1432623600"; d="scan'208";a="774942360" Received: from kmsmsx151.gar.corp.intel.com ([172.21.73.86]) by fmsmga001.fm.intel.com with ESMTP; 24 Aug 2015 17:38:13 -0700 Received: from shsmsx152.ccr.corp.intel.com (10.239.6.52) by KMSMSX151.gar.corp.intel.com (172.21.73.86) with Microsoft SMTP Server (TLS) id 14.3.224.2; Tue, 25 Aug 2015 08:38:11 +0800 Received: from shsmsx102.ccr.corp.intel.com ([169.254.2.206]) by SHSMSX152.ccr.corp.intel.com ([169.254.6.182]) with mapi id 14.03.0224.002; Tue, 25 Aug 2015 08:38:10 +0800 From: "Ouyang, Changchun" To: "Qiu, Michael" , "dev@dpdk.org" Thread-Topic: [dpdk-dev] [PATCH 1/6] ixgbe: Support VMDq RSS in non-SRIOV environment Thread-Index: AQHQk5rR6LQRdJ+YbU+GgNlWAZfCwZ4cdIIQ Date: Tue, 25 Aug 2015 00:38:09 +0000 Message-ID: References: <1432194581-15301-1-git-send-email-changchun.ouyang@intel.com> <1432194581-15301-2-git-send-email-changchun.ouyang@intel.com> <533710CFB86FA344BFBF2D6802E60286047378F7@SHSMSX101.ccr.corp.intel.com> In-Reply-To: <533710CFB86FA344BFBF2D6802E60286047378F7@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/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: Tue, 25 Aug 2015 00:38:15 -0000 Hi Michael, Pls review the latest version (v4). Thanks for your effort Changchun > -----Original Message----- > From: Qiu, Michael > Sent: Monday, August 24, 2015 6:42 PM > To: Ouyang, Changchun; dev@dpdk.org > Subject: Re: [dpdk-dev] [PATCH 1/6] ixgbe: Support VMDq RSS in non-SRIOV > environment >=20 > On 5/21/2015 3:50 PM, Ouyang Changchun wrote: > > In non-SRIOV environment, VMDq RSS could be enabled by MRQC register. > > In theory, the queue number per pool could be 2 or 4, but only 2 > > queues are available due to HW limitation, the same limit also exist in= Linux > ixgbe driver. > > > > Signed-off-by: Changchun Ouyang > > --- > > lib/librte_ether/rte_ethdev.c | 40 +++++++++++++++++++ > > lib/librte_pmd_ixgbe/ixgbe_rxtx.c | 82 > > +++++++++++++++++++++++++++++++++------ > > 2 files changed, 111 insertions(+), 11 deletions(-) > > > > diff --git a/lib/librte_ether/rte_ethdev.c > > b/lib/librte_ether/rte_ethdev.c index 024fe8b..6535715 100644 > > --- a/lib/librte_ether/rte_ethdev.c > > +++ b/lib/librte_ether/rte_ethdev.c > > @@ -933,6 +933,16 @@ rte_eth_dev_check_vf_rss_rxq_num(uint8_t > port_id, uint16_t nb_rx_q) > > return 0; > > } > > > > +#define VMDQ_RSS_RX_QUEUE_NUM_MAX 4 > > + > > +static int > > +rte_eth_dev_check_vmdq_rss_rxq_num(__rte_unused uint8_t port_id, > > +uint16_t nb_rx_q) { > > + if (nb_rx_q > VMDQ_RSS_RX_QUEUE_NUM_MAX) > > + return -EINVAL; > > + return 0; > > +} > > + > > static int > > rte_eth_dev_check_mq_mode(uint8_t port_id, uint16_t nb_rx_q, > uint16_t nb_tx_q, > > const struct rte_eth_conf *dev_conf) @@ -1093,6 > +1103,36 @@ > > rte_eth_dev_check_mq_mode(uint8_t port_id, uint16_t nb_rx_q, > uint16_t nb_tx_q, > > return -EINVAL; > > } > > } > > + > > + if (dev_conf->rxmode.mq_mode =3D=3D > ETH_MQ_RX_VMDQ_RSS) { > > + uint32_t nb_queue_pools =3D > > + dev_conf- > >rx_adv_conf.vmdq_rx_conf.nb_queue_pools; > > + struct rte_eth_dev_info dev_info; > > + > > + rte_eth_dev_info_get(port_id, &dev_info); > > + dev->data->dev_conf.rxmode.mq_mode =3D > ETH_MQ_RX_VMDQ_RSS; > > + if (nb_queue_pools =3D=3D ETH_32_POOLS || > nb_queue_pools =3D=3D ETH_64_POOLS) > > + RTE_ETH_DEV_SRIOV(dev).nb_q_per_pool =3D > > + > dev_info.max_rx_queues/nb_queue_pools; > > + else { > > + PMD_DEBUG_TRACE("ethdev port_id=3D%d > VMDQ " > > + "nb_queue_pools=3D%d invalid > " > > + "in VMDQ RSS\n" >=20 > Does here miss "," ? Yes, it is fixed in later version. >=20 > Thanks, > Michael >=20 > > + port_id, > > + nb_queue_pools); > > + return -EINVAL; > > + } > > + > > + if (rte_eth_dev_check_vmdq_rss_rxq_num(port_id, > > + > RTE_ETH_DEV_SRIOV(dev).nb_q_per_pool) !=3D 0) { > > + PMD_DEBUG_TRACE("ethdev port_id=3D%d" > > + " SRIOV active, invalid queue" > > + " number for VMDQ RSS, allowed" > > + " value are 1, 2 or 4\n", > > + port_id); > > + return -EINVAL; > > + } > > + } > > } > > return 0; > > } > >