[dpdk-dev] [PATCH v6 1/9] net/i40e: add API to convert VF MAC to VF id

Hunt, David david.hunt at intel.com
Thu Oct 5 14:51:15 CEST 2017


Hi Konstantin,


On 5/10/2017 1:45 PM, Ananyev, Konstantin wrote:
> Hi Dave,
>
>> -----Original Message-----
>> From: Hunt, David
>> Sent: Thursday, October 5, 2017 1:26 PM
>> To: dev at dpdk.org
>> Cc: Ananyev, Konstantin <konstantin.ananyev at intel.com>; Wu, Jingjing <jingjing.wu at intel.com>; santosh.shukla at caviumnetworks.com;
>> Sexton, Rory <rory.sexton at intel.com>; Marjanovic, Nemanja <nemanja.marjanovic at intel.com>; Hunt, David <david.hunt at intel.com>
>> Subject: [PATCH v6 1/9] net/i40e: add API to convert VF MAC to VF id
>>
>> From: "Sexton, Rory" <rory.sexton at intel.com>
>>
>> Need a way to convert a vf id to a pf id on the host so as to query the pf
>> for relevant statistics which are used for the frequency changes in the
>> vm_power_manager app. Used when profiles are passed down from the guest
>> to the host, allowing the host to map the vfs to pfs.
>>
>> Signed-off-by: Nemanja Marjanovic <nemanja.marjanovic at intel.com>
>> Signed-off-by: Rory Sexton <rory.sexton at intel.com>
>> Signed-off-by: David Hunt <david.hunt at intel.com>
>> ---
>>   drivers/net/i40e/rte_pmd_i40e.c           | 30 ++++++++++++++++++++++++++++++
>>   drivers/net/i40e/rte_pmd_i40e.h           | 15 +++++++++++++++
>>   drivers/net/i40e/rte_pmd_i40e_version.map |  7 +++++++
>>   3 files changed, 52 insertions(+)
>>
>> diff --git a/drivers/net/i40e/rte_pmd_i40e.c b/drivers/net/i40e/rte_pmd_i40e.c
>> index f12b7f4..541d575 100644
>> --- a/drivers/net/i40e/rte_pmd_i40e.c
>> +++ b/drivers/net/i40e/rte_pmd_i40e.c
>> @@ -2115,3 +2115,33 @@ int rte_pmd_i40e_ptype_mapping_replace(uint8_t port,
>>
>>   	return 0;
>>   }
>> +
>> +int64_t
>> +rte_pmd_i40e_query_vfid_by_mac(uint8_t port, const struct ether_addr *vf_mac)
> I don't think you need int64_t as a return value here.
> Just 'int' seems good enough.
> Anyway vf_id is just an 'int'.
> Konstantin

OK. I'll push a v7 in the next couple of hours.

Thanks,
Dave.

---snip--






More information about the dev mailing list