SRIOV memory allocation

J.Hwan Kim frog1120 at gmail.com
Sat Apr 7 04:11:20 EDT 2012


Hi, everyone

I'd like to know what routine of the PCIe allocates SR-IOV BAR memory.

When I put into the network card supporting SR-IOV in my system,
it returns error indicating "MMIO resource" is insufficient when sriov 
is enabled.

The routine is in iov.c

for (i = 0; i < PCI_SRIOV_NUM_BARS/*6*/; i++) {
         res = dev->resource + PCI_IOV_RESOURCES + i;
         if (res->parent)
             nres++;
}
if (nres != iov->nres) {
       dev_err(&dev->dev, "not enough MMIO resources for SR-IOV\n");
       return -ENOMEM;
}

So, I hope to know where the resources of IOV is assigned the parent 
pointer.

Thanks in advance.

Best Regards,
J.Hwan Kim




More information about the Kernelnewbies mailing list