Since PCI config lock/unlock functions were renamed in linux kernel, these wrappers are introduced to reflect this change.
Signed-off-by: Yerden Zhumabekov <e_zhumabekov at sts.kz> --- lib/librte_eal/linuxapp/igb_uio/igb_uio.c | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/lib/librte_eal/linuxapp/igb_uio/igb_uio.c b/lib/librte_eal/linuxapp/igb_uio/igb_uio.c index 02545d9..605410e 100644 --- a/lib/librte_eal/linuxapp/igb_uio/igb_uio.c +++ b/lib/librte_eal/linuxapp/igb_uio/igb_uio.c @@ -223,6 +223,26 @@ static const struct attribute_group dev_attr_grp = { .attrs = dev_attrs, }; +static inline void +pci_config_lock(struct pci_dev *pdev) +{ +#if LINUX_VERSION_CODE < KERNEL_VERSION(3,3,0) + pci_block_user_cfg_access(pdev); +#else + pci_cfg_access_lock(pdev); +#endif +} + +static inline void +pci_config_unlock(struct pci_dev *pdev) +{ +#if LINUX_VERSION_CODE < KERNEL_VERSION(3,3,0) + pci_unblock_user_cfg_access(pdev); +#else + pci_cfg_access_unlock(pdev); +#endif +} + #if LINUX_VERSION_CODE < KERNEL_VERSION(3, 3, 0) /* Check if INTX works to control irq's. * Set's INTX_DISABLE flag and reads it back -- 1.7.10.4