From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga11.intel.com (mga11.intel.com [192.55.52.93]) by dpdk.org (Postfix) with ESMTP id 5F78D5A6F for ; Mon, 19 Jan 2015 10:13:59 +0100 (CET) Received: from orsmga003.jf.intel.com ([10.7.209.27]) by fmsmga102.fm.intel.com with ESMTP; 19 Jan 2015 01:13:58 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.09,425,1418112000"; d="scan'208";a="514200831" Received: from irsmsx154.ger.corp.intel.com ([163.33.192.96]) by orsmga003.jf.intel.com with ESMTP; 19 Jan 2015 01:07:12 -0800 Received: from irsmsx102.ger.corp.intel.com ([169.254.2.28]) by IRSMSX154.ger.corp.intel.com ([169.254.12.235]) with mapi id 14.03.0195.001; Mon, 19 Jan 2015 09:13:42 +0000 From: "Wodkowski, PawelX" To: "Ouyang, Changchun" , "dev@dpdk.org" Thread-Topic: [dpdk-dev] [PATCH v6 3/6] ixgbe: Get VF queue number Thread-Index: AQHQLi0Nojmpvua2mkazoIXqxRQwQ5zHMxqw Date: Mon, 19 Jan 2015 09:13:41 +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: <1421042352-22399-4-git-send-email-changchun.ouyang@intel.com> Accept-Language: pl-PL, en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [163.33.239.181] 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: Mon, 19 Jan 2015 09:14:00 -0000 > -----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 >=20 > Get the available Rx and Tx queue number when receiving > IXGBE_VF_GET_QUEUES message from VF. >=20 > Signed-off-by: Changchun Ouyang >=20 > changes in v5 > - Add some 'FIX ME' comments for IXGBE_VF_TRANS_VLAN. >=20 > --- > lib/librte_pmd_ixgbe/ixgbe_pf.c | 40 > +++++++++++++++++++++++++++++++++++++++- > 1 file changed, 39 insertions(+), 1 deletion(-) >=20 > 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" >=20 > #define IXGBE_MAX_VFTA (128) > +#define IXGBE_VF_MSG_SIZE_DEFAULT 1 > +#define IXGBE_VF_GET_QUEUE_MSG_SIZE 5 >=20 > 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) > } >=20 > static int > +ixgbe_get_vf_queues(struct rte_eth_dev *dev, uint32_t vf, uint32_t *msgb= uf) > +{ > + 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; Are you sure this is good approach to pass nb_q_per_pool to VF as the numbe= r of=20 available queues? What if PF does not use RSS nor DCB? Are thos queues alwa= ys=20 available in that case? > + > + /* Notify VF of default queue */ > + msgbuf[IXGBE_VF_DEF_QUEUE] =3D default_q; > + > + /* > + * FIX ME if it needs fill msgbuf[IXGBE_VF_TRANS_VLAN] > + * for VLAN strip or VMDQ_DCB or VMDQ_DCB_RSS > + */ > + > + return 0; > +} > +