On Mon, 9 May 2022 11:49:29 -0500 Bjorn Helgaas <helgaas@xxxxxxxxxx> wrote: > On Sun, May 08, 2022 at 11:07:40AM +0000, Volodymyr Babchuk wrote: > > > > As you can see, output for func 0 and func 2 is identical, so yeah, > > looks like my system reads config space for func 0 in both cases. > > They are not identical: > > 01:00.0 Non-Volatile memory controller > Region 0: Memory at 30010000 > > 01:00.2 Non-Volatile memory controller > Region 0: Memory at 30018000 > > > On other hand, I'm wondering if it is correct to have both is_virtfn and > > is_physfn in the first place, as there can 4 combinations and only two > > (or three?) of them are valid. Maybe it is worth to replace them with > > enum? > > Good question. I think there was a reason, but I can't remember it > right now. AIUI, three combinations are valid: is_physfn = 0, is_virtfn = 0: A non-SR-IOV function is_physfn = 1, is_virtfn = 0: An SR-IOV PF is_physfn = 0, is_virtfn = 1: An SR-IOV VF As implemented with bit fields this is 2 bits, which is more space efficient than an enum. Thanks, Alex