On 06-May-20 12:35 PM, Wang, Haiyue wrote:
Hi Anatoly,
-----Original Message-----
From: Burakov, Anatoly <anatoly.bura...@intel.com>
Sent: Wednesday, May 6, 2020 18:27
To: Wang, Haiyue <haiyue.w...@intel.com>; dev@dpdk.org; tho...@monjalon.net;
jer...@marvell.com;
david.march...@redhat.com
Subject: Re: [PATCH v12 2/2] eal: support for VFIO-PCI VF token
On 05-May-20 11:34 AM, Haiyue Wang wrote:
The kernel module vfio-pci introduces the VF token to enable SR-IOV
support since 5.7.
The VF token can be set by a vfio-pci based PF driver and must be known
by the vfio-pci based VF driver in order to gain access to the device.
Signed-off-by: Haiyue Wang <haiyue.w...@intel.com>
---
<snip>
diff --git a/lib/librte_eal/freebsd/eal.c b/lib/librte_eal/freebsd/eal.c
index 540b7d38c..00b02855e 100644
--- a/lib/librte_eal/freebsd/eal.c
+++ b/lib/librte_eal/freebsd/eal.c
@@ -1002,6 +1002,11 @@ rte_eal_vfio_intr_mode(void)
return RTE_INTR_MODE_NONE;
}
+void rte_eal_vfio_vf_token(rte_uuid_t vf_token)
+{
+ memset(vf_token, 0, sizeof(rte_uuid_t));
+}
What's the purpose of memset(0) here? Presumably, if the API is not
supposed to be supported, the function should have no effect?
Yes, originally I meant to no parse the input, then return zero UUID.
I changed it to the same as Linux:
rte_uuid_copy(vf_token, internal_config.vfio_vf_token);
Since it is inited to zero.
Yes but on Linux it has effect because Linux supports it. On FreeBSD
there's no VFIO, so the function should IMO have no effect. However, i
don't have a strong opinion on this, so i'm fine either way.
--
Thanks,
Anatoly