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 AC1C25A6F for ; Tue, 20 Jan 2015 01:54:10 +0100 (CET) Received: from fmsmga002.fm.intel.com ([10.253.24.26]) by fmsmga103.fm.intel.com with ESMTP; 19 Jan 2015 16:48:33 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.09,430,1418112000"; d="scan'208";a="664347414" Received: from pgsmsx106.gar.corp.intel.com ([10.221.44.98]) by fmsmga002.fm.intel.com with ESMTP; 19 Jan 2015 16:54:07 -0800 Received: from shsmsx152.ccr.corp.intel.com (10.239.6.52) by PGSMSX106.gar.corp.intel.com (10.221.44.98) with Microsoft SMTP Server (TLS) id 14.3.195.1; Tue, 20 Jan 2015 08:54:06 +0800 Received: from shsmsx102.ccr.corp.intel.com ([169.254.2.238]) by SHSMSX152.ccr.corp.intel.com ([169.254.6.173]) with mapi id 14.03.0195.001; Tue, 20 Jan 2015 08:54:05 +0800 From: "Ouyang, Changchun" To: "Wodkowski, PawelX" , "dev@dpdk.org" Thread-Topic: [dpdk-dev] [PATCH v6 3/6] ixgbe: Get VF queue number Thread-Index: AQHQLizwGxiVcIWHqEWBq/Dlco4ZFZzGrfiAgAGMh9A= Date: Tue, 20 Jan 2015 00:54:05 +0000 Message-ID: References: <1420612355-6666-1-git-send-email-changchun.ouyang@intel.com> <1421042352-22399-1-git-send-email-changchun.ouyang@intel.com> <1421042352-22399-4-git-send-email-changchun.ouyang@intel.com> In-Reply-To: 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 v6 3/6] ixgbe: Get VF queue number 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, 20 Jan 2015 00:54:11 -0000 > -----Original Message----- > From: Wodkowski, PawelX > Sent: Monday, January 19, 2015 5:14 PM > To: Ouyang, Changchun; dev@dpdk.org > Cc: Thomas Monjalon; Vlad Zolotarov > Subject: RE: [dpdk-dev] [PATCH v6 3/6] ixgbe: Get VF queue number >=20 >=20 >=20 > > -----Original Message----- > > From: dev [mailto:dev-bounces@dpdk.org] On Behalf Of Ouyang > Changchun > > Sent: Monday, January 12, 2015 6:59 AM > > To: dev@dpdk.org > > Subject: [dpdk-dev] [PATCH v6 3/6] ixgbe: Get VF queue number > > > > Get the available Rx and Tx queue number when receiving > > IXGBE_VF_GET_QUEUES message from VF. > > > > Signed-off-by: Changchun Ouyang > > > > changes in v5 > > - Add some 'FIX ME' comments for IXGBE_VF_TRANS_VLAN. > > > > --- > > lib/librte_pmd_ixgbe/ixgbe_pf.c | 40 > > +++++++++++++++++++++++++++++++++++++++- > > 1 file changed, 39 insertions(+), 1 deletion(-) > > > > diff --git a/lib/librte_pmd_ixgbe/ixgbe_pf.c > > b/lib/librte_pmd_ixgbe/ixgbe_pf.c index 495aff5..dbda9b5 100644 > > --- a/lib/librte_pmd_ixgbe/ixgbe_pf.c > > +++ b/lib/librte_pmd_ixgbe/ixgbe_pf.c > > @@ -53,6 +53,8 @@ > > #include "ixgbe_ethdev.h" > > > > #define IXGBE_MAX_VFTA (128) > > +#define IXGBE_VF_MSG_SIZE_DEFAULT 1 > > +#define IXGBE_VF_GET_QUEUE_MSG_SIZE 5 > > > > static inline uint16_t > > dev_num_vf(struct rte_eth_dev *eth_dev) @@ -491,9 +493,41 @@ > > ixgbe_negotiate_vf_api(struct rte_eth_dev *dev, uint32_t vf, uint32_t > > *msgbuf) } > > > > static int > > +ixgbe_get_vf_queues(struct rte_eth_dev *dev, uint32_t vf, uint32_t > > +*msgbuf) { > > + struct ixgbe_vf_info *vfinfo =3D > > + *IXGBE_DEV_PRIVATE_TO_P_VFDATA(dev->data- > >dev_private); > > + uint32_t default_q =3D vf * RTE_ETH_DEV_SRIOV(dev).nb_q_per_pool; > > + > > + /* Verify if the PF supports the mbox APIs version or not */ > > + switch (vfinfo[vf].api_version) { > > + case ixgbe_mbox_api_20: > > + case ixgbe_mbox_api_11: > > + break; > > + default: > > + return -1; > > + } > > + > > + /* Notify VF of Rx and Tx queue number */ > > + msgbuf[IXGBE_VF_RX_QUEUES] =3D > RTE_ETH_DEV_SRIOV(dev).nb_q_per_pool; > > + msgbuf[IXGBE_VF_TX_QUEUES] =3D > RTE_ETH_DEV_SRIOV(dev).nb_q_per_pool; >=20 > Are you sure this is good approach to pass nb_q_per_pool to VF as the > number of available queues? What if PF does not use RSS nor DCB? Are thos > queues always available in that case? >=20 In that case(neither rss nor dcb), nb_q_per_pool is 1, so it also works, I = have validated it. Thanks Changchun