-- Damjan > On 26 Sep 2018, at 15:59, Stephen Hemminger <step...@networkplumber.org> > wrote: > > On Tue, 25 Sep 2018 15:16:04 +0200 > Damjan Marion <dmar...@me.com <mailto:dmar...@me.com>> wrote: > >>> On 25 Sep 2018, at 15:03, Stephen Hemminger <step...@networkplumber.org> >>> wrote: >>> >>> I noticed that the PCI domain in VPP is limited to 16 bits. >>> This is a problem on Azure/Hyper-V and other virtual environments. >>> In these environments, the host will generate a 32 bit synthetic value >>> when passing a PCI device through. The Linux kernel has 32 bit PCI >>> domains, and libpciaccess used by X now has 32 bit PCI domains. >>> The PCI specification says domain is supposed to be 32 bit so this is >>> not just Linux/Hyper-V issue. >>> >>> Unfortunately, VPP has 16 bit PCI domain hard coded. This is not a show >>> stopper now because the main use of PCI is for SR-IOV passthrough. In the >>> passthrough case, the VF is taken over by other devices and the actual PCI >>> value is not something VPP has to worry about directly. With DPDK today, >>> this is done via TAP/FAILSAFE/VDEV_NETVSC devices. The issue would only be >>> visible with direct device assignment. >>> >>> Fixing it in not too hard (only in pci.h) but it would cause the device >>> union to get larger and all the places as_u32 is used would have to become >>> as_u64. Mostly mechanical, but always a possibility of errors. >> >> Feel free to submit patch which moves to u64, i don't expect major issues. >> This is purely historic.... >> > > I started on this, but the one sticking point is that there are places using > pci address as a key into hash_get. The key is a uword which could be only > 32 bits on some architectures. It shouldn't be a complete blocker but > it does create potential issues.
That can be easily fixed my using *_mem variant of hash functions. hash_create_mem, hash_get_mem, hash_set_mem.... There are many examples in the code... > -=-=-=-=-=-=-=-=-=-=-=- > Links: You receive all messages sent to this group. > > View/Reply Online (#10674): https://lists.fd.io/g/vpp-dev/message/10674 > <https://lists.fd.io/g/vpp-dev/message/10674> > Mute This Topic: https://lists.fd.io/mt/26219976/675642 > <https://lists.fd.io/mt/26219976/675642> > Group Owner: vpp-dev+ow...@lists.fd.io <mailto:vpp-dev+ow...@lists.fd.io> > Unsubscribe: https://lists.fd.io/g/vpp-dev/unsub > <https://lists.fd.io/g/vpp-dev/unsub> [dmar...@me.com > <mailto:dmar...@me.com>] > -=-=-=-=-=-=-=-=-=-=-=-
-=-=-=-=-=-=-=-=-=-=-=- Links: You receive all messages sent to this group. View/Reply Online (#10675): https://lists.fd.io/g/vpp-dev/message/10675 Mute This Topic: https://lists.fd.io/mt/26219976/21656 Group Owner: vpp-dev+ow...@lists.fd.io Unsubscribe: https://lists.fd.io/g/vpp-dev/unsub [arch...@mail-archive.com] -=-=-=-=-=-=-=-=-=-=-=-