Re: [PATCH v4 2/6] ixgbe: Negotiate VF API version
From: Vlad Zolotarov <hidden>
Date: 2015-01-04 09:37:43
On 01/04/15 10:51, Ouyang, Changchun wrote:
quoted
-----Original Message----- From: Vlad Zolotarov [mailto:vladz-RmZWMc9puTNJc61us3aD9laTQe2KTcn/@public.gmane.org] Sent: Sunday, January 4, 2015 4:40 PM To: Ouyang, Changchun; dev-VfR2kkLFssw@public.gmane.org Subject: Re: [dpdk-dev] [PATCH v4 2/6] ixgbe: Negotiate VF API version On 01/04/15 10:37, Ouyang, Changchun wrote:quoted
Hi Vlad,quoted
-----Original Message----- From: Vlad Zolotarov [mailto:vladz-RmZWMc9puTNJc61us3aD9laTQe2KTcn/@public.gmane.org] Sent: Sunday, January 4, 2015 4:30 PM To: Ouyang, Changchun; dev-VfR2kkLFssw@public.gmane.org Subject: Re: [dpdk-dev] [PATCH v4 2/6] ixgbe: Negotiate VF API version On 01/04/15 10:26, Vlad Zolotarov wrote:quoted
On 01/04/15 09:18, Ouyang Changchun wrote:quoted
Negotiate API version with VF when receiving the IXGBE_VF_API_NEGOTIATE message. Signed-off-by: Changchun Ouyang <redacted>Reviewed-by: Vlad Zolotarov <vladz-RmZWMc9puTNJc61us3aD9laTQe2KTcn/@public.gmane.org>Thanks for your reviewing.quoted
One small remark below.quoted
quoted
--- lib/librte_pmd_ixgbe/ixgbe_ethdev.h | 1 + lib/librte_pmd_ixgbe/ixgbe_pf.c | 25+++++++++++++++++++++++++quoted
quoted
quoted
quoted
2 files changed, 26 insertions(+)diff --git a/lib/librte_pmd_ixgbe/ixgbe_ethdev.hb/lib/librte_pmd_ixgbe/ixgbe_ethdev.h index ca99170..730098d 100644--- a/lib/librte_pmd_ixgbe/ixgbe_ethdev.h +++ b/lib/librte_pmd_ixgbe/ixgbe_ethdev.h@@ -159,6 +159,7 @@ struct ixgbe_vf_info { uint16_t tx_rate[IXGBE_MAX_QUEUE_NUM_PER_VF]; uint16_t vlan_count; uint8_t spoofchk_enabled; + uint8_t api_version; }; /*diff --git a/lib/librte_pmd_ixgbe/ixgbe_pf.cb/lib/librte_pmd_ixgbe/ixgbe_pf.c index 51da1fd..495aff5 100644--- a/lib/librte_pmd_ixgbe/ixgbe_pf.c +++ b/lib/librte_pmd_ixgbe/ixgbe_pf.c@@ -469,6 +469,28 @@ ixgbe_set_vf_lpe(struct rte_eth_dev *dev,__rte_unused uint32_t vf, uint32_t *ms } static int +ixgbe_negotiate_vf_api(struct rte_eth_dev *dev, uint32_t vf, uint32_t *msgbuf) +{ + uint32_t api_version = msgbuf[1]; + struct ixgbe_vf_info *vfinfo = +*IXGBE_DEV_PRIVATE_TO_P_VFDATA(dev->data->dev_private); + + switch (api_version) { + case ixgbe_mbox_api_10: + case ixgbe_mbox_api_11:Why version 2.0 is not negotiated?Because it doesn't fully support 2.0 features yet.Well, it that case u should not support 2.0 in patch 3 as well.My opinion is that In patch 3, ixgbe_get_vf_queues need api_11 or api_20 to support it, That mean the feature require those 2 api version, and it can't work with lower version like api_10. Here the code show the pf has the capability of supporting api_10 and api_11, I think it doesn't contradict.
After a second pass on this code and code in PATCH3 I agree that it's ok.
Thanks Changchun