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 A581B9ACF for ; Wed, 25 Feb 2015 04:26:33 +0100 (CET) Received: from orsmga003.jf.intel.com ([10.7.209.27]) by orsmga103.jf.intel.com with ESMTP; 24 Feb 2015 19:20:50 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.09,642,1418112000"; d="scan'208";a="532445205" Received: from pgsmsx108.gar.corp.intel.com ([10.221.44.103]) by orsmga003.jf.intel.com with ESMTP; 24 Feb 2015 19:17:23 -0800 Received: from shsmsx152.ccr.corp.intel.com (10.239.6.52) by PGSMSX108.gar.corp.intel.com (10.221.44.103) with Microsoft SMTP Server (TLS) id 14.3.195.1; Wed, 25 Feb 2015 11:24:13 +0800 Received: from shsmsx102.ccr.corp.intel.com ([169.254.2.62]) by SHSMSX152.ccr.corp.intel.com ([169.254.6.46]) with mapi id 14.03.0195.001; Wed, 25 Feb 2015 11:24:11 +0800 From: "Ouyang, Changchun" To: "Wodkowski, PawelX" , "dev@dpdk.org" Thread-Topic: [dpdk-dev] [PATCH v4 3/7] pmd: igb/ixgbe split nb_q_per_pool to rx and tx nb_q_per_pool Thread-Index: AQHQTF5NOs9RLdq11k2k8ro3lyA5TJ0AuoHg Date: Wed, 25 Feb 2015 03:24:11 +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-4-git-send-email-pawelx.wodkowski@intel.com> In-Reply-To: <1424361289-30718-4-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 3/7] pmd: igb/ixgbe split nb_q_per_pool to rx and tx nb_q_per_pool 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:26:34 -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 3/7] pmd: igb/ixgbe split nb_q_per_pool to = rx > and tx nb_q_per_pool >=20 > rx and tx number of queue might be different if RX and TX are configured = in > different mode. This allow to inform VF about proper number of queues. >=20 > Signed-off-by: Pawel Wodkowski > --- > lib/librte_ether/rte_ethdev.c | 12 ++++++------ > lib/librte_ether/rte_ethdev.h | 3 ++- > lib/librte_pmd_e1000/igb_pf.c | 3 ++- > lib/librte_pmd_ixgbe/ixgbe_ethdev.c | 2 +- > lib/librte_pmd_ixgbe/ixgbe_pf.c | 9 +++++---- > 5 files changed, 16 insertions(+), 13 deletions(-) >=20 > diff --git a/lib/librte_ether/rte_ethdev.c b/lib/librte_ether/rte_ethdev.= c > index 2e814db..4007054 100644 > --- a/lib/librte_ether/rte_ethdev.c > +++ b/lib/librte_ether/rte_ethdev.c > @@ -520,7 +520,7 @@ rte_eth_dev_check_vf_rss_rxq_num(uint8_t port_id, > uint16_t nb_rx_q) > return -EINVAL; > } >=20 > - RTE_ETH_DEV_SRIOV(dev).nb_q_per_pool =3D nb_rx_q; > + RTE_ETH_DEV_SRIOV(dev).nb_rx_q_per_pool =3D nb_rx_q; > RTE_ETH_DEV_SRIOV(dev).def_pool_q_idx =3D > dev->pci_dev->max_vfs * nb_rx_q; >=20 > @@ -567,7 +567,7 @@ rte_eth_dev_check_mq_mode(uint8_t port_id, > uint16_t nb_rx_q, uint16_t nb_tx_q, > dev->data- > >dev_conf.rxmode.mq_mode); > case ETH_MQ_RX_VMDQ_RSS: > dev->data->dev_conf.rxmode.mq_mode =3D > ETH_MQ_RX_VMDQ_RSS; > - if (nb_rx_q <=3D > RTE_ETH_DEV_SRIOV(dev).nb_q_per_pool) > + if (nb_rx_q <=3D > RTE_ETH_DEV_SRIOV(dev).nb_rx_q_per_pool) > if > (rte_eth_dev_check_vf_rss_rxq_num(port_id, nb_rx_q) !=3D 0) { > PMD_DEBUG_TRACE("ethdev > port_id=3D%d" > " SRIOV active, invalid queue" > @@ -580,8 +580,8 @@ rte_eth_dev_check_mq_mode(uint8_t port_id, > uint16_t nb_rx_q, uint16_t nb_tx_q, > default: /* ETH_MQ_RX_VMDQ_ONLY or > ETH_MQ_RX_NONE */ > /* if nothing mq mode configure, use default scheme > */ > dev->data->dev_conf.rxmode.mq_mode =3D > ETH_MQ_RX_VMDQ_ONLY; > - if (RTE_ETH_DEV_SRIOV(dev).nb_q_per_pool > 1) > - RTE_ETH_DEV_SRIOV(dev).nb_q_per_pool =3D > 1; > + if (RTE_ETH_DEV_SRIOV(dev).nb_rx_q_per_pool > 1) > + > RTE_ETH_DEV_SRIOV(dev).nb_rx_q_per_pool =3D 1; > break; > } >=20 > @@ -600,8 +600,8 @@ rte_eth_dev_check_mq_mode(uint8_t port_id, > uint16_t nb_rx_q, uint16_t nb_tx_q, > } >=20 > /* check valid queue number */ > - if ((nb_rx_q > RTE_ETH_DEV_SRIOV(dev).nb_q_per_pool) || > - (nb_tx_q > RTE_ETH_DEV_SRIOV(dev).nb_q_per_pool)) { > + if ((nb_rx_q > RTE_ETH_DEV_SRIOV(dev).nb_tx_q_per_pool) Here, how about use nb_rx_q_per_pool to replace nb_tx_q_per_pool ? so it will be more clear to check rx queue number. > || > + (nb_tx_q > RTE_ETH_DEV_SRIOV(dev).nb_tx_q_per_pool)) > { > PMD_DEBUG_TRACE("ethdev port_id=3D%d SRIOV > active, " > "queue number must less equal to %d\n", > port_id, > RTE_ETH_DEV_SRIOV(dev).nb_q_per_pool);